瀏覽代碼

Merge branch 'maint'

* maint:
  Detect static libstdc++ earlier in configure
Bryan Drewery 10 年之前
父節點
當前提交
1ec454d467
共有 3 個文件被更改,包括 39 次插入0 次删除
  1. 9 0
      build/autotools/configure.ac
  2. 28 0
      configure
  3. 2 0
      doc/UPDATES.md

+ 9 - 0
build/autotools/configure.ac

@@ -52,6 +52,15 @@ CXX_FLAG_CHECK([DEBCXXFLAGS], [-fstack-protector-all], [stackprotectorall])
 CXX_FLAG_CHECK([DEBCXXFLAGS], [-Wconditional-uninitialized], [w_conditional_uninitialized])
 CXX_FLAG_CHECK([LDFLAGS], [-static-libstdc++], [static_libstdcxx])
 #CXX_FLAG_CHECK([LDFLAGS], [-static-libgcc], [static_libgcc])
+if [[ "${ax_cv_prog_cc_static_libstdcxx}" = "yes" ]]; then
+  AC_MSG_CHECKING([for static libstdc++])
+  AC_TRY_LINK([], [], [AC_MSG_RESULT(OK)],
+    [
+     AC_MSG_RESULT([not found.])
+     AC_MSG_ERROR([Static libstdc++ is rquired to build.], 1)
+    ]
+  )
+fi
 
 EGG_CHECK_DEPMODE
 

+ 28 - 0
configure

@@ -4044,6 +4044,34 @@ EOF
   fi
 
 #CXX_FLAG_CHECK([LDFLAGS], [-static-libgcc], [static_libgcc])
+if [ "${ax_cv_prog_cc_static_libstdcxx}" = "yes" ]; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for static libstdc++" >&5
+$as_echo_n "checking for static libstdc++... " >&6; }
+  cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end build/confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
+$as_echo "OK" >&6; }
+else
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5
+$as_echo "not found." >&6; }
+     as_fn_error 1 "Static libstdc++ is rquired to build." "$LINENO" 5
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
 
 
 CCDEPMODE=gcc

+ 2 - 0
doc/UPDATES.md

@@ -28,6 +28,8 @@
   * Show reason when initiating FiSH Key exchange
   * Auto initiate FiSH key exchange (with fish-auto=1) when invalid message
     received. (Invalid or unknown key) (#74)
+  * Show more clear error on Centos 7 that static-libstdc++ is required,
+    rather than an obscure Libcrypto error.
 
 # 1.4.6
   * Disable demo TCL support by default to prevent confusion during build.