diff --git a/configure.ac b/configure.ac index 84a4a0b39..88fde482b 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,10 @@ CYASSL_LIBRARY_VERSION=3:3:0 # +- increment if interfaces have been added, removed or changed AC_SUBST(CYASSL_LIBRARY_VERSION) +# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even +# if user doesn't override, no way to tell +USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS" + LT_INIT([win32-dll]) LT_LANG([C++]) LT_LANG([C]) @@ -700,6 +704,9 @@ fi]) AX_HARDEN_CC_COMPILER_FLAGS +# add user C_EXTRA_FLAGS back +CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS" + CREATE_HEX_VERSION AC_SUBST([AM_CPPFLAGS]) AC_SUBST([AM_CFLAGS]) diff --git a/m4/ax_harden_compiler_flags.m4 b/m4/ax_harden_compiler_flags.m4 index 5818cf24b..a32cef3c9 100644 --- a/m4/ax_harden_compiler_flags.m4 +++ b/m4/ax_harden_compiler_flags.m4 @@ -97,6 +97,7 @@ AC_LANG_PUSH([C]) + CFLAGS= ac_cv_warnings_as_errors=no ax_append_compile_cflags_extra= AS_IF([test "$ac_cv_vcs_checkout" = "yes"],[