Lines Matching +full:ipv4 +full:- +full:no +full:- +full:config +full:- +full:for +full:- +full:cpp
15 if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
16 # If we're building out-of-tree, we need to make sure the following
18 # Objects/ -> typeslots.inc
19 # Include/ -> Python-ast.h, graminit.h
20 # Python/ -> importlib.h
22 # regenerated when building out-of-tree, regardless of whether or not
23 # the $srcdir counterpart is up-to-date. This is an acceptable trade
25 BASECPPFLAGS="-IObjects -IInclude -IPython"
34 if test -e $srcdir/.git
36 AC_CHECK_PROG(HAS_GIT, git, found, not-found)
38 HAS_GIT=no-repository
42 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
43 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
44 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
58 # pybuilddir.txt will be created by --generate-posix-vars in the Makefile
59 rm -f pybuilddir.txt
65 AC_MSG_CHECKING([for python interpreter for cross build])
66 if test -z "$PYTHON_FOR_BUILD"; then
67 for interp in python$PACKAGE_VERSION python3 python; do
69 …if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info@<:@:2@:>@) == '$P…
78 …dir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && e…
81 AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
83 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
93 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
96 dnl This is for stuff that absolutely must end up in pyconfig.h.
112 # with other autoconf-based packages that include Python.h
113 grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
125 # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
129 # certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
134 # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
139 # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
150 AC_MSG_CHECKING([for --enable-universalsdk])
152 AS_HELP_STRING([--enable-universalsdk@<:@=SDKDIR@:>@], [Build fat binary against Mac OS X SDK]),
156 # Locate the best usable SDK, see Mac/README for more
158 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
159 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
162 if test ! -d "${enableval}"
170 no)
176 if test ! -d "${UNIVERSALSDK}"
178 AC_MSG_ERROR([--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}])
187 if test -n "${UNIVERSALSDK}"
191 AC_MSG_RESULT(no)
198 # For backward compatibility reasons we prefer to select '32-bit' if available,
200 UNIVERSAL_ARCHS="32-bit"
201 if test "`uname -s`" = "Darwin"
203 if test -n "${UNIVERSALSDK}"
205 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
213 AC_MSG_CHECKING(for --with-universal-archs)
214 AC_ARG_WITH(universal-archs,
215 …LP_STRING([--with-universal-archs=ARCH], [select architectures for universal build ("32-bit", "64-…
220 if test -n "${UNIVERSALSDK}"
224 AC_MSG_RESULT(no)
227 AC_ARG_WITH(framework-name,
228 AS_HELP_STRING([--with-framework-name=FRAMEWORK],
229 … [specify an alternate name of the framework built with --enable-framework]),
233 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
241 … AS_HELP_STRING([--enable-framework@<:@=INSTALLDIR@:>@], [Build (MacOSX|Darwin) framework]),
248 no)
250 PYTHONFRAMEWORKDIR=no-framework
302 # --prefix option, but wants to install
303 # the framework in a non-default location,
318 # Add files for Mac specific code to the list of output
327 PYTHONFRAMEWORKDIR=no-framework
359 ## AS_HELP_STRING([--with-dyld],
362 # Set name for machine-dependent library files
363 AC_ARG_VAR([MACHDEP], [name for machine-dependent library files])
365 if test -z "$MACHDEP"
367 # avoid using uname for cross builds
369 # ac_sys_system and ac_sys_release are used for setting
373 *-*-linux-android*)
374 ac_sys_system=Linux-android
376 *-*-linux*)
379 *-*-cygwin*)
382 *-*-vxworks*)
386 # for now, limit cross builds to known configurations
388 AC_MSG_ERROR([cross build not supported for $host])
392 ac_sys_system=`uname -s`
394 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
395 ac_sys_release=`uname -v`
397 ac_sys_release=`uname -r`
401 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
403 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
419 *-*-linux*)
428 *-*-cygwin*)
431 *-*-vxworks*)
435 # for now, limit cross builds to known configurations
437 AC_MSG_ERROR([cross build not supported for $host])
439 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
444 # features as extensions. For these systems, we skip the definition of
446 # some feature, make sure there is no alternative way to access this
448 # need for not defining _XOPEN_SOURCE on all systems matching the
455 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
459 define_xopen_source=no
474 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
475 define_xopen_source=no;;
479 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
482 define_xopen_source=no;;
485 # Reconfirmed for 7.1.4 by Martin v. Loewis.
486 OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
487 define_xopen_source=no;;
491 define_xopen_source=no;;
498 # has no effect, don't bother defining them
500 define_xopen_source=no;;
501 Darwin/@<:@[12]@:>@@<:@0-9@:>@.*)
502 define_xopen_source=no;;
507 define_xopen_source=no;;
509 if test `uname -r` -eq 1; then
510 define_xopen_source=no
516 define_xopen_source=no
521 define_xopen_source=no
524 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
527 define_xopen_source=no
534 # X/Open 7, incorporating POSIX.1-2008
541 # cases for HP-UX, we define it globally.
543 Define to activate Unix95-and-earlier features)
545 AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008)
548 # On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
553 define_stdc_a1=no;;
558 AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc)
561 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
569 # checks for alternative programs
572 # for debug/optimization stuff. BASECFLAGS is for flags that are required
578 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
580 AC_MSG_ERROR([cached CC is different -- throw away $cache_file
584 # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
585 # when the compiler supports them, but we don't always want -O2, and
586 # we set -g later.
587 if test -z "$CFLAGS"; then
594 # AC_PROG_CC can handle, see Mac/README for more
596 if test -z "${CC}"
601 for as_dir in $PATH
604 if test -x "${as_dir}/gcc"; then
605 if test -z "${found_gcc}"; then
609 if test -x "${as_dir}/clang"; then
610 if test -z "${found_clang}"; then
617 if test -n "$found_gcc" -a -n "$found_clang"
619 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
621 AC_MSG_NOTICE([Detected llvm-gcc, falling back to clang])
627 elif test -z "$found_gcc" -a -n "$found_clang"
629 AC_MSG_NOTICE([No GCC found, use CLANG])
633 elif test -z "$found_gcc" -a -z "$found_clang"
635 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
636 if test -n "${found_clang}"
640 CXX="`/usr/bin/xcrun -find clang++`"
654 AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
656 AS_HELP_STRING([--with-cxx-main=<compiler>],
661 no) with_cxx_main=no
667 if test -z "$CXX"
672 with_cxx_main=no
678 if test -z "$CXX"
691 if test -z "$CXX"
709 MULTIARCH=$($CC --print-multiarch 2>/dev/null)
712 AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
729 x86_64-linux-gnu
731 x86_64-linux-gnux32
733 i386-linux-gnu
736 aarch64_ilp32-linux-gnu
738 aarch64-linux-gnu
742 aarch64_be_ilp32-linux-gnu
744 aarch64_be-linux-gnu
747 alpha-linux-gnu
750 arm-linux-gnueabihf
752 armeb-linux-gnueabihf
756 arm-linux-gnueabi
758 armeb-linux-gnueabi
761 hppa-linux-gnu
763 ia64-linux-gnu
765 m68k-linux-gnu
768 mipsisa32r6el-linux-gnu
770 mipsisa64r6el-linux-gnuabin32
772 mipsisa64r6el-linux-gnuabi64
778 mipsisa32r6-linux-gnu
780 mipsisa64r6-linux-gnuabin32
782 mipsisa64r6-linux-gnuabi64
788 mipsel-linux-gnu
790 mips64el-linux-gnuabin32
792 mips64el-linux-gnuabi64
798 mips-linux-gnu
800 mips64-linux-gnuabin32
802 mips64-linux-gnuabi64
807 or1k-linux-gnu
809 powerpc-linux-gnuspe
812 powerpc64le-linux-gnu
814 powerpc64-linux-gnu
817 powerpc-linux-gnu
819 s390x-linux-gnu
821 s390-linux-gnu
823 sh4-linux-gnu
825 sparc64-linux-gnu
827 sparc-linux-gnu
830 riscv32-linux-gnu
832 riscv64-linux-gnu
841 x86_64-kfreebsd-gnu
843 i386-kfreebsd-gnu
848 i386-gnu
859 if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
860 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
865 rm -f conftest.c conftest.out
869 AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
876 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
880 AC_MSG_CHECKING([for -Wl,--no-as-needed])
882 LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
884 [NO_AS_NEEDED="-Wl,--no-as-needed"
887 AC_MSG_RESULT([no])])
892 # checks for UNIX variants that set C preprocessor variables
895 AC_MSG_CHECKING([for the Android API level])
905 if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
906 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
907 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
909 if test -z "$ANDROID_API_LEVEL"; then
915 AC_MSG_CHECKING([for the Android arm ABI])
918 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
919 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
924 rm -f conftest.c conftest.out
926 # Check for unsupported systems
929 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
930 echo See README for details.
935 AC_MSG_CHECKING(for --with-suffix)
937 AS_HELP_STRING([--with-suffix=.exe], [set executable suffix]),
940 no) EXEEXT=;;
946 # Test whether we're running on a non-case-sensitive system, in which
947 # case we give a warning if no ext is given
949 AC_MSG_CHECKING(for case-insensitive build directory)
950 if test ! -d CaseSensitiveTestDir; then
954 if test -d casesensitivetestdir
959 AC_MSG_RESULT(no)
967 cc|*/cc) CC="$CC -Ae";;
973 if test -z "$LIBRARY"
991 # on the system - some systems like version suffix, others don't
1011 # LINKCC is the command that links the python executable -- default is $(CC).
1015 # This is altered for AIX in order to build the export list before
1019 if test -z "$LINKCC"
1025 if test $ac_sys_release -ge 5 -o \
1026 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
1032 # support -N.
1039 # make sure we default having it set to "no": this is used by
1040 # distutils.unixccompiler to know if it should add --enable-new-dtags
1044 AC_MSG_CHECKING(for GNU ld)
1047 ac_prog=`$CC -print-prog-name=ld`
1049 case `"$ac_prog" -V 2>&1 < /dev/null` in
1053 GNULD=no;;
1057 AC_MSG_CHECKING(for --enable-shared)
1059 AS_HELP_STRING([--enable-shared], [disable/enable building shared python library]))
1061 if test -z "$enable_shared"
1067 enable_shared="no";;
1072 AC_MSG_CHECKING(for --enable-profiling)
1074 AS_HELP_STRING([--enable-profiling], [enable C-level code profiling]))
1077 CC="$CC -pg"
1080 [enable_profiling=no])
1083 enable_profiling=no
1088 BASECFLAGS="-pg $BASECFLAGS"
1089 LDFLAGS="-pg $LDFLAGS"
1096 # will find it with a -framework option). For this reason there is an
1099 # LDLIBRARY, but empty for MacOSX framework builds.
1120 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
1130 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1139 case `uname -m` in
1147 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
1152 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1182 if test -z "$ARFLAGS"
1191 AC_MSG_ERROR([readelf for the host is required for cross builds])
1200 # install -d does not work on HP-UX
1201 if test -z "$INSTALL"
1203 INSTALL="${srcdir}/install-sh -c"
1211 if test -z "$LN" ; then
1213 CYGWIN*) LN="ln -s";;
1218 # For calculating the .so ABI tag.
1222 # Check for --with-pydebug
1223 AC_MSG_CHECKING(for --with-pydebug)
1225 AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined]),
1227 if test "$withval" != no
1230 [Define if you want to build an interpreter with many run-time checks.])
1234 else AC_MSG_RESULT(no); Py_DEBUG='false'
1236 [AC_MSG_RESULT(no)])
1238 # Check for --with-trace-refs
1239 # --with-trace-refs
1240 AC_MSG_CHECKING(for --with-trace-refs)
1241 AC_ARG_WITH(trace-refs,
1242 AS_HELP_STRING([--with-trace-refs],[enable tracing references for debugging purpose]),,
1243 with_trace_refs=no)
1248 …AC_DEFINE(Py_TRACE_REFS, 1, [Define if you want to enable tracing references for debugging purpose…
1251 # Check for --with-assertions.
1254 AC_MSG_CHECKING(for --with-assertions)
1256 AS_HELP_STRING([--with-assertions],[build with C assertions enabled]),
1258 if test "$withval" != no
1267 AC_MSG_RESULT(implied by --with-pydebug)
1269 AC_MSG_RESULT(no)
1276 AC_MSG_CHECKING(for --enable-optimizations)
1277 AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive, stable opt…
1279 if test "$enableval" != no
1285 AC_MSG_RESULT(no);
1287 [AC_MSG_RESULT(no)])
1292 # who want LTO need to use --with-lto themselves.
1293 DEF_MAKE_ALL_RULE="profile-opt"
1298 REQUIRE_PGO="no"
1302 AC_ARG_VAR(PROFILE_TASK, Python args for PGO generation task)
1304 if test -z "$PROFILE_TASK"
1306 PROFILE_TASK='-m test --pgo'
1310 # Make llvm-relatec checks work on systems where llvm tools are not installed with their
1312 # non-suffixed name in their versioned llvm directory.
1321 if test -L "${clang_bin}"
1331 AC_MSG_CHECKING(for --with-lto)
1332 AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [Enable Link Time Optimization in any build. Disabled…
1334 if test "$withval" != no
1340 AC_MSG_RESULT(no);
1342 [AC_MSG_RESULT(no)])
1347 AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
1349 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
1353 LLVM_AR_FOUND="not-found"
1355 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
1357 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
1358 if test -n "${found_llvm_ar}"
1360 LLVM_AR='/usr/bin/xcrun llvm-ar'
1362 AC_MSG_NOTICE([llvm-ar found via xcrun: ${LLVM_AR}])
1365 if test $LLVM_AR_FOUND = not-found
1368 … AC_MSG_ERROR([llvm-ar is required for a --with-lto build with clang but could not be found.])
1370 LLVM_AR_ERR=no
1376 LTOFLAGS="-flto -Wl,-export_dynamic"
1379 LTOFLAGS="-flto"
1386 LTOFLAGS="-flto -Wl,-export_dynamic"
1389 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
1397 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
1399 LTOFLAGS="$LTOFLAGS -g"
1413 AC_PATH_TOOL(LLVM_PROFDATA, llvm-profdata, '', ${llvm_path})
1415 if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
1419 LLVM_PROF_FOUND="not-found"
1421 if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
1423 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
1424 if test -n "${found_llvm_profdata}"
1426 # llvm-profdata isn't directly in $PATH in some cases.
1428 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
1430 AC_MSG_NOTICE([llvm-profdata found via xcrun: ${LLVM_PROFDATA}])
1433 LLVM_PROF_ERR=no
1437 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1438 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1439 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1440 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1441 if test $LLVM_PROF_FOUND = not-found
1446 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1453 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1454 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1455 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1456 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1457 if test "${LLVM_PROF_FOUND}" = "not-found"
1462 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1467 PGO_PROF_GEN_FLAG="-fprofile-generate"
1468 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
1475 PGO_PROF_GEN_FLAG="-prof-gen"
1476 PGO_PROF_USE_FLAG="-prof-use"
1486 # ------------------------
1487 # (The following bit of code is complicated enough - please keep things
1488 # indented properly. Just pretend you're editing Python code. ;-)
1500 if $CC --version 2>&1 | grep -q clang
1512 if test "${OPT-unset}" = "unset"
1516 # For gcc 4.x we need to use -fwrapv so lets check if its supported
1517 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
1518 WRAP="-fwrapv"
1521 if test -n "${cc_is_clang}"
1523 # Clang also needs -fwrapv
1524 WRAP="-fwrapv"
1525 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
1526 # see Makefile.pre.in for more information
1527 CFLAGS_ALIASING="-fno-strict-aliasing"
1533 # Optimization messes up debuggers, so turn it off for
1535 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
1536 OPT="-g -Og -Wall"
1538 OPT="-g -O0 -Wall"
1541 OPT="-g $WRAP -O3 -Wall"
1545 OPT="-O3 -Wall"
1550 SCO_SV*) OPT="$OPT -m486 -DSCO5"
1556 OPT="-O"
1565 # The -arch flags for universal builds on OSX
1572 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
1574 AC_MSG_CHECKING(for -Wextra)
1576 CC="$CC -Wextra -Werror"
1584 ac_cv_extra_warnings=no
1591 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
1595 # GCC produce warnings for legal Python code. Enable
1596 # -fno-strict-aliasing on versions of GCC that support but produce
1598 AC_MSG_CHECKING(whether $CC accepts and needs -fno-strict-aliasing)
1600 CC="$CC -fno-strict-aliasing"
1607 CC="$ac_save_cc -fstrict-aliasing"
1608 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
1614 ac_cv_no_strict_aliasing=no
1619 ac_cv_no_strict_aliasing=no
1626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
1633 ac_cv_disable_unused_result_warning=no
1638 CC="$CC -Wunused-result -Werror"
1647 ac_cv_disable_unused_result_warning=no
1657 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
1658 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
1663 CC="$CC -Wunused-parameter -Werror"
1671 ac_cv_disable_unused_parameter_warning=no
1678 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
1683 CC="$CC -Wmissing-field-initializers -Werror"
1691 ac_cv_disable_missing_field_initializers=no
1698 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
1703 CC="$CC -Wsign-compare"
1712 ac_cv_enable_sign_compare_warning=no
1720 BASECFLAGS="$BASECFLAGS -Wsign-compare"
1725 CC="$CC -Wunreachable-code"
1734 ac_cv_enable_unreachable_code_warning=no
1740 # results in non-standard code paths.
1744 # for clang. Try to determine if the compiler is not really gcc and,
1748 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
1750 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
1752 ac_cv_enable_unreachable_code_warning=no
1756 AC_MSG_CHECKING(if we can turn on $CC strict-prototypes warning)
1758 CC="$CC -Werror -Wstrict-prototypes"
1766 ac_cv_enable_strict_prototypes_warning=no
1773 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
1778 CC="$CC -Werror=implicit-function-declaration"
1786 ac_cv_enable_implicit_function_declaration_error=no
1793 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
1796 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
1801 BASECFLAGS="$BASECFLAGS -mieee"
1807 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
1811 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
1812 # used to be here, but non-Apple gcc doesn't accept them.
1821 CC=gcc-4.0
1822 CPP=cpp-4.0
1831 32-bit)
1832 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
1836 64-bit)
1837 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
1842 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
1843 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1844 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1847 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
1848 LIPO_32BIT_FLAGS="-extract i386"
1849 ARCH_RUN_32BIT="/usr/bin/arch -i386"
1851 intel-32)
1852 UNIVERSAL_ARCH_FLAGS="-arch i386"
1856 intel-64)
1857 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
1861 3-way)
1862 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
1863 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1864 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1867 AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way])
1873 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
1874 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
1875 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
1882 # Calculate an appropriate deployment target for this build:
1884 # features are enabled (such as builtin libedit support for readline)
1896 cur_target_major=`sw_vers -productVersion | \
1897 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
1898 cur_target_minor=`sw_vers -productVersion | \
1899 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
1901 if test ${cur_target_major} -eq 10 && \
1902 test ${cur_target_minor} -ge 3 && \
1903 test ${cur_target_minor} -le 5
1910 all|3-way|intel|64-bit)
1923 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
1942 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
1945 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
1951 # ICC needs -fp-model strict or floats behave badly
1954 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
1961 OPT="-DNDEBUG $OPT"
1973 # options before we can check whether -Kpthread improves anything.
1991 ac_cv_kthread=no
1992 ac_cv_pthread=no
1993 ],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no])
2000 ac_cv_kpthread=no
2002 # -Kpthread, if available, provides the right #defines
2004 # Some compilers won't report that they do not support -Kpthread,
2007 AC_MSG_CHECKING(whether $CC accepts -Kpthread)
2010 CC="$CC -Kpthread"
2024 ]])],[ac_cv_kpthread=yes],[ac_cv_kpthread=no],[ac_cv_kpthread=no])
2029 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
2031 # -Kthread, if available, provides the right #defines
2033 # Some compilers won't report that they do not support -Kthread,
2036 AC_MSG_CHECKING(whether $CC accepts -Kthread)
2039 CC="$CC -Kthread"
2053 ]])],[ac_cv_kthread=yes],[ac_cv_kthread=no],[ac_cv_kthread=no])
2058 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
2060 # -pthread, if available, provides the right #defines
2062 # Some compilers won't report that they do not support -pthread,
2065 AC_MSG_CHECKING(whether $CC accepts -pthread)
2068 CC="$CC -pthread"
2082 ]])],[ac_cv_pthread=yes],[ac_cv_pthread=no],[ac_cv_pthread=no])
2087 # If we have set a CC compiler flag for thread support then
2088 # check if it works for CXX, too.
2089 ac_cv_cxx_thread=no
2090 if test ! -z "$CXX"
2092 AC_MSG_CHECKING(whether $CXX also accepts flags for thread support)
2097 CXX="$CXX -Kpthread"
2101 CXX="$CXX -Kthread"
2105 CXX="$CXX -pthread"
2112 $CXX -c conftest.$ac_ext 2>&5
2113 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
2114 && test -s conftest$ac_exeext && ./conftest$ac_exeext
2118 ac_cv_cxx_thread=no
2120 rm -fr conftest*
2126 dnl # check for ANSI or K&R ("traditional") preprocessor
2127 dnl AC_MSG_CHECKING(for C preprocessor type)
2129 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
2135 # checks for header files
2154 # bluetooth/bluetooth.h has been known to not compile with -std=c99.
2157 CFLAGS="-std=c99 $CFLAGS"
2210 # checks for typedefs
2211 was_it_defined=no
2212 AC_MSG_CHECKING(for clock_t in time.h)
2218 AC_MSG_CHECKING(for makedev)
2229 ],[ac_cv_has_makedev=yes],[ac_cv_has_makedev=no])
2236 AC_MSG_CHECKING(for le64toh)
2245 ],[ac_cv_has_le64toh=yes],[ac_cv_has_le64toh=no])
2252 # Don't use largefile support for GNU/Hurd
2254 use_lfs=no
2272 # Add some code to confdefs.h so that the test for off_t works on SCO
2293 # ANSI C requires sizeof(char) == 1, so no need to check it
2318 if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2319 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
2323 to add some flags for configuration and compilation to enable this mode.
2324 (For Solaris and Linux, the necessary defines are already defined.)])
2327 AC_MSG_RESULT(no)
2342 then CC="$CC -Kpthread"
2344 then CC="$CC -Kthread"
2346 then CC="$CC -pthread"
2349 AC_MSG_CHECKING(for pthread_t)
2350 have_pthread_t=no
2367 if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
2371 [ac_pthread_key_t_is_arithmetic_type=no]
2379 AC_MSG_RESULT(no)
2386 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
2397 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
2401 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
2403 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2404 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2406 gcc_version=`gcc -dumpversion`
2409 LIBTOOL_CRUFT="-lcc_dynamic"
2423 ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
2452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
2453 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2454 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2456 AC_MSG_CHECKING(for --enable-framework)
2459 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
2460 # -F. is needed to allow linking to the framework while
2468 …AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --…
2471 AC_MSG_RESULT(no)
2474 AC_MSG_CHECKING(for dyld)
2478 [Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
2479 dynamic linker (dyld) instead of the old-style (NextStep) dynamic
2481 AC_MSG_RESULT(always on for Darwin)
2484 AC_MSG_RESULT(no)
2497 # -- usually .so, .sl on HP-UX, .dll on Cygwin
2499 if test -z "$SHLIB_SUFFIX"; then
2502 case `uname -m` in
2514 # -- "cc -G" on SunOS 5.x.
2518 if test -z "$LDSHARED"
2522 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2523 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
2527 LDSHARED='$(CC) -shared'
2528 LDCXXSHARED='$(CXX) -shared'
2530 LDSHARED='$(CC) -G'
2531 LDCXXSHARED='$(CXX) -G'
2535 LDSHARED='$(CC) -shared'
2536 LDCXXSHARED='$(CXX) -shared'
2538 LDSHARED='$(CC) -b'
2539 LDCXXSHARED='$(CXX) -b'
2542 LDSHARED='$(CC) -bundle'
2543 LDCXXSHARED='$(CXX) -bundle'
2550 # No framework. Ignore undefined symbols, assuming they come from Python
2551 LDSHARED="$LDSHARED -undefined suppress"
2552 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
2555 LDSHARED='$(CC) -bundle'
2556 LDCXXSHARED='$(CXX) -bundle'
2563 # No framework, use the Python app as bundle-loader
2564 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2565 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2566 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2569 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
2573 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
2575 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
2576 if test ${dep_target_major} -eq 10 && \
2577 test ${dep_target_minor} -le 2
2579 # building for OS X 10.0 through 10.2
2580 LDSHARED='$(CC) -bundle'
2581 LDCXXSHARED='$(CXX) -bundle'
2588 # No framework, use the Python app as bundle-loader
2589 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2590 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2591 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2594 # building for OS X 10.3 and later
2595 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
2596 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
2601 LDSHARED='$(CC) -shared'
2602 LDCXXSHARED='$(CXX) -shared';;
2604 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2606 LDSHARED='$(CC) -shared'
2607 LDCXXSHARED='$(CXX) -shared'
2609 LDSHARED="ld -Bshareable"
2612 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2614 LDSHARED='$(CC) -shared $(CCSHARED)'
2615 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2617 case `uname -r` in
2618 [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
2619 LDSHARED="ld -Bshareable ${LDFLAGS}"
2622 LDSHARED='$(CC) -shared $(CCSHARED)'
2623 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2628 LDSHARED='$(CC) -shared'
2629 LDCXXSHARED='$(CXX) -shared';;
2632 LDSHARED='$(CC) -shared'
2633 LDCXXSHARED='$(CXX) -shared'
2635 LDSHARED='$(CC) -G'
2636 LDCXXSHARED='$(CXX) -G'
2639 LDSHARED='$(CC) -Wl,-G,-Bexport'
2640 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
2642 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
2643 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
2648 LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
2649 BLDSHARED=${BLDSHARED-$LDSHARED}
2651 # library (module) -- this is only needed for a few systems
2653 if test -z "$CCSHARED"
2657 then CCSHARED="-fPIC";
2658 elif test `uname -p` = sparc;
2659 then CCSHARED="-xcode=pic32";
2660 else CCSHARED="-Kpic";
2663 then CCSHARED="-fPIC";
2666 Linux-android*) ;;
2667 Linux*|GNU*) CCSHARED="-fPIC";;
2668 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
2671 then CCSHARED="-fPIC"
2672 else CCSHARED="-KPIC"
2676 then CCSHARED="-fPIC"
2677 else CCSHARED="-Kpic -belf"
2680 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
2685 # the python executable -- this is only needed for a few systems
2687 if test -z "$LINKFORSHARED"
2690 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
2692 LINKFORSHARED="-Wl,-E -Wl,+s";;
2693 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
2694 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
2695 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
2696 # -u libsys_s pulls in all symbols in libsys
2698 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
2701 # small for the default recursion limit. Increase the stack size
2705 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
2712 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
2713 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
2714 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
2716 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2718 LINKFORSHARED="-Wl,--export-dynamic"
2722 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
2724 LINKFORSHARED="-Xlinker --export-dynamic"
2728 if test $enable_shared = "no"
2730 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
2733 # -Wl,-E causes the symbols to be added to the dynamic
2735 # is loaded. -N 2048K causes the stack size to be set
2738 LINKFORSHARED='-Wl,-E -N 2048K';;
2740 LINKFORSHARED='--export-dynamic';;
2761 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
2762 # library (with --enable-shared).
2763 # For platforms on which shared libraries are not allowed to have unresolved
2778 # checks for libraries
2780 AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
2781 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
2783 # checks for uuid.h location
2786 AC_MSG_CHECKING(for uuid_generate_time_safe)
2794 [AC_MSG_RESULT(no)]
2797 # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
2799 AC_MSG_CHECKING(for uuid_create)
2807 [AC_MSG_RESULT(no)]
2810 # Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
2811 # stream in big-endian byte-order
2812 AC_MSG_CHECKING(for uuid_enc_be)
2820 [AC_MSG_RESULT(no)]
2828 # check if we need libintl for locale functions
2831 [Define to 1 if libintl is needed for locale functions.])
2832 LIBS="-lintl $LIBS"])
2834 # checks for system dependent C++ extensions support
2836 AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support)
2842 [Define for AIX if your compiler is a genuine IBM xlC/xlC_r
2843 and you want support for AIX C++ shared extension modules.])
2846 AC_MSG_RESULT(no)
2851 # check for systems that require aligned memory access
2859 for (i=0; i < 16; i++)
2867 [ac_cv_aligned_required=no],
2879 [Define hash algorithm for str, bytes and memoryview.
2882 AC_MSG_CHECKING(for --with-hash-algorithm)
2885 AS_HELP_STRING([--with-hash-algorithm=@<:@fnv|siphash24@:>@],
2903 AC_MSG_CHECKING(for --with-address-sanitizer)
2905 AS_HELP_STRING([--with-address-sanitizer],
2909 BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
2910 LDFLAGS="-fsanitize=address $LDFLAGS"
2912 with_pymalloc="no"
2914 [AC_MSG_RESULT(no)])
2916 AC_MSG_CHECKING(for --with-memory-sanitizer)
2918 AS_HELP_STRING([--with-memory-sanitizer],
2922 BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
2923 LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
2925 with_pymalloc="no"
2927 [AC_MSG_RESULT(no)])
2929 AC_MSG_CHECKING(for --with-undefined-behavior-sanitizer)
2931 AS_HELP_STRING([--with-undefined-behavior-sanitizer],
2935 BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
2936 LDFLAGS="-fsanitize=undefined $LDFLAGS"
2938 [AC_MSG_RESULT(no)])
2940 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2941 AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
2942 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
2944 AC_MSG_CHECKING(for --with-libs)
2946 AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs]),
2951 [AC_MSG_RESULT(no)])
2955 # Check for use of the system expat library
2956 AC_MSG_CHECKING(for --with-system-expat)
2958 … AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]),
2960 [with_system_expat="no"])
2964 # Check for use of the system libffi library
2965 AC_MSG_CHECKING(for --with-system-ffi)
2967 … AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library]),,,)
2973 with_system_ffi="no"
2975 yes|no)
2978 AC_MSG_ERROR([--with-system-ffi accepts no arguments])
2986 AC_MSG_WARN([--with(out)-system-ffi is ignored on this platform])
2991 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
2992 … LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
2998 # Check for use of the system libmpdec library
2999 AC_MSG_CHECKING(for --with-system-libmpdec)
3001 …AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec librar…
3003 [with_system_libmpdec="no"])
3007 # Check whether _decimal should use a coroutine-local or thread-local context
3008 AC_MSG_CHECKING(for --with-decimal-contextvar)
3010 …AS_HELP_STRING([--with-decimal-contextvar], [build _decimal module using a coroutine-local rather …
3014 if test "$with_decimal_contextvar" != "no"
3017 …[Define if you want build the _decimal module using a coroutine-local rather than a thread-local c…
3022 # Check for support for loadable sqlite extensions
3023 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
3024 AC_ARG_ENABLE(loadable-sqlite-extensions,
3025 …AS_HELP_STRING([--enable-loadable-sqlite-extensions], [support loadable extensions in _sqlite modu…
3027 [enable_loadable_sqlite_extensions="no"])
3031 # Check for --with-tcltk-includes=path and --with-tcltk-libs=path
3034 AC_MSG_CHECKING(for --with-tcltk-includes)
3035 AC_ARG_WITH(tcltk-includes,
3036 … AS_HELP_STRING([--with-tcltk-includes='-I...'], [override search for Tcl and Tk include files]),
3040 AC_MSG_CHECKING(for --with-tcltk-libs)
3041 AC_ARG_WITH(tcltk-libs,
3042 AS_HELP_STRING([--with-tcltk-libs='-L...'], [override search for Tcl and Tk libs]),
3050 AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
3059 # Check for --with-dbmliborder
3060 AC_MSG_CHECKING(for --with-dbmliborder)
3062 …AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [order to check db backends for dbm. Valid value …
3066 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3068 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
3071 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3077 # Templates for things AC_DEFINEd more than once.
3078 # For a single AC_DEFINE, no template is needed.
3080 [Define to force use of thread-safe errno, h_errno, and other functions])
3088 CFLAGS="$CFLAGS -D_REENTRANT"
3092 CC="$CC -Kpthread"
3094 CXX="$CXX -Kpthread"
3099 CC="$CC -Kthread"
3101 CXX="$CXX -Kthread"
3106 CC="$CC -pthread"
3108 CXX="$CXX -pthread"
3112 if test ! -z "$withval" -a -d "$withval"
3113 then LDFLAGS="$LDFLAGS -L$withval"
3119 AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h)
3126 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
3130 # Just looking for pthread_create in libpthread is not enough:
3134 LIBS="$LIBS -lpthread"
3135 AC_MSG_CHECKING([for pthread_create in -lpthread])
3151 LIBS="$LIBS -lpthreads"
3155 LIBS="$LIBS -lc_r"
3159 LIBS="$LIBS -lpthread"
3163 LIBS="$LIBS -lcma"
3170 LIBS="$LIBS -lmpc"
3176 if test "$unistd_defines_pthreads" = "no"; then
3185 [Defined for Solaris 2.6 bug in pthread header.])
3206 if (pthread_attr_init(&attr)) exit(-1);
3207 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
3208 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
3212 [ac_cv_pthread_system_supported=no],
3213 [ac_cv_pthread_system_supported=no])
3230 # Check for enable-ipv6
3231 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
3232 AC_MSG_CHECKING([if --enable-ipv6 is specified])
3234 [ --enable-ipv6 Enable ipv6 (with ipv4) support
3235 --disable-ipv6 Disable ipv6 support],
3237 no)
3238 AC_MSG_RESULT(no)
3239 ipv6=no
3256 AC_MSG_RESULT(no)
3257 ipv6=no
3271 AC_MSG_RESULT(no, IPv6 disabled)
3272 ipv6=no
3283 ipv6trylibc=no
3287 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
3311 linux-glibc)
3321 linux-inet6)
3323 if test -d /usr/inet6; then
3327 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
3331 if test -f /etc/netconfig; then
3332 if $GREP -q tcp6 /etc/netconfig; then
3357 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
3377 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
3378 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
3379 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
3385 echo 'Fatal: no $ipv6lib library found. cannot continue.'
3393 AC_MSG_CHECKING(for CAN_RAW_FD_FRAMES)
3400 AC_MSG_RESULT(no)
3403 # Check for --with-doc-strings
3404 AC_MSG_CHECKING(for --with-doc-strings)
3405 AC_ARG_WITH(doc-strings,
3406 AS_HELP_STRING([--with(out)-doc-strings], [disable/enable documentation strings]))
3408 if test -z "$with_doc_strings"
3411 if test "$with_doc_strings" != "no"
3418 # Check for Python-specific malloc support
3419 AC_MSG_CHECKING(for --with-pymalloc)
3421 AS_HELP_STRING([--with(out)-pymalloc], [disable/enable specialized mallocs]))
3423 if test -z "$with_pymalloc"
3427 if test "$with_pymalloc" != "no"
3430 [Define if you want to compile in Python-specific mallocs])
3434 # Check for --with-c-locale-coercion
3435 AC_MSG_CHECKING(for --with-c-locale-coercion)
3436 AC_ARG_WITH(c-locale-coercion,
3437 AS_HELP_STRING([--with(out)-c-locale-coercion],
3438 [disable/enable C locale coercion to a UTF-8 based locale]))
3440 if test -z "$with_c_locale_coercion"
3444 if test "$with_c_locale_coercion" != "no"
3447 [Define if you want to coerce the C locale to a UTF-8 based locale])
3451 # Check for Valgrind support
3452 AC_MSG_CHECKING([for --with-valgrind])
3454 AS_HELP_STRING([--with-valgrind], [Enable Valgrind support]),,
3455 with_valgrind=no)
3457 if test "$with_valgrind" != no; then
3462 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
3465 # Check for DTrace support
3466 AC_MSG_CHECKING(for --with-dtrace)
3468 AS_HELP_STRING([--with(out)-dtrace],[disable/enable DTrace support]),,
3469 with_dtrace=no)
3492 # generation flag '-G'. We check for presence of this flag, rather than
3496 ac_cv_dtrace_link=no
3498 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
3506 # -I${DLINCLDIR} is added to the compile rule for importdl.o
3514 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3518 if test -z "$DYNLOADFILE"
3545 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
3549 if test -z "$MACHDEP_OBJS"
3555 if test -z "$MACHDEP_OBJS"; then
3561 # checks for library functions
3588 # Force lchmod off for Linux. Linux disallows changing the mode of symbolic
3601 # For some functions, having a definition is not sufficient, since
3603 AC_MSG_CHECKING(for chroot)
3607 [AC_MSG_RESULT(no)
3609 AC_MSG_CHECKING(for link)
3613 [AC_MSG_RESULT(no)
3615 AC_MSG_CHECKING(for symlink)
3619 [AC_MSG_RESULT(no)
3621 AC_MSG_CHECKING(for fchdir)
3625 [AC_MSG_RESULT(no)
3627 AC_MSG_CHECKING(for fsync)
3631 [AC_MSG_RESULT(no)
3633 AC_MSG_CHECKING(for fdatasync)
3637 [AC_MSG_RESULT(no)
3639 AC_MSG_CHECKING(for epoll)
3643 [AC_MSG_RESULT(no)
3645 AC_MSG_CHECKING(for epoll_create1)
3649 [AC_MSG_RESULT(no)
3651 AC_MSG_CHECKING(for kqueue)
3658 [AC_MSG_RESULT(no)
3660 AC_MSG_CHECKING(for prlimit)
3667 [AC_MSG_RESULT(no)
3670 AC_MSG_CHECKING(for memfd_create)
3681 [AC_MSG_RESULT(no)
3685 # functions ctermid_r, setgroups in the library, but no prototype
3690 AC_MSG_CHECKING(for ctermid_r)
3696 [AC_MSG_RESULT(no)
3699 AC_CACHE_CHECK([for flock declaration], [ac_cv_flock_decl],
3706 [ac_cv_flock_decl=no]
3718 AC_MSG_CHECKING(for getpagesize)
3724 [AC_MSG_RESULT(no)
3727 AC_MSG_CHECKING(for broken unsetenv)
3731 [AC_MSG_RESULT(no)],
3736 dnl check for true
3739 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
3740 dnl On others, they are in the C library, so we to take no action
3747 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
3759 [ac_cv_have_chflags=no],
3763 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
3769 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
3779 ]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cross])
3782 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
3790 dnl On MacOSX the linker will search for dylibs on the entire linker path
3791 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
3796 dnl The -L/usr/local/lib is needed as wel to get the same compilation
3803 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
3804 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
3817 AC_MSG_CHECKING(for hstrerror)
3823 [AC_MSG_RESULT(no)
3826 AC_MSG_CHECKING(for inet_aton)
3835 [AC_MSG_RESULT(no)
3838 AC_MSG_CHECKING(for inet_pton)
3847 [AC_MSG_RESULT(no)
3851 AC_MSG_CHECKING(for setgroups)
3860 [AC_MSG_RESULT(no)
3863 # check for openpty and forkpty
3867 [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
3868 AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
3873 [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
3874 AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
3878 # check for long file support functions
3902 # We search for both crypt and crypt_r as one or the other may be defined
3903 # This gets us our -lcrypt in LIBS when required on the target platform.
3909 #define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
3921 LIBS="$LIBS -lrt"
3924 [Library needed by timemodule.c: librt may be needed for clock_gettime()])
3940 AC_MSG_CHECKING(for major, minor, and makedev)
3956 AC_MSG_RESULT(no)
3960 # for [no]getaddrinfo in netdb.h.
3961 AC_MSG_CHECKING(for getaddrinfo)
3969 [have_getaddrinfo=no])
3989 for (passive = 0; passive <= 1; passive++) {
3999 for (ai = aitop; ai; ai = ai->ai_next) {
4000 if (ai->ai_addr == NULL ||
4001 ai->ai_addrlen == 0 ||
4002 getnameinfo(ai->ai_addr, ai->ai_addrlen,
4007 switch (ai->ai_family) {
4065 [ac_cv_buggy_getaddrinfo=no],
4069 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
4077 if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
4082 echo ' or you can specify "--disable-ipv6"'.
4091 # checks for structures
4108 AC_MSG_CHECKING(for time.h that defines altzone)
4112 [ac_cv_header_time_altzone=no])
4119 was_it_defined=no
4133 AC_MSG_CHECKING(for addrinfo)
4137 [ac_cv_struct_addrinfo=no]))
4143 AC_MSG_CHECKING(for sockaddr_storage)
4149 [ac_cv_struct_sockaddr_storage=no]))
4155 AC_MSG_CHECKING(for sockaddr_alg)
4162 [ac_cv_struct_sockaddr_alg=no]))
4168 # checks for compiler characteristics
4173 works=no
4174 AC_MSG_CHECKING(for working signed char)
4181 have_prototypes=no
4182 AC_MSG_CHECKING(for prototypes)
4191 works=no
4192 AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
4211 # check for socketpair
4212 AC_MSG_CHECKING(for socketpair)
4219 [AC_MSG_RESULT(no)]
4229 [AC_MSG_RESULT(no)]
4232 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4254 [Define this if you have the 6-arg version of gethostbyname_r().])
4257 AC_MSG_RESULT(no)
4273 [Define this if you have the 5-arg version of gethostbyname_r().])
4276 AC_MSG_RESULT(no)
4290 [Define this if you have the 3-arg version of gethostbyname_r().])
4293 AC_MSG_RESULT(no)
4307 # checks for system services
4310 # Linux requires this for correct f.p. operations
4316 # check for --with-libm=...
4320 *) LIBM=-lm
4322 AC_MSG_CHECKING(for --with-libm=STRING)
4324 AS_HELP_STRING([--with-libm=STRING], [math library]),
4326 if test "$withval" = no
4332 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
4336 # check for --with-libc=...
4338 AC_MSG_CHECKING(for --with-libc=STRING)
4340 AS_HELP_STRING([--with-libc=STRING], [C library]),
4342 if test "$withval" = no
4348 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
4353 # * Check for gcc x64 inline assembler *
4356 AC_MSG_CHECKING(for x64 gcc inline assembler)
4359 ]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
4368 # * Check for various properties of floating point *
4375 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4377 elif test "$ax_cv_c_float_words_bigendian" = "no"
4380 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4383 # Some ARM platforms use a mixed-endian representation for doubles.
4384 # While Python doesn't currently have full support for these platforms
4385 # (see e.g., issue 1762561), we can at least make sure that float <-> string
4390 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4391 in ARM mixed-endian order (byte order 45670123)])
4395 # correctly-rounded string <-> double conversion functions from
4396 # Python/dtoa.c, which in turn require that the FPU uses 53-bit
4398 # rounding precision of 64 bits. For gcc/x86, we can fix this by
4401 # This inline assembler syntax may also work for suncc and icc,
4409 ]])],[have_gcc_asm_for_x87=yes],[have_gcc_asm_for_x87=no])
4422 ]])],[have_gcc_asm_for_mc68881=yes],[have_gcc_asm_for_mc68881=no])
4430 # Detect whether system arithmetic is subject to x87-style double
4433 # mode is round-to-nearest and double rounding issues are present, and
4434 # 0 otherwise. See http://bugs.python.org/issue2937 for more info.
4435 AC_MSG_CHECKING(for x87-style double rounding)
4444 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
4445 x = 0.99999999999999989; /* 1-2**-53 */
4449 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
4459 [ac_cv_x87_double_rounding=no],
4461 [ac_cv_x87_double_rounding=no])
4467 [Define if arithmetic is subject to x87-style double rounding issue])
4471 # * Check for mathematical functions *
4481 # For multiprocessing module, check that sem_open
4482 # actually works. For FreeBSD versions <= 7.2,
4507 [ac_cv_posix_semaphores_enabled=no],
4511 if test $ac_cv_posix_semaphores_enabled = no
4517 # Multiprocessing check for broken sem_getvalue
4518 AC_MSG_CHECKING(for broken sem_getvalue)
4539 return res==-1 ? 1 : 0;
4542 [ac_cv_broken_sem_getvalue=no],
4555 # determine what size digit to use for Python's longs
4556 AC_MSG_CHECKING([digit size for Python's longs])
4557 AC_ARG_ENABLE(big-digits,
4558 AS_HELP_STRING([--enable-big-digits@<:@=BITS@:>@],[use big digits for Python longs [[BITS=30]]]),
4562 no)
4567 AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;;
4572 [AC_MSG_RESULT(no value specified)])
4574 # check for wchar.h
4580 wchar_h="no"
4589 AC_MSG_CHECKING(for UCS-4 tcl)
4590 have_ucs4_tcl=no
4612 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
4616 [ac_cv_wchar_t_signed=no],
4623 if test "$ac_cv_sizeof_wchar_t" -ge 2 \
4624 -a "$ac_cv_wchar_t_signed" = "no"
4632 AC_MSG_RESULT(no)
4635 # check for endianness
4638 # ABI version string for Python extension modules. This appears between the
4643 # * The Python implementation (always 'cpython-' for us)
4645 # * --with-pydebug (adds a 'd')
4647 # Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
4648 # would get a shared library ABI version tag of 'cpython-32dmu' and shared
4649 # libraries would be named 'foo.cpython-32dmu.so'.
4651 # In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
4652 # In Python 3.7 and older, --with-pymalloc added a 'm' flag.
4657 SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
4661 if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
4664 …ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATF…
4683 if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
4684 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
4692 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
4694 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
4705 exit(((-1)>>3 == -1) ? 0 : 1);
4709 [ac_cv_rshift_extends_sign=no],
4712 if test "$ac_cv_rshift_extends_sign" = no
4715 [Define if i>>j for signed int i does not extend the sign bit
4719 # check for getc_unlocked and related locking functions
4720 AC_MSG_CHECKING(for getc_unlocked() and friends)
4727 ]])],[ac_cv_have_getc_unlocked=yes],[ac_cv_have_getc_unlocked=no])])
4742 py_cv_lib_readline=no
4744 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
4745 if test -z "$py_libtermcap"; then
4746 READLINE_LIBS="-lreadline"
4748 READLINE_LIBS="-lreadline -l$py_libtermcap"
4760 if test $py_cv_lib_readline = no; then
4765 [Define if you have the readline library (-lreadline).])
4768 # check for readline 2.2
4771 [have_readline=no]
4785 # check for readline 4.0
4800 # check for readline 4.2
4808 [have_readline=no]
4825 AC_MSG_CHECKING(for broken nice())
4833 if (val1 != -1 && val1 == nice(2))
4839 [ac_cv_broken_nice=no],
4840 [ac_cv_broken_nice=no])])
4848 AC_MSG_CHECKING(for broken poll())
4870 [ac_cv_broken_poll=no],
4871 [ac_cv_broken_poll=no]))
4880 AC_MSG_CHECKING(for working tzset())
4897 tm->tm_zone does not exist since it is the alternative way
4904 time_t groundhogday = 1044144000; /* GMT-based */
4909 if (localtime(&groundhogday)->tm_hour != 0)
4912 /* For UTC, tzname[1] is sometimes "", sometimes " " */
4920 if (localtime(&groundhogday)->tm_hour != 19)
4927 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
4929 if (localtime(&groundhogday)->tm_hour != 11)
4937 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
4939 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
4947 [ac_cv_working_tzset=no],
4948 [ac_cv_working_tzset=no])])
4956 # Look for subsecond timestamps in struct stat
4957 AC_MSG_CHECKING(for tv_nsec in struct stat)
4964 [ac_cv_stat_tv_nsec=no]))
4972 # Look for BSD style subsecond timestamps in struct stat
4973 AC_MSG_CHECKING(for tv_nsec2 in struct stat)
4980 [ac_cv_stat_tv_nsec2=no]))
4990 if test "$cross_compiling" = no; then
4991 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
5011 [ac_cv_mvwdelch_is_expression=no]))
5031 w->_flags = 0;
5034 [ac_cv_window_has_flags=no]))
5044 AC_MSG_CHECKING(for is_pad)
5052 [AC_MSG_RESULT(no)]
5055 AC_MSG_CHECKING(for is_term_resized)
5059 [AC_MSG_RESULT(no)]
5062 AC_MSG_CHECKING(for resize_term)
5066 [AC_MSG_RESULT(no)]
5069 AC_MSG_CHECKING(for resizeterm)
5073 [AC_MSG_RESULT(no)]
5076 AC_MSG_CHECKING(for immedok)
5084 [AC_MSG_RESULT(no)]
5087 AC_MSG_CHECKING(for syncok)
5095 [AC_MSG_RESULT(no)]
5098 AC_MSG_CHECKING(for wchgat)
5106 [AC_MSG_RESULT(no)]
5109 AC_MSG_CHECKING(for filter)
5117 [AC_MSG_RESULT(no)]
5120 AC_MSG_CHECKING(for has_key)
5128 [AC_MSG_RESULT(no)]
5131 AC_MSG_CHECKING(for typeahead)
5139 [AC_MSG_RESULT(no)]
5142 AC_MSG_CHECKING(for use_env)
5150 [AC_MSG_RESULT(no)]
5155 AC_MSG_NOTICE([checking for device files])
5160 AC_MSG_CHECKING([for /dev/ptmx])
5162 AC_MSG_ERROR([set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling])
5165 AC_MSG_CHECKING([for /dev/ptc])
5167 AC_MSG_ERROR([set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling])
5184 LIBS="$LIBS -framework CoreFoundation"
5187 AC_CACHE_CHECK([for %zd printf() format support], ac_cv_have_size_t_format, [dnl
5215 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
5218 if (strcmp(buffer, "-123"))
5225 [ac_cv_have_size_t_format=no],
5226 [ac_cv_have_size_t_format="cross -- assuming yes"
5228 if test "$ac_cv_have_size_t_format" != no ; then
5230 [Define to printf format modifier for Py_ssize_t])
5244 AC_MSG_CHECKING(for broken mbstowcs)
5250 size_t len = -1;
5256 [ac_cv_broken_mbstowcs=no],
5258 [ac_cv_broken_mbstowcs=no]))
5267 # Check for --with-computed-gotos
5268 AC_MSG_CHECKING(for --with-computed-gotos)
5269 AC_ARG_WITH(computed-gotos,
5270 AS_HELP_STRING([--with(out)-computed-gotos],
5279 if test "$withval" = no
5283 AC_MSG_RESULT(no)
5286 [AC_MSG_RESULT(no value specified)])
5303 [ac_cv_computed_gotos=no],
5305 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
5307 ac_cv_computed_gotos=no
5323 for h in `(cd $srcdir;echo Python/thread_*.h)`
5330 AC_MSG_CHECKING(for build directories)
5331 for dir in $SRCDIRS; do
5332 if test ! -d $dir; then
5338 # Availability of -O2:
5339 AC_MSG_CHECKING(for -O2)
5341 CFLAGS="-O2"
5343 ]])],[have_O2=yes],[have_O2=no])
5347 # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
5348 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
5349 AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
5351 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
5352 if test "$have_O2" = no; then
5371 [have_glibc_memmove_bug=no],
5379 for memmove and bcopy.])
5385 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
5388 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
5390 CFLAGS="-O2"
5408 [have_ipa_pure_const_bug=no],
5415 [Define if gcc has the ipa-pure-const bug.])
5421 # Check for stdatomic.h
5422 AC_MSG_CHECKING(for stdatomic.h)
5436 ],[have_stdatomic_h=yes],[have_stdatomic_h=no])
5445 # Check for GCC >= 4.7 __atomic builtins
5446 AC_MSG_CHECKING(for GCC >= 4.7 __atomic builtins)
5456 ],[have_builtin_atomic=yes],[have_builtin_atomic=no])
5465 AC_MSG_CHECKING(for ensurepip)
5467 [AS_HELP_STRING([--with(out)-ensurepip=@<:@=upgrade@:>@],
5474 [no],[ENSUREPIP=no],
5475 [AC_MSG_ERROR([--with-ensurepip=upgrade|install|no])])
5491 ],[have_dirent_d_type=yes],[have_dirent_d_type=no])
5500 AC_MSG_CHECKING(for the Linux getrandom() syscall)
5512 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
5517 ],[have_getrandom_syscall=yes],[have_getrandom_syscall=no])
5526 # the test was written for the Solaris function of <sys/random.h>
5527 AC_MSG_CHECKING(for the getrandom() function)
5537 /* ignore the result, Python checks for ENOSYS at runtime */
5542 ],[have_getrandom=yes],[have_getrandom=no])
5550 # checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
5555 if test "$ac_cv_search_shm_open" = "-lrt"; then
5557 [Define to 1 if you must link with -lrt for shm_open().])
5560 # temporarily override ac_includes_default for AC_CHECK_FUNCS below
5574 # Check for usable OpenSSL
5575 AX_CHECK_OPENSSL([have_openssl=yes],[have_openssl=no])
5578 AC_MSG_CHECKING([for X509_VERIFY_PARAM_set1_host in libssl])
5600 ac_cv_has_x509_verify_param_set1_host=no
5615 [Default cipher suites list for ssl module.
5618 [Cipher suite string for PY_SSL_DEFAULT_CIPHERS=0]
5621 AC_MSG_CHECKING(for --with-ssl-default-suites)
5622 AC_ARG_WITH(ssl-default-suites,
5623 AS_HELP_STRING([--with-ssl-default-suites=@<:@python|openssl|STRING@:>@],
5651 AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
5656 if test ! -f Modules/Setup.local
5658 echo "# Edit this file for local setup changes" >Modules/Setup.local
5662 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
5663 -s Modules \
5665 mv config.c Modules
5667 if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
5671 echo "please run ./configure --enable-optimizations" >&AS_MESSAGE_FD