diff --git a/configure b/configure index b577b4054..c7858e85d 100755 --- a/configure +++ b/configure @@ -3963,42 +3963,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___fno_strict_overflow=yes -else - ax_cv_check_cflags__Werror___fno_strict_overflow=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fno_strict_overflow" >&5 -$as_echo "$ax_cv_check_cflags__Werror___fno_strict_overflow" >&6; } -if test x"$ax_cv_check_cflags__Werror___fno_strict_overflow" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-strict-overflow" >&5 -$as_echo_n "checking whether C compiler accepts -fno-strict-overflow... " >&6; } -if ${ax_cv_check_cflags__Werror___fno_strict_overflow+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -fno-strict-overflow" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4019,16 +3983,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___fno_strict_overflow" >&6; } if test x"$ax_cv_check_cflags__Werror___fno_strict_overflow" = xyes; then : HARDEN_CFLAGS="$HARDEN_CFLAGS -fno-strict-overflow" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -4058,42 +4012,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_2=yes -else - ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_2=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_2" >&5 -$as_echo "$ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_2" >&6; } -if test x"$ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_2" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -D_FORTIFY_SOURCE=2" >&5 -$as_echo_n "checking whether C compiler accepts -D_FORTIFY_SOURCE=2... " >&6; } -if ${ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_2+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -D_FORTIFY_SOURCE=2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4114,16 +4032,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_2" >&6; } if test x"$ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_2" = xyes; then : HARDEN_CFLAGS="$HARDEN_CFLAGS -D_FORTIFY_SOURCE=2" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -4152,42 +4060,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___fstack_protector_all=yes -else - ax_cv_check_cflags__Werror___fstack_protector_all=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fstack_protector_all" >&5 -$as_echo "$ax_cv_check_cflags__Werror___fstack_protector_all" >&6; } -if test x"$ax_cv_check_cflags__Werror___fstack_protector_all" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstack-protector-all" >&5 -$as_echo_n "checking whether C compiler accepts -fstack-protector-all... " >&6; } -if ${ax_cv_check_cflags__Werror___fstack_protector_all+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -fstack-protector-all" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4256,42 +4128,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector=yes -else - ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector" >&5 -$as_echo "$ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector" >&6; } -if test x"$ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wstack-protector" >&5 -$as_echo_n "checking whether C compiler accepts -Wstack-protector... " >&6; } -if ${ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -fstack-protector-all -Wstack-protector" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4312,16 +4148,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector" >&6; } if test x"$ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector" = xyes; then : HARDEN_CFLAGS="$HARDEN_CFLAGS -Wstack-protector" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -4349,42 +4175,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1=yes -else - ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1" >&5 -$as_echo "$ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1" >&6; } -if test x"$ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts --param ssp-buffer-size=1" >&5 -$as_echo_n "checking whether C compiler accepts --param ssp-buffer-size=1... " >&6; } -if ${ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -fstack-protector-all --param ssp-buffer-size=1" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4405,16 +4195,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1" >&6; } if test x"$ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1" = xyes; then : HARDEN_CFLAGS="$HARDEN_CFLAGS --param ssp-buffer-size=1" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -4429,16 +4209,6 @@ else : fi -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -4470,42 +4240,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___fPIE=yes -else - ax_cv_check_cflags__Werror___fPIE=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fPIE" >&5 -$as_echo "$ax_cv_check_cflags__Werror___fPIE" >&6; } -if test x"$ax_cv_check_cflags__Werror___fPIE" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fPIE" >&5 -$as_echo_n "checking whether C compiler accepts -fPIE... " >&6; } -if ${ax_cv_check_cflags__Werror___fPIE+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -fPIE" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4598,16 +4332,6 @@ fi fi -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -4702,6 +4426,54 @@ CC="$saved_CC" CXX="$saved_CXX" LD="$saved_LD" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fwrong-parameter" >&5 +$as_echo_n "checking whether C compiler accepts -fwrong-parameter... " >&6; } +if ${ax_cv_check_cflags__Werror___fwrong_parameter+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror -fwrong-parameter" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ax_cv_check_cflags__Werror___fwrong_parameter=yes +else + ax_cv_check_cflags__Werror___fwrong_parameter=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fwrong_parameter" >&5 +$as_echo "$ax_cv_check_cflags__Werror___fwrong_parameter" >&6; } +if test x"$ax_cv_check_cflags__Werror___fwrong_parameter" = xyes; then : + CFLAGS="$CFLAGS -fwrong-parameter" +else + : +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4719,42 +4491,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___fno_strict_aliasing=yes -else - ax_cv_check_cflags__Werror___fno_strict_aliasing=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fno_strict_aliasing" >&5 -$as_echo "$ax_cv_check_cflags__Werror___fno_strict_aliasing" >&6; } -if test x"$ax_cv_check_cflags__Werror___fno_strict_aliasing" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-strict-aliasing" >&5 -$as_echo_n "checking whether C compiler accepts -fno-strict-aliasing... " >&6; } -if ${ax_cv_check_cflags__Werror___fno_strict_aliasing+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -fno-strict-aliasing" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4775,16 +4511,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___fno_strict_aliasing" >&6; } if test x"$ax_cv_check_cflags__Werror___fno_strict_aliasing" = xyes; then : CFLAGS="$CFLAGS -fno-strict-aliasing" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -4818,42 +4544,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wextra=yes -else - ax_cv_check_cflags__Werror___Wextra=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wextra" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wextra" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wextra" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wextra" >&5 -$as_echo_n "checking whether C compiler accepts -Wextra... " >&6; } -if ${ax_cv_check_cflags__Werror___Wextra+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wextra" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4874,16 +4564,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wextra" >&6; } if test x"$ax_cv_check_cflags__Werror___Wextra" = xyes; then : CFLAGS="$CFLAGS -Wextra" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -4911,42 +4591,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Waggregate_return=yes -else - ax_cv_check_cflags__Werror___Waggregate_return=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Waggregate_return" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Waggregate_return" >&6; } -if test x"$ax_cv_check_cflags__Werror___Waggregate_return" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Waggregate-return" >&5 -$as_echo_n "checking whether C compiler accepts -Waggregate-return... " >&6; } -if ${ax_cv_check_cflags__Werror___Waggregate_return+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Waggregate-return" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4967,16 +4611,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Waggregate_return" >&6; } if test x"$ax_cv_check_cflags__Werror___Waggregate_return" = xyes; then : CFLAGS="$CFLAGS -Waggregate-return" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5004,42 +4638,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wduplicated_cond=yes -else - ax_cv_check_cflags__Werror___Wduplicated_cond=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wduplicated_cond" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wduplicated_cond" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wduplicated_cond" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wduplicated-cond" >&5 -$as_echo_n "checking whether C compiler accepts -Wduplicated-cond... " >&6; } -if ${ax_cv_check_cflags__Werror___Wduplicated_cond+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wduplicated-cond" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5060,16 +4658,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wduplicated_cond" >&6; } if test x"$ax_cv_check_cflags__Werror___Wduplicated_cond" = xyes; then : CFLAGS="$CFLAGS -Wduplicated-cond" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5097,42 +4685,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wduplicated_branches=yes -else - ax_cv_check_cflags__Werror___Wduplicated_branches=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wduplicated_branches" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wduplicated_branches" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wduplicated_branches" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wduplicated-branches" >&5 -$as_echo_n "checking whether C compiler accepts -Wduplicated-branches... " >&6; } -if ${ax_cv_check_cflags__Werror___Wduplicated_branches+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wduplicated-branches" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5153,16 +4705,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wduplicated_branches" >&6; } if test x"$ax_cv_check_cflags__Werror___Wduplicated_branches" = xyes; then : CFLAGS="$CFLAGS -Wduplicated-branches" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5192,42 +4734,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wpointer_sign=yes -else - ax_cv_check_cflags__Werror___Wpointer_sign=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wpointer_sign" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wpointer_sign" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wpointer_sign" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wpointer-sign" >&5 -$as_echo_n "checking whether C compiler accepts -Wpointer-sign... " >&6; } -if ${ax_cv_check_cflags__Werror___Wpointer_sign+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wpointer-sign" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5248,16 +4754,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wpointer_sign" >&6; } if test x"$ax_cv_check_cflags__Werror___Wpointer_sign" = xyes; then : CFLAGS="$CFLAGS -Wno-pointer-sign" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5286,42 +4782,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Winvalid_source_encoding=yes -else - ax_cv_check_cflags__Werror___Winvalid_source_encoding=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Winvalid_source_encoding" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Winvalid_source_encoding" >&6; } -if test x"$ax_cv_check_cflags__Werror___Winvalid_source_encoding" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Winvalid-source-encoding" >&5 -$as_echo_n "checking whether C compiler accepts -Winvalid-source-encoding... " >&6; } -if ${ax_cv_check_cflags__Werror___Winvalid_source_encoding+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Winvalid-source-encoding" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5342,16 +4802,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Winvalid_source_encoding" >&6; } if test x"$ax_cv_check_cflags__Werror___Winvalid_source_encoding" = xyes; then : CFLAGS="$CFLAGS -Wno-invalid-source-encoding" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5380,42 +4830,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wformat_zero_length=yes -else - ax_cv_check_cflags__Werror___Wformat_zero_length=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wformat_zero_length" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wformat_zero_length" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wformat_zero_length" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat-zero-length" >&5 -$as_echo_n "checking whether C compiler accepts -Wformat-zero-length... " >&6; } -if ${ax_cv_check_cflags__Werror___Wformat_zero_length+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wformat-zero-length" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5436,16 +4850,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wformat_zero_length" >&6; } if test x"$ax_cv_check_cflags__Werror___Wformat_zero_length" = xyes; then : CFLAGS="$CFLAGS -Wno-format-zero-length" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5474,42 +4878,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wformat_truncation=yes -else - ax_cv_check_cflags__Werror___Wformat_truncation=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wformat_truncation" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wformat_truncation" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wformat_truncation" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat-truncation" >&5 -$as_echo_n "checking whether C compiler accepts -Wformat-truncation... " >&6; } -if ${ax_cv_check_cflags__Werror___Wformat_truncation+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wformat-truncation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5530,16 +4898,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wformat_truncation" >&6; } if test x"$ax_cv_check_cflags__Werror___Wformat_truncation" = xyes; then : CFLAGS="$CFLAGS -Wno-format-truncation" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5568,42 +4926,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wunused=yes -else - ax_cv_check_cflags__Werror___Wunused=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wunused" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wunused" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wunused" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused" >&5 -$as_echo_n "checking whether C compiler accepts -Wunused... " >&6; } -if ${ax_cv_check_cflags__Werror___Wunused+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wunused" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5624,16 +4946,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wunused" >&6; } if test x"$ax_cv_check_cflags__Werror___Wunused" = xyes; then : CFLAGS="$CFLAGS -Wno-unused" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5661,42 +4973,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wunused_parameter=yes -else - ax_cv_check_cflags__Werror___Wunused_parameter=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wunused_parameter" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wunused_parameter" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wunused_parameter" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused-parameter" >&5 -$as_echo_n "checking whether C compiler accepts -Wunused-parameter... " >&6; } -if ${ax_cv_check_cflags__Werror___Wunused_parameter+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wunused-parameter" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5717,16 +4993,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wunused_parameter" >&6; } if test x"$ax_cv_check_cflags__Werror___Wunused_parameter" = xyes; then : CFLAGS="$CFLAGS -Wno-unused-parameter" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5755,42 +5021,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wchar_subscripts=yes -else - ax_cv_check_cflags__Werror___Wchar_subscripts=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wchar_subscripts" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wchar_subscripts" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wchar_subscripts" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wchar-subscripts" >&5 -$as_echo_n "checking whether C compiler accepts -Wchar-subscripts... " >&6; } -if ${ax_cv_check_cflags__Werror___Wchar_subscripts+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wchar-subscripts" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5811,16 +5041,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wchar_subscripts" >&6; } if test x"$ax_cv_check_cflags__Werror___Wchar_subscripts" = xyes; then : CFLAGS="$CFLAGS -Wno-char-subscripts" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5849,42 +5069,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wsign_compare=yes -else - ax_cv_check_cflags__Werror___Wsign_compare=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wsign_compare" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wsign_compare" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wsign_compare" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wsign-compare" >&5 -$as_echo_n "checking whether C compiler accepts -Wsign-compare... " >&6; } -if ${ax_cv_check_cflags__Werror___Wsign_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wsign-compare" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5905,16 +5089,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wsign_compare" >&6; } if test x"$ax_cv_check_cflags__Werror___Wsign_compare" = xyes; then : CFLAGS="$CFLAGS -Wno-sign-compare" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -5943,42 +5117,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Wempty_body=yes -else - ax_cv_check_cflags__Werror___Wempty_body=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wempty_body" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Wempty_body" >&6; } -if test x"$ax_cv_check_cflags__Werror___Wempty_body" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wempty-body" >&5 -$as_echo_n "checking whether C compiler accepts -Wempty-body... " >&6; } -if ${ax_cv_check_cflags__Werror___Wempty_body+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wempty-body" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -5999,16 +5137,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Wempty_body" >&6; } if test x"$ax_cv_check_cflags__Werror___Wempty_body" = xyes; then : CFLAGS="$CFLAGS -Wno-empty-body" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi @@ -6037,42 +5165,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__Werror___Waddress=yes -else - ax_cv_check_cflags__Werror___Waddress=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Waddress" >&5 -$as_echo "$ax_cv_check_cflags__Werror___Waddress" >&6; } -if test x"$ax_cv_check_cflags__Werror___Waddress" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Waddress" >&5 -$as_echo_n "checking whether C compiler accepts -Waddress... " >&6; } -if ${ax_cv_check_cflags__Werror___Waddress+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Waddress" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -6093,16 +5185,6 @@ fi $as_echo "$ax_cv_check_cflags__Werror___Waddress" >&6; } if test x"$ax_cv_check_cflags__Werror___Waddress" = xyes; then : CFLAGS="$CFLAGS -Wno-address" -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - else : fi diff --git a/configure.ac b/configure.ac index 78873ea0a..52258dd93 100644 --- a/configure.ac +++ b/configure.ac @@ -97,13 +97,9 @@ LD="$flag_wrap $LD" # We use the same hardening flags for C and C++. We must check that each flag # is supported by both compilers. -AC_DEFUN([check_cc_cxx_flag], +AC_DEFUN([check_cc_flag], [AC_LANG_PUSH(C) - AX_CHECK_COMPILE_FLAG([$1], - [AC_LANG_PUSH(C) - AX_CHECK_COMPILE_FLAG([$1], [$2], [$3], [-Werror $4]) - AC_LANG_POP(C)], - [$3], [-Werror $4]) + AX_CHECK_COMPILE_FLAG([$1], [$2], [$3], [-Werror $4]) AC_LANG_POP(C)]) AC_DEFUN([check_link_flag], @@ -118,23 +114,23 @@ AC_ARG_ENABLE([hardening], HARDEN_CFLAGS="" HARDEN_LDFLAGS="" AS_IF([test x"$hardening" != x"no"], [ - check_cc_cxx_flag([-fno-strict-overflow], [HARDEN_CFLAGS="$HARDEN_CFLAGS -fno-strict-overflow"]) + check_cc_flag([-fno-strict-overflow], [HARDEN_CFLAGS="$HARDEN_CFLAGS -fno-strict-overflow"]) # This one will likely succeed, even on platforms where it does nothing. - check_cc_cxx_flag([-D_FORTIFY_SOURCE=2], [HARDEN_CFLAGS="$HARDEN_CFLAGS -D_FORTIFY_SOURCE=2"]) + check_cc_flag([-D_FORTIFY_SOURCE=2], [HARDEN_CFLAGS="$HARDEN_CFLAGS -D_FORTIFY_SOURCE=2"]) - check_cc_cxx_flag([-fstack-protector-all], + check_cc_flag([-fstack-protector-all], [check_link_flag([-fstack-protector-all], [HARDEN_CFLAGS="$HARDEN_CFLAGS -fstack-protector-all" - check_cc_cxx_flag([-Wstack-protector], [HARDEN_CFLAGS="$HARDEN_CFLAGS -Wstack-protector"], + check_cc_flag([-Wstack-protector], [HARDEN_CFLAGS="$HARDEN_CFLAGS -Wstack-protector"], [], [-fstack-protector-all]) - check_cc_cxx_flag([--param ssp-buffer-size=1], [HARDEN_CFLAGS="$HARDEN_CFLAGS --param ssp-buffer-size=1"], + check_cc_flag([--param ssp-buffer-size=1], [HARDEN_CFLAGS="$HARDEN_CFLAGS --param ssp-buffer-size=1"], [], [-fstack-protector-all])])]) # At the link step, we might want -pie (GCC) or -Wl,-pie (Clang on OS X) # # The linker checks also compile code, so we need to include -fPIE as well. - check_cc_cxx_flag([-fPIE], + check_cc_flag([-fPIE], [check_link_flag([-fPIE -pie], [HARDEN_BINCFLAGS="-fPIE" HARDEN_BINLDFLAGS="-pie"], @@ -157,7 +153,7 @@ LD="$saved_LD" dnl HARDENING END dnl UnrealIRCd might not be strict-aliasing safe at this time -check_cc_cxx_flag([-fno-strict-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"]) +check_cc_flag([-fno-strict-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"]) dnl Previously -funsigned-char was in a config check. It would always dnl be enabled with gcc and clang. We now unconditionally enable it, @@ -173,16 +169,16 @@ dnl We should be able to turn this on unconditionally: CFLAGS="$CFLAGS -Wall" dnl More warnings (if the compiler supports it): -check_cc_cxx_flag([-Wextra], [CFLAGS="$CFLAGS -Wextra"]) -check_cc_cxx_flag([-Waggregate-return], [CFLAGS="$CFLAGS -Waggregate-return"]) +check_cc_flag([-Wextra], [CFLAGS="$CFLAGS -Wextra"]) +check_cc_flag([-Waggregate-return], [CFLAGS="$CFLAGS -Waggregate-return"]) dnl The following few are more experimental, if they have false positives we'll have dnl to disable them: -dnl Can't use this, too bad: check_cc_cxx_flag([-Wlogical-op], [CFLAGS="$CFLAGS -Wlogical-op"]) -check_cc_cxx_flag([-Wduplicated-cond], [CFLAGS="$CFLAGS -Wduplicated-cond"]) -check_cc_cxx_flag([-Wduplicated-branches], [CFLAGS="$CFLAGS -Wduplicated-branches"]) +dnl Can't use this, too bad: check_cc_flag([-Wlogical-op], [CFLAGS="$CFLAGS -Wlogical-op"]) +check_cc_flag([-Wduplicated-cond], [CFLAGS="$CFLAGS -Wduplicated-cond"]) +check_cc_flag([-Wduplicated-branches], [CFLAGS="$CFLAGS -Wduplicated-branches"]) dnl And now to filter out certain warnings: -dnl [!] NOTE REGARDING THE check_cc_cxx_flag used by these: +dnl [!] NOTE REGARDING THE check_cc_flag used by these: dnl We check for the -Woption even though we are going to use -Wno-option. dnl This is due to the following (odd) gcc behavior: dnl "When an unrecognized warning option is requested (e.g., @@ -198,37 +194,37 @@ dnl -Woption instead. dnl Pointer signedness warnings are really a pain and 99.9% of the time dnl they are of absolutely no use whatsoever. IMO the person who decided dnl to enable this without -Wall should be shot on sight. -check_cc_cxx_flag([-Wpointer-sign], [CFLAGS="$CFLAGS -Wno-pointer-sign"]) +check_cc_flag([-Wpointer-sign], [CFLAGS="$CFLAGS -Wno-pointer-sign"]) dnl This is purely for charsys.c... I like it so we can easily read dnl this for non-utf8. We can remove it once we ditch non-utf8 some day dnl of course, or decide to ignore me and encode them. -check_cc_cxx_flag([-Winvalid-source-encoding], [CFLAGS="$CFLAGS -Wno-invalid-source-encoding"]) +check_cc_flag([-Winvalid-source-encoding], [CFLAGS="$CFLAGS -Wno-invalid-source-encoding"]) -check_cc_cxx_flag([-Wformat-zero-length], [CFLAGS="$CFLAGS -Wno-format-zero-length"]) +check_cc_flag([-Wformat-zero-length], [CFLAGS="$CFLAGS -Wno-format-zero-length"]) -check_cc_cxx_flag([-Wformat-truncation], [CFLAGS="$CFLAGS -Wno-format-truncation"]) +check_cc_flag([-Wformat-truncation], [CFLAGS="$CFLAGS -Wno-format-truncation"]) dnl While it can be useful to occasionally to compile with warnings about dnl unused variables and parameters, we often 'think ahead' when coding things dnl so they may be useless now but not later. Similarly, for variables, we dnl don't always care about a variable that may still be present in a build dnl without DEBUGMODE. Unused variables are optimized out anyway. -check_cc_cxx_flag([-Wunused], [CFLAGS="$CFLAGS -Wno-unused"]) -check_cc_cxx_flag([-Wunused-parameter], [CFLAGS="$CFLAGS -Wno-unused-parameter"]) +check_cc_flag([-Wunused], [CFLAGS="$CFLAGS -Wno-unused"]) +check_cc_flag([-Wunused-parameter], [CFLAGS="$CFLAGS -Wno-unused-parameter"]) dnl We use this and this warning is meaningless since 'char' is always unsigned dnl in UnrealIRCd compiles (-funsigned-char). -check_cc_cxx_flag([-Wchar-subscripts], [CFLAGS="$CFLAGS -Wno-char-subscripts"]) +check_cc_flag([-Wchar-subscripts], [CFLAGS="$CFLAGS -Wno-char-subscripts"]) -check_cc_cxx_flag([-Wsign-compare], [CFLAGS="$CFLAGS -Wno-sign-compare"]) +check_cc_flag([-Wsign-compare], [CFLAGS="$CFLAGS -Wno-sign-compare"]) dnl Don't warn about empty body, we use this, eg via Debug(()) or in if's. -check_cc_cxx_flag([-Wempty-body], [CFLAGS="$CFLAGS -Wno-empty-body"]) +check_cc_flag([-Wempty-body], [CFLAGS="$CFLAGS -Wno-empty-body"]) dnl This one fails with ircstrdup(var, staticstring) dnl Shame we have to turn it off completely... -check_cc_cxx_flag([-Waddress], [CFLAGS="$CFLAGS -Wno-address"]) +check_cc_flag([-Waddress], [CFLAGS="$CFLAGS -Wno-address"]) dnl End of -W... compiler checks.