Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45723: Use SAVE/RESTORE macros in configure.ac #29701

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 45 additions & 36 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3944,10 +3944,11 @@ then
then
found_gcc=
found_clang=
as_save_IFS=$IFS; IFS=:
save_IFS=$IFS
IFS=:
for as_dir in $PATH
do
IFS=$as_save_IFS
IFS=$save_IFS
if test -x "${as_dir}/gcc"; then
if test -z "${found_gcc}"; then
found_gcc="${as_dir}/gcc"
Expand All @@ -3959,7 +3960,7 @@ then
fi
fi
done
IFS=$as_save_IFS
IFS=$save_IFS

if test -n "$found_gcc" -a -n "$found_clang"
then
Expand Down Expand Up @@ -6053,7 +6054,7 @@ if ${ac_cv_wl_no_as_needed+:} false; then :
$as_echo_n "(cached) " >&6
else

save_LDFLAGS="$LDFLAGS"
save_LDFLAGS=$LDFLAGS
as_fn_append LDFLAGS -Wl,--no-as-needed
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand All @@ -6075,7 +6076,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS="$save_LDFLAGS"
LDFLAGS=$save_LDFLAGS

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wl_no_as_needed" >&5
Expand Down Expand Up @@ -6302,7 +6303,7 @@ if test "${enable_profiling+set}" = set; then :
fi

if test "x$enable_profiling" = xyes; then
ac_save_cc="$CC"
save_CC=$CC
CC="$CC -pg"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand All @@ -6315,7 +6316,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CC="$ac_save_cc"
CC=$save_CC
else
enable_profiling=no
fi
Expand Down Expand Up @@ -7509,9 +7510,13 @@ fi
# GCC produce warnings for legal Python code. Enable
# -fno-strict-aliasing on versions of GCC that support but produce
# warnings. See Issue3326
ac_save_cc="$CC"
save_CC=$CC
CC="$CC -fno-strict-aliasing"
save_CFLAGS="$CFLAGS"
save_CFLAGS=$CFLAGS
save_CPPFLAGS=$CPPFLAGS
save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
if ${ac_cv_no_strict_aliasing+:} false; then :
Expand All @@ -7532,7 +7537,7 @@ main ()
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

CC="$ac_save_cc -fstrict-aliasing"
CC="$save_CC -fstrict-aliasing"
CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand Down Expand Up @@ -7567,8 +7572,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
$as_echo "$ac_cv_no_strict_aliasing" >&6; }
CFLAGS="$save_CFLAGS"
CC="$ac_save_cc"
CFLAGS=$save_CFLAGS
CPPFLAGS=$save_CPPFLAGS
LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS

CC=$save_CC
if test "x$ac_cv_no_strict_aliasing" = xyes; then :
BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
fi
Expand Down Expand Up @@ -7822,7 +7831,7 @@ $as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
fi

ac_save_cc="$CC"
save_CC=$CC
CC="$CC -Werror=implicit-function-declaration"
{ $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; }
Expand Down Expand Up @@ -7855,13 +7864,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
CC="$ac_save_cc"
CC=$save_CC

if test "x$ac_cv_enable_implicit_function_declaration_error" = xyes; then :
CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
fi

ac_save_cc="$CC"
save_CC=$CC
CC="$CC -fvisibility=hidden"
{ $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; }
Expand Down Expand Up @@ -7894,7 +7903,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
$as_echo "$ac_cv_enable_visibility" >&6; }
CC="$ac_save_cc"
CC=$save_CC

if test "x$ac_cv_enable_visibility" = xyes; then :
CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
Expand Down Expand Up @@ -8175,7 +8184,7 @@ $as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
if ${ac_cv_kpthread+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cc="$CC"
save_CC=$CC
CC="$CC -Kpthread"
if test "$cross_compiling" = yes; then :
ac_cv_kpthread=no
Expand Down Expand Up @@ -8206,7 +8215,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

CC="$ac_save_cc"
CC=$save_CC
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
$as_echo "$ac_cv_kpthread" >&6; }
Expand All @@ -8224,7 +8233,7 @@ $as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
if ${ac_cv_kthread+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cc="$CC"
save_CC=$CC
CC="$CC -Kthread"
if test "$cross_compiling" = yes; then :
ac_cv_kthread=no
Expand Down Expand Up @@ -8255,7 +8264,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

CC="$ac_save_cc"
CC=$save_CC
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
$as_echo "$ac_cv_kthread" >&6; }
Expand All @@ -8273,7 +8282,7 @@ $as_echo_n "checking whether $CC accepts -pthread... " >&6; }
if ${ac_cv_pthread+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cc="$CC"
save_CC=$CC
CC="$CC -pthread"
if test "$cross_compiling" = yes; then :
ac_cv_pthread=no
Expand Down Expand Up @@ -8304,7 +8313,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

CC="$ac_save_cc"
CC=$save_CC
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
$as_echo "$ac_cv_pthread" >&6; }
Expand All @@ -8317,7 +8326,7 @@ if test ! -z "$CXX"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
ac_save_cxx="$CXX"
save_CXX=$CXX

if test "$ac_cv_kpthread" = "yes"
then
Expand Down Expand Up @@ -8349,7 +8358,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
$as_echo "$ac_cv_cxx_thread" >&6; }
fi
CXX="$ac_save_cxx"
CXX=$save_CXX



Expand Down Expand Up @@ -8595,7 +8604,7 @@ fi

# bluetooth/bluetooth.h has been known to not compile with -std=c99.
# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
SAVE_CFLAGS=$CFLAGS
save_CFLAGS=$CFLAGS
CFLAGS="-std=c99 $CFLAGS"
for ac_header in bluetooth/bluetooth.h
do :
Expand All @@ -8609,7 +8618,7 @@ fi

done

CFLAGS=$SAVE_CFLAGS
CFLAGS=$save_CFLAGS

# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
for ac_header in net/if.h
Expand Down Expand Up @@ -9608,7 +9617,7 @@ _ACEOF


# if have pthread_t then define SIZEOF_PTHREAD_T
ac_save_cc="$CC"
save_CC=$CC
if test "$ac_cv_kpthread" = "yes"
then CC="$CC -Kpthread"
elif test "$ac_cv_kthread" = "yes"
Expand Down Expand Up @@ -9765,7 +9774,7 @@ $as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h

fi

CC="$ac_save_cc"
CC=$save_CC


case $ac_sys_system/$ac_sys_release in
Expand Down Expand Up @@ -12351,7 +12360,7 @@ fi


have_gdbm_dbmliborder=no
as_save_IFS=$IFS
save_IFS=$IFS
IFS=:
for db in $with_dbmliborder; do
case $db in #(
Expand All @@ -12366,7 +12375,7 @@ for db in $with_dbmliborder; do
;;
esac
done
IFS=$as_save_IFS
IFS=$save_IFS
if test "x$with_dbmliborder" = xerror; then :

as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:... (ndbm:gdbm:bdb)" "$LINENO" 5
Expand Down Expand Up @@ -17574,7 +17583,7 @@ if ${ac_cv_x87_double_rounding+:} false; then :
else

# $BASECFLAGS may affect the result
ac_save_cc="$CC"
save_CC=$CC
CC="$CC $BASECFLAGS"
if test "$cross_compiling" = yes; then :
ac_cv_x87_double_rounding=no
Expand Down Expand Up @@ -17611,7 +17620,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

CC="$ac_save_cc"
CC=$save_CC

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
Expand Down Expand Up @@ -19086,7 +19095,7 @@ $as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
fi

# first curses header check
ac_save_cppflags="$CPPFLAGS"
save_CPPFLAGS=$CPPFLAGS
if test "$cross_compiling" = no; then
CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
fi
Expand Down Expand Up @@ -19647,7 +19656,7 @@ fi



CPPFLAGS=$ac_save_cppflags
CPPFLAGS=$save_CPPFLAGS

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
$as_echo "$as_me: checking for device files" >&6;}
Expand Down Expand Up @@ -20933,7 +20942,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF


as_save_IFS=$IFS
save_IFS=$IFS
IFS=,
for builtin_hash in $with_builtin_hashlib_hashes; do
case $builtin_hash in #(
Expand All @@ -20954,7 +20963,7 @@ for builtin_hash in $with_builtin_hashlib_hashes; do
;;
esac
done
IFS=$as_save_IFS
IFS=$save_IFS

# --with-experimental-isolated-subinterpreters

Expand Down
Loading