diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 284 |
1 files changed, 128 insertions, 156 deletions
@@ -7074,22 +7074,25 @@ fi UNIVERSAL_ARCH_FLAGS= + + # tweak BASECFLAGS based on compiler and platform case $GCC in yes) CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5 -$as_echo_n "checking for -Wextra... " >&6; } - ac_save_cc="$CC" - CC="$CC -Wextra -Werror" - if ${ac_cv_extra_warnings+:} false; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -Wextra" >&5 +$as_echo_n "checking if we can add -Wextra... " >&6; } + + py_cflags=$CFLAGS + CFLAGS="$CFLAGS -Wextra -Werror" + if ${ac_cv_enable_extra_warning+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -7097,28 +7100,24 @@ main () ; return 0; } - _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - ac_cv_extra_warnings=yes - + ac_cv_enable_extra_warning=yes else - - ac_cv_extra_warnings=no - + ac_cv_enable_extra_warning=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - CC="$ac_save_cc" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5 -$as_echo "$ac_cv_extra_warnings" >&6; } + CFLAGS=$py_cflags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_extra_warning" >&5 +$as_echo "$ac_cv_enable_extra_warning" >&6; } - if test $ac_cv_extra_warnings = yes - then - CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" - fi + + if test "x$ac_cv_enable_extra_warning" = xyes; then : + CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" +fi # Python doesn't violate C99 aliasing rules, but older versions of # GCC produce warnings for legal Python code. Enable @@ -7185,30 +7184,27 @@ fi CC="$ac_save_cc" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5 $as_echo "$ac_cv_no_strict_aliasing" >&6; } - if test $ac_cv_no_strict_aliasing = yes - then - BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" - fi + if test "x$ac_cv_no_strict_aliasing" = xyes; then : + BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" +fi # ICC doesn't recognize the option, but only emits a warning ## XXX does it emit an unused result warning and can it be disabled? - case "$CC" in - *icc*) + case $CC in #( + *icc*) : ac_cv_disable_unused_result_warning=no - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5 -$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; } - ac_save_cc="$CC" - CC="$CC -Wunused-result -Werror" - save_CFLAGS="$CFLAGS" - if ${ac_cv_disable_unused_result_warning+:} false; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can disable $CC unused-result warning" >&5 +$as_echo_n "checking if we can disable $CC unused-result warning... " >&6; } + + py_cflags=$CFLAGS + CFLAGS="$CFLAGS -Wunused-result -Werror" + if ${ac_cv_disable_unused_result_warning+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -7216,44 +7212,41 @@ main () ; return 0; } - _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - ac_cv_disable_unused_result_warning=yes - + ac_cv_disable_unused_result_warning=yes else - - ac_cv_disable_unused_result_warning=no - + ac_cv_disable_unused_result_warning=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - CFLAGS="$save_CFLAGS" - CC="$ac_save_cc" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5 + CFLAGS=$py_cflags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5 $as_echo "$ac_cv_disable_unused_result_warning" >&6; } - ;; - esac - if test $ac_cv_disable_unused_result_warning = yes - then - BASECFLAGS="$BASECFLAGS -Wno-unused-result" - CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" - fi + ;; #( + *) : + ;; +esac + if test "x$ac_cv_disable_unused_result_warning" = xyes; then : + BASECFLAGS="$BASECFLAGS -Wno-unused-result" + CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5 -$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; } - ac_save_cc="$CC" - CC="$CC -Wunused-parameter -Werror" - if ${ac_cv_disable_unused_parameter_warning+:} false; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can disable $CC unused-parameter warning" >&5 +$as_echo_n "checking if we can disable $CC unused-parameter warning... " >&6; } + + py_cflags=$CFLAGS + CFLAGS="$CFLAGS -Wunused-parameter -Werror" + if ${ac_cv_disable_unused_parameter_warning+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -7261,40 +7254,37 @@ main () ; return 0; } - _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - ac_cv_disable_unused_parameter_warning=yes - + ac_cv_disable_unused_parameter_warning=yes else - - ac_cv_disable_unused_parameter_warning=no - + ac_cv_disable_unused_parameter_warning=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - CC="$ac_save_cc" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5 + CFLAGS=$py_cflags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5 $as_echo "$ac_cv_disable_unused_parameter_warning" >&6; } - if test $ac_cv_disable_unused_parameter_warning = yes - then - CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5 -$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; } - ac_save_cc="$CC" - CC="$CC -Wmissing-field-initializers -Werror" - if ${ac_cv_disable_missing_field_initializers+:} false; then : + if test "x$ac_cv_disable_unused_parameter_warning" = xyes; then : + CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter" +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can disable $CC missing-field-initializers warning" >&5 +$as_echo_n "checking if we can disable $CC missing-field-initializers warning... " >&6; } + + py_cflags=$CFLAGS + CFLAGS="$CFLAGS -Wmissing-field-initializers -Werror" + if ${ac_cv_disable_missing_field_initializers_warning+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -7302,41 +7292,37 @@ main () ; return 0; } - _ACEOF if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_disable_missing_field_initializers_warning=yes +else + ac_cv_disable_missing_field_initializers_warning=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_disable_missing_field_initializers=yes +fi -else + CFLAGS=$py_cflags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers_warning" >&5 +$as_echo "$ac_cv_disable_missing_field_initializers_warning" >&6; } - ac_cv_disable_missing_field_initializers=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "x$ac_cv_disable_missing_field_initializers_warning" = xyes; then : + CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers" fi - CC="$ac_save_cc" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5 -$as_echo "$ac_cv_disable_missing_field_initializers" >&6; } - if test $ac_cv_disable_missing_field_initializers = yes - then - CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers" - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can enable $CC sign-compare warning" >&5 +$as_echo_n "checking if we can enable $CC sign-compare warning... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5 -$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; } - ac_save_cc="$CC" - CC="$CC -Wsign-compare" - save_CFLAGS="$CFLAGS" - if ${ac_cv_enable_sign_compare_warning+:} false; then : + py_cflags=$CFLAGS + CFLAGS="$CFLAGS -Wsign-compare -Werror" + if ${ac_cv_enable_sign_compare_warning+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -7344,42 +7330,37 @@ main () ; return 0; } - _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - ac_cv_enable_sign_compare_warning=yes - + ac_cv_enable_sign_compare_warning=yes else - - ac_cv_enable_sign_compare_warning=no - + ac_cv_enable_sign_compare_warning=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - CFLAGS="$save_CFLAGS" - CC="$ac_save_cc" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5 + CFLAGS=$py_cflags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5 $as_echo "$ac_cv_enable_sign_compare_warning" >&6; } - if test $ac_cv_enable_sign_compare_warning = yes - then - BASECFLAGS="$BASECFLAGS -Wsign-compare" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5 -$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; } - ac_save_cc="$CC" - CC="$CC -Wunreachable-code" - save_CFLAGS="$CFLAGS" - if ${ac_cv_enable_unreachable_code_warning+:} false; then : + if test "x$ac_cv_enable_sign_compare_warning" = xyes; then : + BASECFLAGS="$BASECFLAGS -Wsign-compare" +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can enable $CC unreachable-code warning" >&5 +$as_echo_n "checking if we can enable $CC unreachable-code warning... " >&6; } + + py_cflags=$CFLAGS + CFLAGS="$CFLAGS -Wunreachable-code -Werror" + if ${ac_cv_enable_unreachable_code_warning+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -7387,22 +7368,20 @@ main () ; return 0; } - _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - ac_cv_enable_unreachable_code_warning=yes - + ac_cv_enable_unreachable_code_warning=yes else - - ac_cv_enable_unreachable_code_warning=no - + ac_cv_enable_unreachable_code_warning=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - CFLAGS="$save_CFLAGS" - CC="$ac_save_cc" + CFLAGS=$py_cflags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5 +$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; } + # Don't enable unreachable code warning in debug mode, since it usually # results in non-standard code paths. @@ -7419,20 +7398,19 @@ fi else ac_cv_enable_unreachable_code_warning=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5 -$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5 -$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; } - ac_save_cc="$CC" - CC="$CC -Werror -Wstrict-prototypes" - if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can enable $CC strict-prototypes warning" >&5 +$as_echo_n "checking if we can enable $CC strict-prototypes warning... " >&6; } + + py_cflags=$CFLAGS + CFLAGS="$CFLAGS -Wstrict-prototypes -Werror" + if ${ac_cv_enable_strict_prototypes_warning+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -7440,28 +7418,24 @@ main () ; return 0; } - _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - ac_cv_enable_strict_prototypes_warning=yes - + ac_cv_enable_strict_prototypes_warning=yes else - - ac_cv_enable_strict_prototypes_warning=no - + ac_cv_enable_strict_prototypes_warning=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - CC="$ac_save_cc" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5 + CFLAGS=$py_cflags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5 $as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; } - if test $ac_cv_enable_strict_prototypes_warning = yes - then - CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes" - fi + + if test "x$ac_cv_enable_strict_prototypes_warning" = xyes; then : + CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes" +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5 $as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; } @@ -7499,10 +7473,9 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5 $as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; } - if test $ac_cv_enable_implicit_function_declaration_error = yes - then - CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration" - fi + if test "x$ac_cv_enable_implicit_function_declaration_error" = xyes; then : + CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration" +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5 $as_echo_n "checking if we can use visibility in $CC... " >&6; } @@ -7540,10 +7513,9 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5 $as_echo "$ac_cv_enable_visibility" >&6; } - if test $ac_cv_enable_visibility = yes - then - CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden" - fi + if test "x$ac_cv_enable_visibility" = xyes; then : + CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden" +fi # if using gcc on alpha, use -mieee to get (near) full IEEE 754 # support. Without this, treatment of subnormals doesn't follow |