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@:>@],
155 see Mac/README.rst. (default is no)]),
159 # Locate the best usable SDK, see Mac/README for more
161 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
162 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
165 if test ! -d "${enableval}"
173 no)
179 if test ! -d "${UNIVERSALSDK}"
181 AC_MSG_ERROR([--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}])
190 if test -n "${UNIVERSALSDK}"
194 AC_MSG_RESULT(no)
201 # For backward compatibility reasons we prefer to select '32-bit' if available,
203 UNIVERSAL_ARCHS="32-bit"
204 if test "`uname -s`" = "Darwin"
206 if test -n "${UNIVERSALSDK}"
208 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
216 AC_MSG_CHECKING(for --with-universal-archs)
217 AC_ARG_WITH(universal-archs,
218 AS_HELP_STRING([--with-universal-archs=ARCH],
220 only valid when --enable-universalsdk is set; options are:
221 … ("universal2", "32-bit", "64-bit", "3-way", "intel", "intel-32", "intel-64", or "all")
227 if test -n "${UNIVERSALSDK}"
231 AC_MSG_RESULT(no)
234 AC_ARG_WITH(framework-name,
235 AS_HELP_STRING([--with-framework-name=FRAMEWORK],
236 [specify the name for the python framework on macOS
237 only valid when --enable-framework is set. see Mac/README.rst
242 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
250 AS_HELP_STRING([--enable-framework@<:@=INSTALLDIR@:>@],
253 (default is no)]),
260 no)
262 PYTHONFRAMEWORKDIR=no-framework
314 # --prefix option, but wants to install
315 # the framework in a non-default location,
330 # Add files for Mac specific code to the list of output
339 PYTHONFRAMEWORKDIR=no-framework
371 ## AS_HELP_STRING([--with-dyld],
374 # Set name for machine-dependent library files
375 AC_ARG_VAR([MACHDEP], [name for machine-dependent library files])
377 if test -z "$MACHDEP"
379 # avoid using uname for cross builds
381 # ac_sys_system and ac_sys_release are used for setting
385 *-*-linux-android*)
386 ac_sys_system=Linux-android
388 *-*-linux*)
391 *-*-cygwin*)
394 *-*-vxworks*)
398 # for now, limit cross builds to known configurations
400 AC_MSG_ERROR([cross build not supported for $host])
404 ac_sys_system=`uname -s`
406 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
407 ac_sys_release=`uname -v`
409 ac_sys_release=`uname -r`
413 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
415 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
431 *-*-linux*)
440 *-*-cygwin*)
443 *-*-vxworks*)
447 # for now, limit cross builds to known configurations
449 AC_MSG_ERROR([cross build not supported for $host])
451 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
456 # features as extensions. For these systems, we skip the definition of
458 # some feature, make sure there is no alternative way to access this
460 # need for not defining _XOPEN_SOURCE on all systems matching the
467 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
471 define_xopen_source=no
486 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
487 define_xopen_source=no;;
491 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
494 define_xopen_source=no;;
497 # Reconfirmed for 7.1.4 by Martin v. Loewis.
498 OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
499 define_xopen_source=no;;
503 define_xopen_source=no;;
510 # has no effect, don't bother defining them
512 define_xopen_source=no;;
513 Darwin/@<:@[12]@:>@@<:@0-9@:>@.*)
514 define_xopen_source=no;;
519 define_xopen_source=no;;
521 if test `uname -r` -eq 1; then
522 define_xopen_source=no
528 define_xopen_source=no
533 define_xopen_source=no
536 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
539 define_xopen_source=no
546 # X/Open 7, incorporating POSIX.1-2008
553 # cases for HP-UX, we define it globally.
555 Define to activate Unix95-and-earlier features)
557 AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008)
560 # On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
565 define_stdc_a1=no;;
570 AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc)
573 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
581 # checks for alternative programs
584 # for debug/optimization stuff. BASECFLAGS is for flags that are required
590 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
592 AC_MSG_ERROR([cached CC is different -- throw away $cache_file
596 # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
597 # when the compiler supports them, but we don't always want -O2, and
598 # we set -g later.
599 if test -z "$CFLAGS"; then
606 # AC_PROG_CC can handle, see Mac/README for more
608 if test -z "${CC}"
613 for as_dir in $PATH
616 if test -x "${as_dir}/gcc"; then
617 if test -z "${found_gcc}"; then
621 if test -x "${as_dir}/clang"; then
622 if test -z "${found_clang}"; then
629 if test -n "$found_gcc" -a -n "$found_clang"
631 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
633 AC_MSG_NOTICE([Detected llvm-gcc, falling back to clang])
639 elif test -z "$found_gcc" -a -n "$found_clang"
641 AC_MSG_NOTICE([No GCC found, use CLANG])
645 elif test -z "$found_gcc" -a -z "$found_clang"
647 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
648 if test -n "${found_clang}"
652 CXX="`/usr/bin/xcrun -find clang++`"
666 AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
668 AS_HELP_STRING([--with-cxx-main@<:@=COMPILER@:>@],
673 no) with_cxx_main=no
679 if test -z "$CXX"
684 with_cxx_main=no
690 if test -z "$CXX"
703 if test -z "$CXX"
721 MULTIARCH=$($CC --print-multiarch 2>/dev/null)
724 AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
741 x86_64-linux-gnu
743 x86_64-linux-gnux32
745 i386-linux-gnu
748 aarch64_ilp32-linux-gnu
750 aarch64-linux-gnu
754 aarch64_be_ilp32-linux-gnu
756 aarch64_be-linux-gnu
759 alpha-linux-gnu
762 arm-linux-gnueabihf
764 armeb-linux-gnueabihf
768 arm-linux-gnueabi
770 armeb-linux-gnueabi
773 hppa-linux-gnu
775 ia64-linux-gnu
777 m68k-linux-gnu
780 mipsisa32r6el-linux-gnu
782 mipsisa64r6el-linux-gnuabin32
784 mipsisa64r6el-linux-gnuabi64
790 mipsisa32r6-linux-gnu
792 mipsisa64r6-linux-gnuabin32
794 mipsisa64r6-linux-gnuabi64
800 mipsel-linux-gnu
802 mips64el-linux-gnuabin32
804 mips64el-linux-gnuabi64
810 mips-linux-gnu
812 mips64-linux-gnuabin32
814 mips64-linux-gnuabi64
819 or1k-linux-gnu
821 powerpc-linux-gnuspe
824 powerpc64le-linux-gnu
826 powerpc64-linux-gnu
829 powerpc-linux-gnu
831 s390x-linux-gnu
833 s390-linux-gnu
835 sh4-linux-gnu
837 sparc64-linux-gnu
839 sparc-linux-gnu
842 riscv32-linux-gnu
844 riscv64-linux-gnu
853 x86_64-kfreebsd-gnu
855 i386-kfreebsd-gnu
860 i386-gnu
871 if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
872 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
877 rm -f conftest.c conftest.out
881 AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
888 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
892 AC_MSG_CHECKING([for -Wl,--no-as-needed])
894 LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
896 [NO_AS_NEEDED="-Wl,--no-as-needed"
899 AC_MSG_RESULT([no])])
904 # checks for UNIX variants that set C preprocessor variables
907 AC_MSG_CHECKING([for the Android API level])
917 if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
918 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
919 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
921 if test -z "$ANDROID_API_LEVEL"; then
927 AC_MSG_CHECKING([for the Android arm ABI])
930 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
931 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
936 rm -f conftest.c conftest.out
938 # Check for unsupported systems
941 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
942 echo See README for details.
947 AC_MSG_CHECKING(for --with-suffix)
949 … AS_HELP_STRING([--with-suffix=SUFFIX], [set executable suffix to SUFFIX (default is '.exe')]),
952 no) EXEEXT=;;
958 # Test whether we're running on a non-case-sensitive system, in which
959 # case we give a warning if no ext is given
961 AC_MSG_CHECKING(for case-insensitive build directory)
962 if test ! -d CaseSensitiveTestDir; then
966 if test -d casesensitivetestdir
971 AC_MSG_RESULT(no)
979 cc|*/cc) CC="$CC -Ae";;
985 if test -z "$LIBRARY"
1003 # on the system - some systems like version suffix, others don't
1023 # LINKCC is the command that links the python executable -- default is $(CC).
1029 if test -z "$LINKCC"
1035 # support -N.
1041 # EXPORTSYMS holds the list of exported symbols for AIX.
1051 if test $ac_sys_release -ge 5 -o \
1052 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
1060 # make sure we default having it set to "no": this is used by
1061 # distutils.unixccompiler to know if it should add --enable-new-dtags
1065 AC_MSG_CHECKING(for GNU ld)
1068 ac_prog=`$CC -print-prog-name=ld`
1070 case `"$ac_prog" -V 2>&1 < /dev/null` in
1074 GNULD=no;;
1078 AC_MSG_CHECKING(for --enable-shared)
1080 … AS_HELP_STRING([--enable-shared], [enable building a shared Python library (default is no)]))
1082 if test -z "$enable_shared"
1088 enable_shared="no";;
1093 AC_MSG_CHECKING(for --enable-profiling)
1095 … AS_HELP_STRING([--enable-profiling], [enable C-level code profiling with gprof (default is no)]))
1098 CC="$CC -pg"
1101 [enable_profiling=no])
1104 enable_profiling=no
1109 BASECFLAGS="-pg $BASECFLAGS"
1110 LDFLAGS="-pg $LDFLAGS"
1117 # will find it with a -framework option). For this reason there is an
1120 # LDLIBRARY, but empty for MacOSX framework builds.
1141 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
1151 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1160 case `uname -m` in
1168 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
1173 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1203 if test -z "$ARFLAGS"
1212 AC_MSG_ERROR([readelf for the host is required for cross builds])
1221 # install -d does not work on HP-UX
1222 if test -z "$INSTALL"
1224 INSTALL="${srcdir}/install-sh -c"
1232 if test -z "$LN" ; then
1234 CYGWIN*) LN="ln -s";;
1239 # For calculating the .so ABI tag.
1243 # Check for --with-pydebug
1244 AC_MSG_CHECKING(for --with-pydebug)
1246 AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined (default is no)]),
1248 if test "$withval" != no
1251 [Define if you want to build an interpreter with many run-time checks.])
1255 else AC_MSG_RESULT(no); Py_DEBUG='false'
1257 [AC_MSG_RESULT(no)])
1259 # Check for --with-trace-refs
1260 # --with-trace-refs
1261 AC_MSG_CHECKING(for --with-trace-refs)
1262 AC_ARG_WITH(trace-refs,
1264 [--with-trace-refs],
1265 [enable tracing references for debugging purpose (default is no)]),,
1266 with_trace_refs=no)
1271 …AC_DEFINE(Py_TRACE_REFS, 1, [Define if you want to enable tracing references for debugging purpose…
1274 # Check for --with-assertions.
1277 AC_MSG_CHECKING(for --with-assertions)
1279 AS_HELP_STRING([--with-assertions],[build with C assertions enabled (default is no)]),
1281 if test "$withval" != no
1290 AC_MSG_RESULT(implied by --with-pydebug)
1292 AC_MSG_RESULT(no)
1299 AC_MSG_CHECKING(for --enable-optimizations)
1301 [--enable-optimizations],
1302 [enable expensive, stable optimizations (PGO, etc.) (default is no)]),
1304 if test "$enableval" != no
1310 AC_MSG_RESULT(no);
1312 [AC_MSG_RESULT(no)])
1317 # who want LTO need to use --with-lto themselves.
1318 DEF_MAKE_ALL_RULE="profile-opt"
1323 REQUIRE_PGO="no"
1327 AC_ARG_VAR(PROFILE_TASK, Python args for PGO generation task)
1329 if test -z "$PROFILE_TASK"
1331 PROFILE_TASK='-m test --pgo'
1335 # Make llvm-relatec checks work on systems where llvm tools are not installed with their
1337 # non-suffixed name in their versioned llvm directory.
1346 if test -L "${clang_bin}"
1356 AC_MSG_CHECKING(for --with-lto)
1357 AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [enable Link-Time-Optimization in any build (default …
1359 if test "$withval" != no
1365 AC_MSG_RESULT(no);
1367 [AC_MSG_RESULT(no)])
1372 AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
1374 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
1378 LLVM_AR_FOUND="not-found"
1380 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
1382 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
1383 if test -n "${found_llvm_ar}"
1385 LLVM_AR='/usr/bin/xcrun llvm-ar'
1387 AC_MSG_NOTICE([llvm-ar found via xcrun: ${LLVM_AR}])
1390 if test $LLVM_AR_FOUND = not-found
1393 … AC_MSG_ERROR([llvm-ar is required for a --with-lto build with clang but could not be found.])
1395 LLVM_AR_ERR=no
1401 LTOFLAGS="-flto -Wl,-export_dynamic"
1404 LTOFLAGS="-flto"
1411 LTOFLAGS="-flto -Wl,-export_dynamic"
1414 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
1422 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
1424 LTOFLAGS="$LTOFLAGS -g"
1438 AC_PATH_TOOL(LLVM_PROFDATA, llvm-profdata, '', ${llvm_path})
1440 if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
1444 LLVM_PROF_FOUND="not-found"
1446 if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
1448 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
1449 if test -n "${found_llvm_profdata}"
1451 # llvm-profdata isn't directly in $PATH in some cases.
1453 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
1455 AC_MSG_NOTICE([llvm-profdata found via xcrun: ${LLVM_PROFDATA}])
1458 LLVM_PROF_ERR=no
1462 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1463 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1464 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1465 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1466 if test $LLVM_PROF_FOUND = not-found
1471 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1478 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1479 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1480 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1481 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1482 if test "${LLVM_PROF_FOUND}" = "not-found"
1487 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1492 PGO_PROF_GEN_FLAG="-fprofile-generate"
1493 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
1500 PGO_PROF_GEN_FLAG="-prof-gen"
1501 PGO_PROF_USE_FLAG="-prof-use"
1511 # ------------------------
1512 # (The following bit of code is complicated enough - please keep things
1513 # indented properly. Just pretend you're editing Python code. ;-)
1525 if $CC --version 2>&1 | grep -q clang
1537 if test "${OPT-unset}" = "unset"
1541 # For gcc 4.x we need to use -fwrapv so lets check if its supported
1542 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
1543 WRAP="-fwrapv"
1546 if test -n "${cc_is_clang}"
1548 # Clang also needs -fwrapv
1549 WRAP="-fwrapv"
1550 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
1551 # see Makefile.pre.in for more information
1552 CFLAGS_ALIASING="-fno-strict-aliasing"
1558 # Optimization messes up debuggers, so turn it off for
1560 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
1561 OPT="-g -Og -Wall"
1563 OPT="-g -O0 -Wall"
1566 OPT="-g $WRAP -O3 -Wall"
1570 OPT="-O3 -Wall"
1575 SCO_SV*) OPT="$OPT -m486 -DSCO5"
1581 OPT="-O"
1590 # The -arch flags for universal builds on macOS
1597 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
1599 AC_MSG_CHECKING(for -Wextra)
1601 CC="$CC -Wextra -Werror"
1609 ac_cv_extra_warnings=no
1616 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
1620 # GCC produce warnings for legal Python code. Enable
1621 # -fno-strict-aliasing on versions of GCC that support but produce
1623 AC_MSG_CHECKING(whether $CC accepts and needs -fno-strict-aliasing)
1625 CC="$CC -fno-strict-aliasing"
1632 CC="$ac_save_cc -fstrict-aliasing"
1633 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
1639 ac_cv_no_strict_aliasing=no
1644 ac_cv_no_strict_aliasing=no
1651 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
1658 ac_cv_disable_unused_result_warning=no
1663 CC="$CC -Wunused-result -Werror"
1672 ac_cv_disable_unused_result_warning=no
1682 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
1683 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
1688 CC="$CC -Wunused-parameter -Werror"
1696 ac_cv_disable_unused_parameter_warning=no
1703 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
1708 CC="$CC -Wmissing-field-initializers -Werror"
1716 ac_cv_disable_missing_field_initializers=no
1723 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
1728 CC="$CC -Wsign-compare"
1737 ac_cv_enable_sign_compare_warning=no
1745 BASECFLAGS="$BASECFLAGS -Wsign-compare"
1750 CC="$CC -Wunreachable-code"
1759 ac_cv_enable_unreachable_code_warning=no
1765 # results in non-standard code paths.
1769 # for clang. Try to determine if the compiler is not really gcc and,
1773 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
1775 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
1777 ac_cv_enable_unreachable_code_warning=no
1781 AC_MSG_CHECKING(if we can turn on $CC strict-prototypes warning)
1783 CC="$CC -Werror -Wstrict-prototypes"
1791 ac_cv_enable_strict_prototypes_warning=no
1798 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
1803 CC="$CC -Werror=implicit-function-declaration"
1811 ac_cv_enable_implicit_function_declaration_error=no
1818 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
1823 CC="$CC -fvisibility=hidden"
1831 ac_cv_enable_visibility=no
1838 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
1841 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
1846 BASECFLAGS="$BASECFLAGS -mieee"
1852 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
1856 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
1857 # used to be here, but non-Apple gcc doesn't accept them.
1866 CC=gcc-4.0
1867 CPP=cpp-4.0
1876 32-bit)
1877 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
1881 64-bit)
1882 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
1887 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
1888 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1889 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1892 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
1897 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
1898 LIPO_32BIT_FLAGS="-extract i386"
1899 ARCH_RUN_32BIT="/usr/bin/arch -i386"
1901 intel-32)
1902 UNIVERSAL_ARCH_FLAGS="-arch i386"
1906 intel-64)
1907 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
1911 3-way)
1912 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
1913 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1914 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1917 … AC_MSG_ERROR([proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way])
1923 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
1924 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
1925 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
1932 # Calculate an appropriate deployment target for this build:
1934 # features are enabled (such as builtin libedit support for readline)
1946 cur_target_major=`sw_vers -productVersion | \
1947 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
1948 cur_target_minor=`sw_vers -productVersion | \
1949 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
1951 if test ${cur_target_major} -eq 10 && \
1952 test ${cur_target_minor} -ge 3 && \
1953 test ${cur_target_minor} -le 5
1960 all|3-way|intel|64-bit)
1973 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
1987 [AC_MSG_RESULT(no)
1988 AC_MSG_ERROR(check config.log and use the '--with-universal-archs' option)
1999 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
2002 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
2010 # ICC needs -fp-model strict or floats behave badly
2011 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
2014 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
2021 OPT="-DNDEBUG $OPT"
2033 # options before we can check whether -Kpthread improves anything.
2051 ac_cv_kthread=no
2052 ac_cv_pthread=no
2053 ],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no])
2060 ac_cv_kpthread=no
2062 # -Kpthread, if available, provides the right #defines
2064 # Some compilers won't report that they do not support -Kpthread,
2067 AC_MSG_CHECKING(whether $CC accepts -Kpthread)
2070 CC="$CC -Kpthread"
2084 ]])],[ac_cv_kpthread=yes],[ac_cv_kpthread=no],[ac_cv_kpthread=no])
2089 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
2091 # -Kthread, if available, provides the right #defines
2093 # Some compilers won't report that they do not support -Kthread,
2096 AC_MSG_CHECKING(whether $CC accepts -Kthread)
2099 CC="$CC -Kthread"
2113 ]])],[ac_cv_kthread=yes],[ac_cv_kthread=no],[ac_cv_kthread=no])
2118 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
2120 # -pthread, if available, provides the right #defines
2122 # Some compilers won't report that they do not support -pthread,
2125 AC_MSG_CHECKING(whether $CC accepts -pthread)
2128 CC="$CC -pthread"
2142 ]])],[ac_cv_pthread=yes],[ac_cv_pthread=no],[ac_cv_pthread=no])
2147 # If we have set a CC compiler flag for thread support then
2148 # check if it works for CXX, too.
2149 ac_cv_cxx_thread=no
2150 if test ! -z "$CXX"
2152 AC_MSG_CHECKING(whether $CXX also accepts flags for thread support)
2157 CXX="$CXX -Kpthread"
2161 CXX="$CXX -Kthread"
2165 CXX="$CXX -pthread"
2172 $CXX -c conftest.$ac_ext 2>&5
2173 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
2174 && test -s conftest$ac_exeext && ./conftest$ac_exeext
2178 ac_cv_cxx_thread=no
2180 rm -fr conftest*
2186 dnl # check for ANSI or K&R ("traditional") preprocessor
2187 dnl AC_MSG_CHECKING(for C preprocessor type)
2189 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
2195 # checks for header files
2214 # bluetooth/bluetooth.h has been known to not compile with -std=c99.
2217 CFLAGS="-std=c99 $CFLAGS"
2270 # checks for typedefs
2271 was_it_defined=no
2272 AC_MSG_CHECKING(for clock_t in time.h)
2278 AC_MSG_CHECKING(for makedev)
2289 ],[ac_cv_has_makedev=yes],[ac_cv_has_makedev=no])
2296 AC_MSG_CHECKING(for le64toh)
2305 ],[ac_cv_has_le64toh=yes],[ac_cv_has_le64toh=no])
2312 # Don't use largefile support for GNU/Hurd
2314 use_lfs=no
2332 # Add some code to confdefs.h so that the test for off_t works on SCO
2353 # ANSI C requires sizeof(char) == 1, so no need to check it
2378 if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2379 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
2383 to add some flags for configuration and compilation to enable this mode.
2384 (For Solaris and Linux, the necessary defines are already defined.)])
2387 AC_MSG_RESULT(no)
2402 then CC="$CC -Kpthread"
2404 then CC="$CC -Kthread"
2406 then CC="$CC -pthread"
2409 AC_MSG_CHECKING(for pthread_t)
2410 have_pthread_t=no
2427 if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
2431 [ac_pthread_key_t_is_arithmetic_type=no]
2439 AC_MSG_RESULT(no)
2446 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
2457 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
2461 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
2463 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2464 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2466 gcc_version=`gcc -dumpversion`
2469 LIBTOOL_CRUFT="-lcc_dynamic"
2483 ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
2515 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
2516 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2517 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2519 AC_MSG_CHECKING(for --enable-framework)
2522 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
2523 # -F. is needed to allow linking to the framework while
2531 …AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --…
2534 AC_MSG_RESULT(no)
2537 AC_MSG_CHECKING(for dyld)
2541 [Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
2542 dynamic linker (dyld) instead of the old-style (NextStep) dynamic
2544 AC_MSG_RESULT(always on for Darwin)
2547 AC_MSG_RESULT(no)
2560 # -- usually .so, .sl on HP-UX, .dll on Cygwin
2562 if test -z "$SHLIB_SUFFIX"; then
2565 case `uname -m` in
2577 # -- "cc -G" on SunOS 5.x.
2581 if test -z "$LDSHARED"
2585 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2586 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
2590 LDSHARED='$(CC) -shared'
2591 LDCXXSHARED='$(CXX) -shared'
2593 LDSHARED='$(CC) -G'
2594 LDCXXSHARED='$(CXX) -G'
2598 LDSHARED='$(CC) -shared'
2599 LDCXXSHARED='$(CXX) -shared'
2601 LDSHARED='$(CC) -b'
2602 LDCXXSHARED='$(CXX) -b'
2605 LDSHARED='$(CC) -bundle'
2606 LDCXXSHARED='$(CXX) -bundle'
2613 # No framework. Ignore undefined symbols, assuming they come from Python
2614 LDSHARED="$LDSHARED -undefined suppress"
2615 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
2618 LDSHARED='$(CC) -bundle'
2619 LDCXXSHARED='$(CXX) -bundle'
2626 # No framework, use the Python app as bundle-loader
2627 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2628 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2629 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2632 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
2636 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
2638 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
2639 if test ${dep_target_major} -eq 10 && \
2640 test ${dep_target_minor} -le 2
2642 # building for OS X 10.0 through 10.2
2643 LDSHARED='$(CC) -bundle'
2644 LDCXXSHARED='$(CXX) -bundle'
2651 # No framework, use the Python app as bundle-loader
2652 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2653 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2654 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2657 # building for OS X 10.3 and later
2658 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
2659 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
2664 LDSHARED='$(CC) -shared'
2665 LDCXXSHARED='$(CXX) -shared';;
2667 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2669 LDSHARED='$(CC) -shared'
2670 LDCXXSHARED='$(CXX) -shared'
2672 LDSHARED="ld -Bshareable"
2675 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2677 LDSHARED='$(CC) -shared $(CCSHARED)'
2678 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2680 case `uname -r` in
2681 [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
2682 LDSHARED="ld -Bshareable ${LDFLAGS}"
2685 LDSHARED='$(CC) -shared $(CCSHARED)'
2686 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2691 LDSHARED='$(CC) -shared'
2692 LDCXXSHARED='$(CXX) -shared';;
2695 LDSHARED='$(CC) -shared'
2696 LDCXXSHARED='$(CXX) -shared'
2698 LDSHARED='$(CC) -G'
2699 LDCXXSHARED='$(CXX) -G'
2702 LDSHARED='$(CC) -Wl,-G,-Bexport'
2703 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
2705 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
2706 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
2711 LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
2712 BLDSHARED=${BLDSHARED-$LDSHARED}
2714 # library (module) -- this is only needed for a few systems
2716 if test -z "$CCSHARED"
2720 then CCSHARED="-fPIC";
2721 elif test `uname -p` = sparc;
2722 then CCSHARED="-xcode=pic32";
2723 else CCSHARED="-Kpic";
2726 then CCSHARED="-fPIC";
2729 Linux-android*) ;;
2730 Linux*|GNU*) CCSHARED="-fPIC";;
2731 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
2734 then CCSHARED="-fPIC"
2735 else CCSHARED="-KPIC"
2739 then CCSHARED="-fPIC"
2740 else CCSHARED="-Kpic -belf"
2743 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
2748 # the python executable -- this is only needed for a few systems
2750 if test -z "$LINKFORSHARED"
2753 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
2755 LINKFORSHARED="-Wl,-E -Wl,+s";;
2756 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
2757 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
2758 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
2759 # -u libsys_s pulls in all symbols in libsys
2761 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
2764 # small for the default recursion limit. Increase the stack size
2768 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
2775 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
2776 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
2777 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
2779 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2781 LINKFORSHARED="-Wl,--export-dynamic"
2785 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
2787 LINKFORSHARED="-Xlinker --export-dynamic"
2791 if test $enable_shared = "no"
2793 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
2796 # -Wl,-E causes the symbols to be added to the dynamic
2798 # is loaded. -N 2048K causes the stack size to be set
2801 LINKFORSHARED='-Wl,-E -N 2048K';;
2803 LINKFORSHARED='--export-dynamic';;
2824 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
2825 # library (with --enable-shared).
2826 # For platforms on which shared libraries are not allowed to have unresolved
2841 # checks for libraries
2843 AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
2844 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
2846 # checks for uuid.h location
2849 AC_MSG_CHECKING(for uuid_generate_time_safe)
2857 [AC_MSG_RESULT(no)]
2860 # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
2862 AC_MSG_CHECKING(for uuid_create)
2870 [AC_MSG_RESULT(no)]
2873 # Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
2874 # stream in big-endian byte-order
2875 AC_MSG_CHECKING(for uuid_enc_be)
2883 [AC_MSG_RESULT(no)]
2891 # check if we need libintl for locale functions
2894 [Define to 1 if libintl is needed for locale functions.])
2895 LIBS="-lintl $LIBS"])
2897 # checks for system dependent C++ extensions support
2899 AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support)
2905 [Define for AIX if your compiler is a genuine IBM xlC/xlC_r
2906 and you want support for AIX C++ shared extension modules.])
2909 AC_MSG_RESULT(no)
2911 dnl The AIX_BUILDDATE is obtained from the kernel fileset - bos.mp64
2914 # as a baseline for bdist module packages
2915 AC_MSG_CHECKING(for the system builddate)
2916 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
2924 # check for systems that require aligned memory access
2932 for (i=0; i < 16; i++)
2940 [ac_cv_aligned_required=no],
2952 [Define hash algorithm for str, bytes and memoryview.
2955 AC_MSG_CHECKING(for --with-hash-algorithm)
2958 AS_HELP_STRING([--with-hash-algorithm=@<:@fnv|siphash24@:>@],
2959 … [select hash algorithm for use in Python/pyhash.c (default is SipHash24)]),
2978 if test -z "$1"; then
2979 # Empty string is allowed: it indicates no system TZPATH
2985 if ( echo $1 | grep -qE '(^|:)(@<:@^/@:>@|$)' ); then
2986 AC_MSG_ERROR([--with-tzpath must contain only absolute paths, not $1])
2992 AC_MSG_CHECKING(for --with-tzpath)
2994 AS_HELP_STRING([--with-tzpath=<list of absolute paths separated by pathsep>]
2995 [Select the default time zone search path for zoneinfo.TZPATH]),
2999 AC_MSG_ERROR([--with-tzpath requires a value])
3012 AC_MSG_CHECKING(for --with-address-sanitizer)
3014 AS_HELP_STRING([--with-address-sanitizer],
3015 [enable AddressSanitizer memory error detector, 'asan' (default is no)]),
3018 BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
3019 LDFLAGS="-fsanitize=address $LDFLAGS"
3021 with_pymalloc="no"
3023 [AC_MSG_RESULT(no)])
3025 AC_MSG_CHECKING(for --with-memory-sanitizer)
3027 AS_HELP_STRING([--with-memory-sanitizer],
3028 … [enable MemorySanitizer allocation error detector, 'msan' (default is no)]),
3031 BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
3032 LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
3034 with_pymalloc="no"
3036 [AC_MSG_RESULT(no)])
3038 AC_MSG_CHECKING(for --with-undefined-behavior-sanitizer)
3040 AS_HELP_STRING([--with-undefined-behavior-sanitizer],
3041 … [enable UndefinedBehaviorSanitizer undefined behaviour detector, 'ubsan' (default is no)]),
3044 BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
3045 LDFLAGS="-fsanitize=undefined $LDFLAGS"
3047 [AC_MSG_RESULT(no)])
3049 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3050 AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
3051 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
3053 AC_MSG_CHECKING(for --with-libs)
3055 … AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),
3060 [AC_MSG_RESULT(no)])
3064 # Check for use of the system expat library
3065 AC_MSG_CHECKING(for --with-system-expat)
3067 …AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library, see …
3069 [with_system_expat="no"])
3073 # Check for use of the system libffi library
3074 AC_MSG_CHECKING(for --with-system-ffi)
3076 …AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library, see Doc/…
3082 with_system_ffi="no"
3084 yes|no)
3087 AC_MSG_ERROR([--with-system-ffi accepts no arguments])
3095 AC_MSG_WARN([--with(out)-system-ffi is ignored on this platform])
3100 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
3101 … LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
3107 # Check for use of the system libmpdec library
3108 AC_MSG_CHECKING(for --with-system-libmpdec)
3110 …HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec library, …
3112 [with_system_libmpdec="no"])
3116 # Check whether _decimal should use a coroutine-local or thread-local context
3117 AC_MSG_CHECKING(for --with-decimal-contextvar)
3119 …AS_HELP_STRING([--with-decimal-contextvar], [build _decimal module using a coroutine-local rather …
3123 if test "$with_decimal_contextvar" != "no"
3126 …[Define if you want build the _decimal module using a coroutine-local rather than a thread-local c…
3131 # Check for support for loadable sqlite extensions
3132 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
3133 AC_ARG_ENABLE(loadable-sqlite-extensions,
3134 AS_HELP_STRING([--enable-loadable-sqlite-extensions],
3135 … [support loadable extensions in _sqlite module, see Doc/library/sqlite3.rst (default is no)]),
3137 [enable_loadable_sqlite_extensions="no"])
3141 # Check for --with-tcltk-includes=path and --with-tcltk-libs=path
3144 AC_MSG_CHECKING(for --with-tcltk-includes)
3145 AC_ARG_WITH(tcltk-includes,
3146 … AS_HELP_STRING([--with-tcltk-includes='-I...'], [override search for Tcl and Tk include files]),
3150 AC_MSG_CHECKING(for --with-tcltk-libs)
3151 AC_ARG_WITH(tcltk-libs,
3152 AS_HELP_STRING([--with-tcltk-libs='-L...'], [override search for Tcl and Tk libs]),
3160 AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
3169 # Check for --with-dbmliborder
3170 AC_MSG_CHECKING(for --with-dbmliborder)
3172 …AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [override order to check db backends for dbm; a v…
3176 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3178 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
3181 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3187 # Templates for things AC_DEFINEd more than once.
3188 # For a single AC_DEFINE, no template is needed.
3190 [Define to force use of thread-safe errno, h_errno, and other functions])
3198 CFLAGS="$CFLAGS -D_REENTRANT"
3202 CC="$CC -Kpthread"
3204 CXX="$CXX -Kpthread"
3209 CC="$CC -Kthread"
3211 CXX="$CXX -Kthread"
3216 CC="$CC -pthread"
3218 CXX="$CXX -pthread"
3222 if test ! -z "$withval" -a -d "$withval"
3223 then LDFLAGS="$LDFLAGS -L$withval"
3229 AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h)
3236 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
3240 # Just looking for pthread_create in libpthread is not enough:
3244 LIBS="$LIBS -lpthread"
3245 AC_MSG_CHECKING([for pthread_create in -lpthread])
3261 LIBS="$LIBS -lpthreads"
3265 LIBS="$LIBS -lc_r"
3269 LIBS="$LIBS -lpthread"
3273 LIBS="$LIBS -lcma"
3280 LIBS="$LIBS -lmpc"
3286 if test "$unistd_defines_pthreads" = "no"; then
3295 [Defined for Solaris 2.6 bug in pthread header.])
3316 if (pthread_attr_init(&attr)) exit(-1);
3317 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
3318 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
3322 [ac_cv_pthread_system_supported=no],
3323 [ac_cv_pthread_system_supported=no])
3340 # Check for enable-ipv6
3341 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
3342 AC_MSG_CHECKING([if --enable-ipv6 is specified])
3344 AS_HELP_STRING([--enable-ipv6],
3345 … [enable ipv6 (with ipv4) support, see Doc/library/socket.rst (default is yes if supported)]),
3347 no)
3348 AC_MSG_RESULT(no)
3349 ipv6=no
3366 AC_MSG_RESULT(no)
3367 ipv6=no
3381 AC_MSG_RESULT(no, IPv6 disabled)
3382 ipv6=no
3393 ipv6trylibc=no
3397 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
3421 linux-glibc)
3431 linux-inet6)
3433 if test -d /usr/inet6; then
3437 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
3441 if test -f /etc/netconfig; then
3442 if $GREP -q tcp6 /etc/netconfig; then
3467 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
3487 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
3488 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
3489 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
3495 echo 'Fatal: no $ipv6lib library found. cannot continue.'
3503 AC_MSG_CHECKING(for CAN_RAW_FD_FRAMES)
3510 AC_MSG_RESULT(no)
3513 AC_MSG_CHECKING(for CAN_RAW_JOIN_FILTERS)
3520 AC_MSG_RESULT(no)
3523 # Check for --with-doc-strings
3524 AC_MSG_CHECKING(for --with-doc-strings)
3525 AC_ARG_WITH(doc-strings,
3526 AS_HELP_STRING([--with-doc-strings], [enable documentation strings (default is yes)]))
3528 if test -z "$with_doc_strings"
3531 if test "$with_doc_strings" != "no"
3538 # Check for Python-specific malloc support
3539 AC_MSG_CHECKING(for --with-pymalloc)
3541 AS_HELP_STRING([--with-pymalloc], [enable specialized mallocs (default is yes)]))
3543 if test -z "$with_pymalloc"
3547 if test "$with_pymalloc" != "no"
3550 [Define if you want to compile in Python-specific mallocs])
3554 # Check for --with-c-locale-coercion
3555 AC_MSG_CHECKING(for --with-c-locale-coercion)
3556 AC_ARG_WITH(c-locale-coercion,
3557 AS_HELP_STRING([--with-c-locale-coercion],
3558 [enable C locale coercion to a UTF-8 based locale (default is yes)]))
3560 if test -z "$with_c_locale_coercion"
3564 if test "$with_c_locale_coercion" != "no"
3567 [Define if you want to coerce the C locale to a UTF-8 based locale])
3571 # Check for Valgrind support
3572 AC_MSG_CHECKING([for --with-valgrind])
3574 AS_HELP_STRING([--with-valgrind], [enable Valgrind support (default is no)]),,
3575 with_valgrind=no)
3577 if test "$with_valgrind" != no; then
3582 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
3585 # Check for DTrace support
3586 AC_MSG_CHECKING(for --with-dtrace)
3588 AS_HELP_STRING([--with-dtrace],[enable DTrace support (default is no)]),,
3589 with_dtrace=no)
3611 # generation flag '-G'. We check for presence of this flag, rather than
3615 ac_cv_dtrace_link=no
3617 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
3625 # -I${DLINCLDIR} is added to the compile rule for importdl.o
3633 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3637 if test -z "$DYNLOADFILE"
3664 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
3668 if test -z "$MACHDEP_OBJS"
3674 if test -z "$MACHDEP_OBJS"; then
3680 # checks for library functions
3707 # Force lchmod off for Linux. Linux disallows changing the mode of symbolic
3720 # For some functions, having a definition is not sufficient, since
3722 AC_MSG_CHECKING(for chroot)
3726 [AC_MSG_RESULT(no)
3728 AC_MSG_CHECKING(for link)
3732 [AC_MSG_RESULT(no)
3734 AC_MSG_CHECKING(for symlink)
3738 [AC_MSG_RESULT(no)
3740 AC_MSG_CHECKING(for fchdir)
3744 [AC_MSG_RESULT(no)
3746 AC_MSG_CHECKING(for fsync)
3750 [AC_MSG_RESULT(no)
3752 AC_MSG_CHECKING(for fdatasync)
3756 [AC_MSG_RESULT(no)
3758 AC_MSG_CHECKING(for epoll)
3762 [AC_MSG_RESULT(no)
3764 AC_MSG_CHECKING(for epoll_create1)
3768 [AC_MSG_RESULT(no)
3770 AC_MSG_CHECKING(for kqueue)
3777 [AC_MSG_RESULT(no)
3779 AC_MSG_CHECKING(for prlimit)
3786 [AC_MSG_RESULT(no)
3788 AC_MSG_CHECKING(for _dyld_shared_cache_contains_path)
3789 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mach-o/dyld.h>]], [[void *x=_dyld_shared_cache_conta…
3792 [AC_MSG_RESULT(no)
3795 AC_MSG_CHECKING(for memfd_create)
3806 [AC_MSG_RESULT(no)
3810 # functions ctermid_r, setgroups in the library, but no prototype
3815 AC_MSG_CHECKING(for ctermid_r)
3821 [AC_MSG_RESULT(no)
3824 AC_CACHE_CHECK([for flock declaration], [ac_cv_flock_decl],
3831 [ac_cv_flock_decl=no]
3843 AC_MSG_CHECKING(for getpagesize)
3849 [AC_MSG_RESULT(no)
3852 AC_MSG_CHECKING(for broken unsetenv)
3856 [AC_MSG_RESULT(no)],
3861 dnl check for true
3864 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
3865 dnl On others, they are in the C library, so we to take no action
3872 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
3884 [ac_cv_have_chflags=no],
3888 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
3894 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
3904 ]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cross])
3907 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
3915 dnl On MacOSX the linker will search for dylibs on the entire linker path
3916 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
3921 dnl The -L/usr/local/lib is needed as wel to get the same compilation
3928 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
3929 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
3942 AC_MSG_CHECKING(for hstrerror)
3948 [AC_MSG_RESULT(no)
3951 AC_MSG_CHECKING(for inet_aton)
3960 [AC_MSG_RESULT(no)
3963 AC_MSG_CHECKING(for inet_pton)
3972 [AC_MSG_RESULT(no)
3976 AC_MSG_CHECKING(for setgroups)
3985 [AC_MSG_RESULT(no)
3988 # check for openpty and forkpty
3992 [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
3993 AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
3998 [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
3999 AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
4003 # check for long file support functions
4018 # We search for both crypt and crypt_r as one or the other may be defined
4019 # This gets us our -lcrypt in LIBS when required on the target platform.
4025 #define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
4037 LIBS="$LIBS -lrt"
4040 [Library needed by timemodule.c: librt may be needed for clock_gettime()])
4056 AC_MSG_CHECKING(for major, minor, and makedev)
4072 AC_MSG_RESULT(no)
4076 # for [no]getaddrinfo in netdb.h.
4077 AC_MSG_CHECKING(for getaddrinfo)
4085 [have_getaddrinfo=no])
4105 for (passive = 0; passive <= 1; passive++) {
4115 for (ai = aitop; ai; ai = ai->ai_next) {
4116 if (ai->ai_addr == NULL ||
4117 ai->ai_addrlen == 0 ||
4118 getnameinfo(ai->ai_addr, ai->ai_addrlen,
4123 switch (ai->ai_family) {
4181 [ac_cv_buggy_getaddrinfo=no],
4185 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
4193 if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
4198 echo ' or you can specify "--disable-ipv6"'.
4207 # checks for structures
4224 AC_MSG_CHECKING(for time.h that defines altzone)
4228 [ac_cv_header_time_altzone=no])
4235 was_it_defined=no
4249 AC_MSG_CHECKING(for addrinfo)
4253 [ac_cv_struct_addrinfo=no]))
4259 AC_MSG_CHECKING(for sockaddr_storage)
4265 [ac_cv_struct_sockaddr_storage=no]))
4271 AC_MSG_CHECKING(for sockaddr_alg)
4278 [ac_cv_struct_sockaddr_alg=no]))
4284 # checks for compiler characteristics
4289 works=no
4290 AC_MSG_CHECKING(for working signed char)
4297 have_prototypes=no
4298 AC_MSG_CHECKING(for prototypes)
4307 works=no
4308 AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
4327 # check for socketpair
4328 AC_MSG_CHECKING(for socketpair)
4335 [AC_MSG_RESULT(no)]
4345 [AC_MSG_RESULT(no)]
4348 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4370 [Define this if you have the 6-arg version of gethostbyname_r().])
4373 AC_MSG_RESULT(no)
4389 [Define this if you have the 5-arg version of gethostbyname_r().])
4392 AC_MSG_RESULT(no)
4406 [Define this if you have the 3-arg version of gethostbyname_r().])
4409 AC_MSG_RESULT(no)
4423 # checks for system services
4426 # Linux requires this for correct f.p. operations
4432 # check for --with-libm=...
4436 *) LIBM=-lm
4438 AC_MSG_CHECKING(for --with-libm=STRING)
4440 …AS_HELP_STRING([--with-libm=STRING], [override libm math library to STRING (default is system-depe…
4442 if test "$withval" = no
4448 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
4452 # check for --with-libc=...
4454 AC_MSG_CHECKING(for --with-libc=STRING)
4456 …AS_HELP_STRING([--with-libc=STRING], [override libc C library to STRING (default is system-depende…
4458 if test "$withval" = no
4464 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
4469 # * Check for gcc x64 inline assembler *
4472 AC_MSG_CHECKING(for x64 gcc inline assembler)
4475 ]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
4484 # * Check for various properties of floating point *
4491 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4493 elif test "$ax_cv_c_float_words_bigendian" = "no"
4496 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4499 # Some ARM platforms use a mixed-endian representation for doubles.
4500 # While Python doesn't currently have full support for these platforms
4501 # (see e.g., issue 1762561), we can at least make sure that float <-> string
4506 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4507 in ARM mixed-endian order (byte order 45670123)])
4511 # correctly-rounded string <-> double conversion functions from
4512 # Python/dtoa.c, which in turn require that the FPU uses 53-bit
4514 # rounding precision of 64 bits. For gcc/x86, we can fix this by
4517 # This inline assembler syntax may also work for suncc and icc,
4525 ]])],[have_gcc_asm_for_x87=yes],[have_gcc_asm_for_x87=no])
4538 ]])],[have_gcc_asm_for_mc68881=yes],[have_gcc_asm_for_mc68881=no])
4546 # Detect whether system arithmetic is subject to x87-style double
4549 # mode is round-to-nearest and double rounding issues are present, and
4550 # 0 otherwise. See http://bugs.python.org/issue2937 for more info.
4551 AC_MSG_CHECKING(for x87-style double rounding)
4560 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
4561 x = 0.99999999999999989; /* 1-2**-53 */
4565 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
4575 [ac_cv_x87_double_rounding=no],
4577 [ac_cv_x87_double_rounding=no])
4583 [Define if arithmetic is subject to x87-style double rounding issue])
4587 # * Check for mathematical functions *
4597 # For multiprocessing module, check that sem_open
4598 # actually works. For FreeBSD versions <= 7.2,
4623 [ac_cv_posix_semaphores_enabled=no],
4627 if test $ac_cv_posix_semaphores_enabled = no
4633 # Multiprocessing check for broken sem_getvalue
4634 AC_MSG_CHECKING(for broken sem_getvalue)
4655 return res==-1 ? 1 : 0;
4658 [ac_cv_broken_sem_getvalue=no],
4671 # determine what size digit to use for Python's longs
4672 AC_MSG_CHECKING([digit size for Python's longs])
4673 AC_ARG_ENABLE(big-digits,
4674 AS_HELP_STRING([--enable-big-digits@<:@=15|30@:>@],[use big digits (30 or 15 bits) for Python longs…
4678 no)
4683 AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;;
4688 [AC_MSG_RESULT(no value specified)])
4690 # check for wchar.h
4696 wchar_h="no"
4705 AC_MSG_CHECKING(for UCS-4 tcl)
4706 have_ucs4_tcl=no
4728 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
4732 [ac_cv_wchar_t_signed=no],
4739 if test "$ac_cv_sizeof_wchar_t" -ge 2 \
4740 -a "$ac_cv_wchar_t_signed" = "no"
4748 AC_MSG_RESULT(no)
4751 # check for endianness
4754 # ABI version string for Python extension modules. This appears between the
4759 # * The Python implementation (always 'cpython-' for us)
4761 # * --with-pydebug (adds a 'd')
4763 # Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
4764 # would get a shared library ABI version tag of 'cpython-32dmu' and shared
4765 # libraries would be named 'foo.cpython-32dmu.so'.
4767 # In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
4768 # In Python 3.7 and older, --with-pymalloc added a 'm' flag.
4773 SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
4777 if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
4780 …ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATF…
4799 if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
4800 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
4810 # Check for --with-platlibdir
4814 AC_MSG_CHECKING(for --with-platlibdir)
4816 AS_HELP_STRING([--with-platlibdir=DIRNAME],
4820 # --with-platlibdir
4821 # --with-platlibdir=
4822 # --without-platlibdir
4823 if test -n "$withval" -a "$withval" != yes -a "$withval" != no
4829 AC_MSG_RESULT(no)
4831 [AC_MSG_RESULT(no)])
4837 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
4839 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
4850 exit(((-1)>>3 == -1) ? 0 : 1);
4854 [ac_cv_rshift_extends_sign=no],
4857 if test "$ac_cv_rshift_extends_sign" = no
4860 [Define if i>>j for signed int i does not extend the sign bit
4864 # check for getc_unlocked and related locking functions
4865 AC_MSG_CHECKING(for getc_unlocked() and friends)
4872 ]])],[ac_cv_have_getc_unlocked=yes],[ac_cv_have_getc_unlocked=no])])
4887 py_cv_lib_readline=no
4889 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
4890 if test -z "$py_libtermcap"; then
4891 READLINE_LIBS="-lreadline"
4893 READLINE_LIBS="-lreadline -l$py_libtermcap"
4905 if test $py_cv_lib_readline = no; then
4910 [Define if you have the readline library (-lreadline).])
4913 # check for readline 2.2
4916 [have_readline=no]
4930 # check for readline 4.0
4945 # check for readline 4.2
4953 [have_readline=no]
4970 AC_MSG_CHECKING(for broken nice())
4978 if (val1 != -1 && val1 == nice(2))
4984 [ac_cv_broken_nice=no],
4985 [ac_cv_broken_nice=no])])
4993 AC_MSG_CHECKING(for broken poll())
5015 [ac_cv_broken_poll=no],
5016 [ac_cv_broken_poll=no]))
5025 AC_MSG_CHECKING(for working tzset())
5042 tm->tm_zone does not exist since it is the alternative way
5049 time_t groundhogday = 1044144000; /* GMT-based */
5054 if (localtime(&groundhogday)->tm_hour != 0)
5057 /* For UTC, tzname[1] is sometimes "", sometimes " " */
5065 if (localtime(&groundhogday)->tm_hour != 19)
5072 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
5074 if (localtime(&groundhogday)->tm_hour != 11)
5082 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
5084 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
5092 [ac_cv_working_tzset=no],
5093 [ac_cv_working_tzset=no])])
5101 # Look for subsecond timestamps in struct stat
5102 AC_MSG_CHECKING(for tv_nsec in struct stat)
5109 [ac_cv_stat_tv_nsec=no]))
5117 # Look for BSD style subsecond timestamps in struct stat
5118 AC_MSG_CHECKING(for tv_nsec2 in struct stat)
5125 [ac_cv_stat_tv_nsec2=no]))
5135 if test "$cross_compiling" = no; then
5136 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
5156 [ac_cv_mvwdelch_is_expression=no]))
5176 w->_flags = 0;
5179 [ac_cv_window_has_flags=no]))
5189 AC_MSG_CHECKING(for is_pad)
5197 [AC_MSG_RESULT(no)]
5200 AC_MSG_CHECKING(for is_term_resized)
5204 [AC_MSG_RESULT(no)]
5207 AC_MSG_CHECKING(for resize_term)
5211 [AC_MSG_RESULT(no)]
5214 AC_MSG_CHECKING(for resizeterm)
5218 [AC_MSG_RESULT(no)]
5221 AC_MSG_CHECKING(for immedok)
5229 [AC_MSG_RESULT(no)]
5232 AC_MSG_CHECKING(for syncok)
5240 [AC_MSG_RESULT(no)]
5243 AC_MSG_CHECKING(for wchgat)
5251 [AC_MSG_RESULT(no)]
5254 AC_MSG_CHECKING(for filter)
5262 [AC_MSG_RESULT(no)]
5265 AC_MSG_CHECKING(for has_key)
5273 [AC_MSG_RESULT(no)]
5276 AC_MSG_CHECKING(for typeahead)
5284 [AC_MSG_RESULT(no)]
5287 AC_MSG_CHECKING(for use_env)
5295 [AC_MSG_RESULT(no)]
5300 AC_MSG_NOTICE([checking for device files])
5305 AC_MSG_CHECKING([for /dev/ptmx])
5307 AC_MSG_ERROR([set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling])
5310 AC_MSG_CHECKING([for /dev/ptc])
5312 AC_MSG_ERROR([set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling])
5329 LIBS="$LIBS -framework CoreFoundation"
5332 AC_CACHE_CHECK([for %zd printf() format support], ac_cv_have_size_t_format, [dnl
5360 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
5363 if (strcmp(buffer, "-123"))
5370 [ac_cv_have_size_t_format=no],
5371 [ac_cv_have_size_t_format="cross -- assuming yes"
5373 if test "$ac_cv_have_size_t_format" != no ; then
5375 [Define to printf format modifier for Py_ssize_t])
5389 AC_MSG_CHECKING(for broken mbstowcs)
5395 size_t len = -1;
5401 [ac_cv_broken_mbstowcs=no],
5403 [ac_cv_broken_mbstowcs=no]))
5412 # Check for --with-computed-gotos
5413 AC_MSG_CHECKING(for --with-computed-gotos)
5414 AC_ARG_WITH(computed-gotos,
5415 AS_HELP_STRING([--with-computed-gotos],
5424 if test "$withval" = no
5428 AC_MSG_RESULT(no)
5431 [AC_MSG_RESULT(no value specified)])
5448 [ac_cv_computed_gotos=no],
5450 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
5452 ac_cv_computed_gotos=no
5468 for h in `(cd $srcdir;echo Python/thread_*.h)`
5475 AC_MSG_CHECKING(for build directories)
5476 for dir in $SRCDIRS; do
5477 if test ! -d $dir; then
5483 # Availability of -O2:
5484 AC_MSG_CHECKING(for -O2)
5486 CFLAGS="-O2"
5488 ]])],[have_O2=yes],[have_O2=no])
5492 # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
5493 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
5494 AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
5496 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
5497 if test "$have_O2" = no; then
5516 [have_glibc_memmove_bug=no],
5524 for memmove and bcopy.])
5530 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
5533 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
5535 CFLAGS="-O2"
5553 [have_ipa_pure_const_bug=no],
5560 [Define if gcc has the ipa-pure-const bug.])
5566 # Check for stdatomic.h
5567 AC_MSG_CHECKING(for stdatomic.h)
5581 ],[have_stdatomic_h=yes],[have_stdatomic_h=no])
5590 # Check for GCC >= 4.7 __atomic builtins
5591 AC_MSG_CHECKING(for GCC >= 4.7 __atomic builtins)
5601 ],[have_builtin_atomic=yes],[have_builtin_atomic=no])
5610 AC_MSG_CHECKING(for ensurepip)
5612 [AS_HELP_STRING([--with-ensurepip@<:@=install|upgrade|no@:>@],
5619 [no],[ENSUREPIP=no],
5620 [AC_MSG_ERROR([--with-ensurepip=upgrade|install|no])])
5636 ],[have_dirent_d_type=yes],[have_dirent_d_type=no])
5645 AC_MSG_CHECKING(for the Linux getrandom() syscall)
5657 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
5662 ],[have_getrandom_syscall=yes],[have_getrandom_syscall=no])
5671 # the test was written for the Solaris function of <sys/random.h>
5672 AC_MSG_CHECKING(for the getrandom() function)
5682 /* ignore the result, Python checks for ENOSYS at runtime */
5687 ],[have_getrandom=yes],[have_getrandom=no])
5695 # checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
5700 if test "$ac_cv_search_shm_open" = "-lrt"; then
5702 [Define to 1 if you must link with -lrt for shm_open().])
5705 # temporarily override ac_includes_default for AC_CHECK_FUNCS below
5719 # Check for usable OpenSSL
5720 AX_CHECK_OPENSSL([have_openssl=yes],[have_openssl=no])
5723 AC_MSG_CHECKING([for X509_VERIFY_PARAM_set1_host in libssl])
5745 ac_cv_has_x509_verify_param_set1_host=no
5760 [Default cipher suites list for ssl module.
5763 [Cipher suite string for PY_SSL_DEFAULT_CIPHERS=0]
5766 AC_MSG_CHECKING(for --with-ssl-default-suites)
5767 AC_ARG_WITH(ssl-default-suites,
5768 AS_HELP_STRING([--with-ssl-default-suites=@<:@python|openssl|STRING@:>@],
5798 AC_MSG_CHECKING(for --with-builtin-hashlib-hashes)
5799 AC_ARG_WITH(builtin-hashlib-hashes,
5800 AS_HELP_STRING([--with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2],
5808 no)
5821 AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
5826 if test ! -f Modules/Setup.local
5828 echo "# Edit this file for local setup changes" >Modules/Setup.local
5832 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
5833 -s Modules \
5835 mv config.c Modules
5837 if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
5841 echo "please run ./configure --enable-optimizations" >&AS_MESSAGE_FD