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*)
383 # for now, limit cross builds to known configurations
385 AC_MSG_ERROR([cross build not supported for $host])
389 ac_sys_system=`uname -s`
391 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
392 ac_sys_release=`uname -v`
394 ac_sys_release=`uname -r`
398 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
400 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
414 *-*-linux*)
423 *-*-cygwin*)
427 # for now, limit cross builds to known configurations
429 AC_MSG_ERROR([cross build not supported for $host])
431 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
436 # features as extensions. For these systems, we skip the definition of
438 # some feature, make sure there is no alternative way to access this
440 # need for not defining _XOPEN_SOURCE on all systems matching the
447 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
451 define_xopen_source=no
466 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
467 define_xopen_source=no;;
471 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
474 define_xopen_source=no;;
477 # Reconfirmed for 7.1.4 by Martin v. Loewis.
478 OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
479 define_xopen_source=no;;
483 define_xopen_source=no;;
490 # has no effect, don't bother defining them
492 define_xopen_source=no;;
493 Darwin/1@<:@0-9@:>@.*)
494 define_xopen_source=no;;
499 define_xopen_source=no;;
501 if test `uname -r` -eq 1; then
502 define_xopen_source=no
508 define_xopen_source=no
515 # X/Open 7, incorporating POSIX.1-2008
522 # cases for HP-UX, we define it globally.
524 Define to activate Unix95-and-earlier features)
526 AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008)
529 # On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
534 define_stdc_a1=no;;
539 AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc)
542 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
550 # checks for alternative programs
553 # for debug/optimization stuff. BASECFLAGS is for flags that are required
560 AC_MSG_CHECKING(for --without-gcc)
562 AS_HELP_STRING([--without-gcc], [never use gcc]),
565 no) CC=${CC:-cc}
568 without_gcc=no;;
573 AIX*) CC=${CC:-xlc_r}
575 *) without_gcc=no;;
579 AC_MSG_CHECKING(for --with-icc)
581 AS_HELP_STRING([--with-icc], [build with icc]),
584 no) CC=${CC:-cc}
585 with_icc=no;;
592 with_icc=no])
596 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
598 AC_MSG_ERROR([cached CC is different -- throw away $cache_file
602 # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
603 # when the compiler supports them, but we don't always want -O2, and
604 # we set -g later.
605 if test -z "$CFLAGS"; then
612 # AC_PROG_CC can handle, see Mac/README for more
614 if test -z "${CC}"
619 for as_dir in $PATH
622 if test -x "${as_dir}/gcc"; then
623 if test -z "${found_gcc}"; then
627 if test -x "${as_dir}/clang"; then
628 if test -z "${found_clang}"; then
635 if test -n "$found_gcc" -a -n "$found_clang"
637 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
639 AC_MSG_NOTICE([Detected llvm-gcc, falling back to clang])
645 elif test -z "$found_gcc" -a -n "$found_clang"
647 AC_MSG_NOTICE([No GCC found, use CLANG])
651 elif test -z "$found_gcc" -a -z "$found_clang"
653 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
654 if test -n "${found_clang}"
658 CXX="`/usr/bin/xcrun -find clang++`"
672 AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
674 AS_HELP_STRING([--with-cxx-main=<compiler>],
679 no) with_cxx_main=no
685 if test -z "$CXX"
690 with_cxx_main=no
696 if test -z "$CXX"
709 if test -z "$CXX"
727 MULTIARCH=$($CC --print-multiarch 2>/dev/null)
730 AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
747 x86_64-linux-gnu
749 x86_64-linux-gnux32
751 i386-linux-gnu
754 aarch64_ilp32-linux-gnu
756 aarch64-linux-gnu
760 aarch64_be_ilp32-linux-gnu
762 aarch64_be-linux-gnu
765 alpha-linux-gnu
768 arm-linux-gnueabihf
770 armeb-linux-gnueabihf
774 arm-linux-gnueabi
776 armeb-linux-gnueabi
779 hppa-linux-gnu
781 ia64-linux-gnu
783 m68k-linux-gnu
786 mipsisa32r6el-linux-gnu
788 mipsisa64r6el-linux-gnuabin32
790 mipsisa64r6el-linux-gnuabi64
796 mipsisa32r6-linux-gnu
798 mipsisa64r6-linux-gnuabin32
800 mipsisa64r6-linux-gnuabi64
806 mipsel-linux-gnu
808 mips64el-linux-gnuabin32
810 mips64el-linux-gnuabi64
816 mips-linux-gnu
818 mips64-linux-gnuabin32
820 mips64-linux-gnuabi64
825 or1k-linux-gnu
827 powerpc-linux-gnuspe
830 powerpc64le-linux-gnu
832 powerpc64-linux-gnu
835 powerpc-linux-gnu
837 s390x-linux-gnu
839 s390-linux-gnu
841 sh4-linux-gnu
843 sparc64-linux-gnu
845 sparc-linux-gnu
848 riscv32-linux-gnu
850 riscv64-linux-gnu
859 x86_64-kfreebsd-gnu
861 i386-kfreebsd-gnu
866 i386-gnu
875 if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
876 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
881 rm -f conftest.c conftest.out
885 AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
892 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
896 AC_MSG_CHECKING([for -Wl,--no-as-needed])
898 LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
900 [NO_AS_NEEDED="-Wl,--no-as-needed"
903 AC_MSG_RESULT([no])])
908 # checks for UNIX variants that set C preprocessor variables
911 AC_MSG_CHECKING([for the Android API level])
921 if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
922 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
923 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
925 if test -z "$ANDROID_API_LEVEL"; then
931 AC_MSG_CHECKING([for the Android arm ABI])
934 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
935 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
940 rm -f conftest.c conftest.out
942 # Check for unsupported systems
945 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
946 echo See README for details.
951 AC_MSG_CHECKING(for --with-suffix)
953 AS_HELP_STRING([--with-suffix=.exe], [set executable suffix]),
956 no) EXEEXT=;;
962 # Test whether we're running on a non-case-sensitive system, in which
963 # case we give a warning if no ext is given
965 AC_MSG_CHECKING(for case-insensitive build directory)
966 if test ! -d CaseSensitiveTestDir; then
970 if test -d casesensitivetestdir
975 AC_MSG_RESULT(no)
983 cc|*/cc) CC="$CC -Ae";;
989 if test -z "$LIBRARY"
1007 # on the system - some systems like version suffix, others don't
1027 # LINKCC is the command that links the python executable -- default is $(CC).
1031 # This is altered for AIX in order to build the export list before
1035 if test -z "$LINKCC"
1041 if test $ac_sys_release -ge 5 -o \
1042 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
1048 # support -N.
1055 # make sure we default having it set to "no": this is used by
1056 # distutils.unixccompiler to know if it should add --enable-new-dtags
1060 AC_MSG_CHECKING(for GNU ld)
1063 ac_prog=`$CC -print-prog-name=ld`
1065 case `"$ac_prog" -V 2>&1 < /dev/null` in
1069 GNULD=no;;
1073 AC_MSG_CHECKING(for --enable-shared)
1075 AS_HELP_STRING([--enable-shared], [disable/enable building shared python library]))
1077 if test -z "$enable_shared"
1083 enable_shared="no";;
1088 AC_MSG_CHECKING(for --enable-profiling)
1090 AS_HELP_STRING([--enable-profiling], [enable C-level code profiling]))
1093 CC="$CC -pg"
1096 [enable_profiling=no])
1099 enable_profiling=no
1104 BASECFLAGS="-pg $BASECFLAGS"
1105 LDFLAGS="-pg $LDFLAGS"
1112 # will find it with a -framework option). For this reason there is an
1115 # LDLIBRARY, but empty for MacOSX framework builds.
1136 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
1146 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1155 case `uname -m` in
1163 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
1168 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1198 if test -z "$ARFLAGS"
1207 AC_MSG_ERROR([readelf for the host is required for cross builds])
1216 # install -d does not work on HP-UX
1217 if test -z "$INSTALL"
1219 INSTALL="${srcdir}/install-sh -c"
1227 if test -z "$LN" ; then
1229 CYGWIN*) LN="ln -s";;
1234 # For calculating the .so ABI tag.
1238 # Check for --with-pydebug
1239 AC_MSG_CHECKING(for --with-pydebug)
1241 AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined]),
1243 if test "$withval" != no
1246 [Define if you want to build an interpreter with many run-time checks.])
1250 else AC_MSG_RESULT(no); Py_DEBUG='false'
1252 [AC_MSG_RESULT(no)])
1254 # Check for --with-assertions. Py_DEBUG implies assertions, but also changes
1257 AC_MSG_CHECKING(for --with-assertions)
1259 AC_HELP_STRING([--with-assertions], [build with C assertions enabled]),
1261 if test "$withval" != no
1270 AC_MSG_RESULT(implied by --with-pydebug)
1272 AC_MSG_RESULT(no)
1279 AC_MSG_CHECKING(for --enable-optimizations)
1280 AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive, stable opt…
1282 if test "$enableval" != no
1288 AC_MSG_RESULT(no);
1290 [AC_MSG_RESULT(no)])
1295 # who want LTO need to use --with-lto themselves.
1296 DEF_MAKE_ALL_RULE="profile-opt"
1301 REQUIRE_PGO="no"
1305 # Make llvm-relatec checks work on systems where llvm tools are not installed with their
1307 # non-suffixed name in their versioned llvm directory.
1316 if test -L "${clang_bin}"
1326 AC_MSG_CHECKING(for --with-lto)
1327 AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [Enable Link Time Optimization in any build. Disabled…
1329 if test "$withval" != no
1335 AC_MSG_RESULT(no);
1337 [AC_MSG_RESULT(no)])
1342 AC_PATH_TARGET_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
1344 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
1348 LLVM_AR_FOUND="not-found"
1350 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
1352 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
1353 if test -n "${found_llvm_ar}"
1355 LLVM_AR='/usr/bin/xcrun llvm-ar'
1357 AC_MSG_NOTICE([llvm-ar found via xcrun: ${LLVM_AR}])
1360 if test $LLVM_AR_FOUND = not-found
1363 … AC_MSG_ERROR([llvm-ar is required for a --with-lto build with clang but could not be found.])
1365 LLVM_AR_ERR=no
1371 LTOFLAGS="-flto -Wl,-export_dynamic"
1374 LTOFLAGS="-flto"
1381 LTOFLAGS="-flto -Wl,-export_dynamic"
1384 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
1392 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
1394 LTOFLAGS="$LTOFLAGS -g"
1408 AC_PATH_TARGET_TOOL(LLVM_PROFDATA, llvm-profdata, '', ${llvm_path})
1410 if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
1414 LLVM_PROF_FOUND="not-found"
1416 if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
1418 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
1419 if test -n "${found_llvm_profdata}"
1421 # llvm-profdata isn't directly in $PATH in some cases.
1423 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
1425 AC_MSG_NOTICE([llvm-profdata found via xcrun: ${LLVM_PROFDATA}])
1428 LLVM_PROF_ERR=no
1432 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1433 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1434 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1435 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1436 if test $LLVM_PROF_FOUND = not-found
1441 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1448 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1449 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1450 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1451 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1452 if test "${LLVM_PROF_FOUND}" = "not-found"
1457 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1462 PGO_PROF_GEN_FLAG="-fprofile-generate"
1463 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
1470 PGO_PROF_GEN_FLAG="-prof-gen"
1471 PGO_PROF_USE_FLAG="-prof-use"
1481 # ------------------------
1482 # (The following bit of code is complicated enough - please keep things
1483 # indented properly. Just pretend you're editing Python code. ;-)
1494 if test "${OPT-unset}" = "unset"
1498 # For gcc 4.x we need to use -fwrapv so lets check if its supported
1499 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
1500 WRAP="-fwrapv"
1508 if $CC --version 2>&1 | grep -q clang
1516 if test -n "${cc_is_clang}"
1518 # Clang also needs -fwrapv
1519 WRAP="-fwrapv"
1520 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
1521 # see Makefile.pre.in for more information
1522 CFLAGS_ALIASING="-fno-strict-aliasing"
1528 # Optimization messes up debuggers, so turn it off for
1530 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
1531 OPT="-g -Og -Wall"
1533 OPT="-g -O0 -Wall"
1536 OPT="-g $WRAP -O3 -Wall"
1540 OPT="-O3 -Wall"
1545 SCO_SV*) OPT="$OPT -m486 -DSCO5"
1551 OPT="-O"
1560 # The -arch flags for universal builds on OSX
1567 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
1569 AC_MSG_CHECKING(for -Wextra)
1571 CC="$CC -Wextra -Werror"
1579 ac_cv_extra_warnings=no
1586 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
1590 # GCC produce warnings for legal Python code. Enable
1591 # -fno-strict-aliasing on versions of GCC that support but produce
1593 AC_MSG_CHECKING(whether $CC accepts and needs -fno-strict-aliasing)
1595 CC="$CC -fno-strict-aliasing"
1602 CC="$ac_save_cc -fstrict-aliasing"
1603 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
1609 ac_cv_no_strict_aliasing=no
1614 ac_cv_no_strict_aliasing=no
1621 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
1628 ac_cv_disable_unused_result_warning=no
1633 CC="$CC -Wunused-result -Werror"
1642 ac_cv_disable_unused_result_warning=no
1652 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
1653 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
1658 CC="$CC -Wunused-parameter -Werror"
1666 ac_cv_disable_unused_parameter_warning=no
1673 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
1678 CC="$CC -Wmissing-field-initializers -Werror"
1686 ac_cv_disable_missing_field_initializers=no
1693 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
1698 CC="$CC -Wcast-function-type -Werror"
1706 ac_cv_disable_cast_function_type=no
1713 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-cast-function-type"
1718 CC="$CC -Wsign-compare"
1727 ac_cv_enable_sign_compare_warning=no
1735 BASECFLAGS="$BASECFLAGS -Wsign-compare"
1740 CC="$CC -Wunreachable-code"
1749 ac_cv_enable_unreachable_code_warning=no
1755 # results in non-standard code paths.
1759 # for clang. Try to determine if the compiler is not really gcc and,
1763 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
1765 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
1767 ac_cv_enable_unreachable_code_warning=no
1771 AC_MSG_CHECKING(if we can turn on $CC strict-prototypes warning)
1773 CC="$CC -Werror -Wstrict-prototypes"
1781 ac_cv_enable_strict_prototypes_warning=no
1788 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
1793 CC="$CC -Werror=implicit-function-declaration"
1801 ac_cv_enable_implicit_function_declaration_error=no
1808 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
1811 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
1816 BASECFLAGS="$BASECFLAGS -mieee"
1822 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
1827 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
1828 # used to be here, but non-Apple gcc doesn't accept them.
1837 CC=gcc-4.0
1838 CPP=cpp-4.0
1847 32-bit)
1848 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
1852 64-bit)
1853 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
1858 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
1859 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1860 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1863 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
1864 LIPO_32BIT_FLAGS="-extract i386"
1865 ARCH_RUN_32BIT="/usr/bin/arch -i386"
1867 intel-32)
1868 UNIVERSAL_ARCH_FLAGS="-arch i386"
1872 intel-64)
1873 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
1877 3-way)
1878 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
1879 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1880 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1883 AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way])
1889 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
1890 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
1891 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
1898 # Calculate an appropriate deployment target for this build:
1900 # features are enabled (such as builtin libedit support for readline)
1912 cur_target_major=`sw_vers -productVersion | \
1913 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
1914 cur_target_minor=`sw_vers -productVersion | \
1915 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
1917 if test ${cur_target_major} -eq 10 && \
1918 test ${cur_target_minor} -ge 3 && \
1919 test ${cur_target_minor} -le 5
1926 all|3-way|intel|64-bit)
1939 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
1958 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
1961 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
1967 # ICC needs -fp-model strict or floats behave badly
1970 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
1977 OPT="-DNDEBUG $OPT"
1989 # options before we can check whether -Kpthread improves anything.
2007 ac_cv_kthread=no
2008 ac_cv_pthread=no
2009 ],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no])
2016 ac_cv_kpthread=no
2018 # -Kpthread, if available, provides the right #defines
2020 # Some compilers won't report that they do not support -Kpthread,
2023 AC_MSG_CHECKING(whether $CC accepts -Kpthread)
2026 CC="$CC -Kpthread"
2040 ]])],[ac_cv_kpthread=yes],[ac_cv_kpthread=no],[ac_cv_kpthread=no])
2045 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
2047 # -Kthread, if available, provides the right #defines
2049 # Some compilers won't report that they do not support -Kthread,
2052 AC_MSG_CHECKING(whether $CC accepts -Kthread)
2055 CC="$CC -Kthread"
2069 ]])],[ac_cv_kthread=yes],[ac_cv_kthread=no],[ac_cv_kthread=no])
2074 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
2076 # -pthread, if available, provides the right #defines
2078 # Some compilers won't report that they do not support -pthread,
2081 AC_MSG_CHECKING(whether $CC accepts -pthread)
2084 CC="$CC -pthread"
2098 ]])],[ac_cv_pthread=yes],[ac_cv_pthread=no],[ac_cv_pthread=no])
2103 # If we have set a CC compiler flag for thread support then
2104 # check if it works for CXX, too.
2105 ac_cv_cxx_thread=no
2106 if test ! -z "$CXX"
2108 AC_MSG_CHECKING(whether $CXX also accepts flags for thread support)
2113 CXX="$CXX -Kpthread"
2117 CXX="$CXX -Kthread"
2121 CXX="$CXX -pthread"
2128 $CXX -c conftest.$ac_ext 2>&5
2129 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
2130 && test -s conftest$ac_exeext && ./conftest$ac_exeext
2134 ac_cv_cxx_thread=no
2136 rm -fr conftest*
2142 dnl # check for ANSI or K&R ("traditional") preprocessor
2143 dnl AC_MSG_CHECKING(for C preprocessor type)
2145 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
2151 # checks for header files
2170 # bluetooth/bluetooth.h has been known to not compile with -std=c99.
2173 CFLAGS="-std=c99 $CFLAGS"
2216 # checks for typedefs
2217 was_it_defined=no
2218 AC_MSG_CHECKING(for clock_t in time.h)
2224 AC_MSG_CHECKING(for makedev)
2235 ],[ac_cv_has_makedev=yes],[ac_cv_has_makedev=no])
2242 AC_MSG_CHECKING(for le64toh)
2251 ],[ac_cv_has_le64toh=yes],[ac_cv_has_le64toh=no])
2258 # Don't use largefile support for GNU/Hurd
2260 use_lfs=no
2278 # Add some code to confdefs.h so that the test for off_t works on SCO
2299 # ANSI C requires sizeof(char) == 1, so no need to check it
2312 AC_MSG_CHECKING(for long double support)
2313 have_long_double=no
2332 if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2333 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
2337 to add some flags for configuration and compilation to enable this mode.
2338 (For Solaris and Linux, the necessary defines are already defined.)])
2341 AC_MSG_RESULT(no)
2356 then CC="$CC -Kpthread"
2358 then CC="$CC -Kthread"
2360 then CC="$CC -pthread"
2363 AC_MSG_CHECKING(for pthread_t)
2364 have_pthread_t=no
2381 if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
2385 [ac_pthread_key_t_is_arithmetic_type=no]
2393 AC_MSG_RESULT(no)
2400 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
2411 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
2415 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
2417 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2418 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2420 gcc_version=`gcc -dumpversion`
2423 LIBTOOL_CRUFT="-lcc_dynamic"
2437 ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
2466 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
2467 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2468 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2470 AC_MSG_CHECKING(for --enable-framework)
2473 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
2474 # -F. is needed to allow linking to the framework while
2482 …AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --…
2485 AC_MSG_RESULT(no)
2488 AC_MSG_CHECKING(for dyld)
2492 [Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
2493 dynamic linker (dyld) instead of the old-style (NextStep) dynamic
2495 AC_MSG_RESULT(always on for Darwin)
2498 AC_MSG_RESULT(no)
2511 # -- usually .so, .sl on HP-UX, .dll on Cygwin
2513 if test -z "$SHLIB_SUFFIX"; then
2516 case `uname -m` in
2528 # -- "cc -G" on SunOS 5.x.
2532 if test -z "$LDSHARED"
2536 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2537 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
2541 LDSHARED='$(CC) -shared'
2542 LDCXXSHARED='$(CXX) -shared'
2544 LDSHARED='$(CC) -G'
2545 LDCXXSHARED='$(CXX) -G'
2549 LDSHARED='$(CC) -shared'
2550 LDCXXSHARED='$(CXX) -shared'
2552 LDSHARED='$(CC) -b'
2553 LDCXXSHARED='$(CXX) -b'
2556 LDSHARED='$(CC) -bundle'
2557 LDCXXSHARED='$(CXX) -bundle'
2564 # No framework. Ignore undefined symbols, assuming they come from Python
2565 LDSHARED="$LDSHARED -undefined suppress"
2566 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
2569 LDSHARED='$(CC) -bundle'
2570 LDCXXSHARED='$(CXX) -bundle'
2577 # No framework, use the Python app as bundle-loader
2578 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2579 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2580 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2583 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
2587 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
2589 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
2590 if test ${dep_target_major} -eq 10 && \
2591 test ${dep_target_minor} -le 2
2593 # building for OS X 10.0 through 10.2
2594 LDSHARED='$(CC) -bundle'
2595 LDCXXSHARED='$(CXX) -bundle'
2602 # No framework, use the Python app as bundle-loader
2603 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2604 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2605 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2608 # building for OS X 10.3 and later
2609 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
2610 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
2615 LDSHARED='$(CC) -shared'
2616 LDCXXSHARED='$(CXX) -shared';;
2618 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2620 LDSHARED='$(CC) -shared'
2621 LDCXXSHARED='$(CXX) -shared'
2623 LDSHARED="ld -Bshareable"
2626 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2628 LDSHARED='$(CC) -shared $(CCSHARED)'
2629 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2631 case `uname -r` in
2632 [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
2633 LDSHARED="ld -Bshareable ${LDFLAGS}"
2636 LDSHARED='$(CC) -shared $(CCSHARED)'
2637 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2642 LDSHARED='$(CC) -shared'
2643 LDCXXSHARED='$(CXX) -shared';;
2646 LDSHARED='$(CC) -shared'
2647 LDCXXSHARED='$(CXX) -shared'
2649 LDSHARED='$(CC) -G'
2650 LDCXXSHARED='$(CXX) -G'
2653 LDSHARED='$(CC) -Wl,-G,-Bexport'
2654 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
2656 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
2657 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
2662 LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
2663 BLDSHARED=${BLDSHARED-$LDSHARED}
2665 # library (module) -- this is only needed for a few systems
2667 if test -z "$CCSHARED"
2671 then CCSHARED="-fPIC";
2672 elif test `uname -p` = sparc;
2673 then CCSHARED="-xcode=pic32";
2674 else CCSHARED="-Kpic";
2677 then CCSHARED="-fPIC";
2680 Linux-android*) ;;
2681 Linux*|GNU*) CCSHARED="-fPIC";;
2682 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
2685 then CCSHARED="-fPIC"
2686 else CCSHARED="-KPIC"
2690 then CCSHARED="-fPIC"
2691 else CCSHARED="-Kpic -belf"
2697 # the python executable -- this is only needed for a few systems
2699 if test -z "$LINKFORSHARED"
2702 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
2704 LINKFORSHARED="-Wl,-E -Wl,+s";;
2705 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
2706 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
2707 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
2708 # -u libsys_s pulls in all symbols in libsys
2710 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
2713 # small for the default recursion limit. Increase the stack size
2715 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
2722 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
2723 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
2724 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
2726 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2728 LINKFORSHARED="-Wl,--export-dynamic"
2732 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
2734 LINKFORSHARED="-Xlinker --export-dynamic"
2738 if test $enable_shared = "no"
2740 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
2743 # -Wl,-E causes the symbols to be added to the dynamic
2745 # is loaded. -N 2048K causes the stack size to be set
2748 LINKFORSHARED='-Wl,-E -N 2048K';;
2769 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
2770 # library (with --enable-shared).
2771 # For platforms on which shared libraries are not allowed to have unresolved
2786 # checks for libraries
2788 AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
2789 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
2791 # checks for uuid.h location
2794 AC_MSG_CHECKING(for uuid_generate_time_safe)
2802 [AC_MSG_RESULT(no)]
2805 # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
2807 AC_MSG_CHECKING(for uuid_create)
2815 [AC_MSG_RESULT(no)]
2818 # Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
2819 # stream in big-endian byte-order
2820 AC_MSG_CHECKING(for uuid_enc_be)
2828 [AC_MSG_RESULT(no)]
2836 # check if we need libintl for locale functions
2839 [Define to 1 if libintl is needed for locale functions.])
2840 LIBS="-lintl $LIBS"])
2842 # checks for system dependent C++ extensions support
2844 AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support)
2850 [Define for AIX if your compiler is a genuine IBM xlC/xlC_r
2851 and you want support for AIX C++ shared extension modules.])
2854 AC_MSG_RESULT(no)
2859 # check for systems that require aligned memory access
2867 for (i=0; i < 16; i++)
2875 [ac_cv_aligned_required=no],
2887 [Define hash algorithm for str, bytes and memoryview.
2890 AC_MSG_CHECKING(for --with-hash-algorithm)
2893 AS_HELP_STRING([--with-hash-algorithm=@<:@fnv|siphash24@:>@],
2911 AC_MSG_CHECKING(for --with-address-sanitizer)
2913 AS_HELP_STRING([--with-address-sanitizer],
2917 BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
2918 LDFLAGS="-fsanitize=address $LDFLAGS"
2920 with_pymalloc="no"
2922 [AC_MSG_RESULT(no)])
2924 AC_MSG_CHECKING(for --with-memory-sanitizer)
2926 AS_HELP_STRING([--with-memory-sanitizer],
2930 BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
2931 LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
2933 with_pymalloc="no"
2935 [AC_MSG_RESULT(no)])
2937 AC_MSG_CHECKING(for --with-undefined-behavior-sanitizer)
2939 AS_HELP_STRING([--with-undefined-behavior-sanitizer],
2943 BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
2944 LDFLAGS="-fsanitize=undefined $LDFLAGS"
2946 [AC_MSG_RESULT(no)])
2948 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2949 AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
2950 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
2952 AC_MSG_CHECKING(for --with-libs)
2954 AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs]),
2959 [AC_MSG_RESULT(no)])
2963 # Check for use of the system expat library
2964 AC_MSG_CHECKING(for --with-system-expat)
2966 … AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]),
2968 [with_system_expat="no"])
2972 # Check for use of the system libffi library
2973 AC_MSG_CHECKING(for --with-system-ffi)
2975 … AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library]),,,)
2981 with_system_ffi="no"
2983 yes|no)
2986 AC_MSG_ERROR([--with-system-ffi accepts no arguments])
2994 AC_MSG_WARN([--with(out)-system-ffi is ignored on this platform])
2999 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
3000 … LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
3006 # Check for use of the system libmpdec library
3007 AC_MSG_CHECKING(for --with-system-libmpdec)
3009 …AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec librar…
3011 [with_system_libmpdec="no"])
3015 # Check for support for loadable sqlite extensions
3016 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
3017 AC_ARG_ENABLE(loadable-sqlite-extensions,
3018 …AS_HELP_STRING([--enable-loadable-sqlite-extensions], [support loadable extensions in _sqlite modu…
3020 [enable_loadable_sqlite_extensions="no"])
3024 # Check for --with-tcltk-includes=path and --with-tcltk-libs=path
3027 AC_MSG_CHECKING(for --with-tcltk-includes)
3028 AC_ARG_WITH(tcltk-includes,
3029 … AS_HELP_STRING([--with-tcltk-includes='-I...'], [override search for Tcl and Tk include files]),
3033 AC_MSG_CHECKING(for --with-tcltk-libs)
3034 AC_ARG_WITH(tcltk-libs,
3035 AS_HELP_STRING([--with-tcltk-libs='-L...'], [override search for Tcl and Tk libs]),
3043 AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
3052 # Check for --with-dbmliborder
3053 AC_MSG_CHECKING(for --with-dbmliborder)
3055 …AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [order to check db backends for dbm. Valid value …
3059 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3061 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
3064 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3072 # Templates for things AC_DEFINEd more than once.
3073 # For a single AC_DEFINE, no template is needed.
3075 [Define to force use of thread-safe errno, h_errno, and other functions])
3084 CC="$CC -Kpthread"
3086 CXX="$CXX -Kpthread"
3091 CC="$CC -Kthread"
3093 CXX="$CXX -Kthread"
3098 CC="$CC -pthread"
3100 CXX="$CXX -pthread"
3104 if test ! -z "$withval" -a -d "$withval"
3105 then LDFLAGS="$LDFLAGS -L$withval"
3111 AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h)
3118 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
3122 # Just looking for pthread_create in libpthread is not enough:
3126 LIBS="$LIBS -lpthread"
3127 AC_MSG_CHECKING([for pthread_create in -lpthread])
3143 LIBS="$LIBS -lpthreads"
3147 LIBS="$LIBS -lc_r"
3151 LIBS="$LIBS -lpthread"
3155 LIBS="$LIBS -lcma"
3162 LIBS="$LIBS -lmpc"
3168 if test "$unistd_defines_pthreads" = "no"; then
3177 [Defined for Solaris 2.6 bug in pthread header.])
3198 if (pthread_attr_init(&attr)) exit(-1);
3199 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
3200 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
3204 [ac_cv_pthread_system_supported=no],
3205 [ac_cv_pthread_system_supported=no])
3222 # Check for enable-ipv6
3223 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
3224 AC_MSG_CHECKING([if --enable-ipv6 is specified])
3226 [ --enable-ipv6 Enable ipv6 (with ipv4) support
3227 --disable-ipv6 Disable ipv6 support],
3229 no)
3230 AC_MSG_RESULT(no)
3231 ipv6=no
3248 AC_MSG_RESULT(no)
3249 ipv6=no
3263 AC_MSG_RESULT(no, IPv6 disabled)
3264 ipv6=no
3275 ipv6trylibc=no
3279 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
3303 linux-glibc)
3313 linux-inet6)
3315 if test -d /usr/inet6; then
3319 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
3323 if test -f /etc/netconfig; then
3324 if $GREP -q tcp6 /etc/netconfig; then
3349 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
3369 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
3370 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
3371 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
3377 echo 'Fatal: no $ipv6lib library found. cannot continue.'
3385 AC_MSG_CHECKING(for CAN_RAW_FD_FRAMES)
3392 AC_MSG_RESULT(no)
3395 # Check for --with-doc-strings
3396 AC_MSG_CHECKING(for --with-doc-strings)
3397 AC_ARG_WITH(doc-strings,
3398 AS_HELP_STRING([--with(out)-doc-strings], [disable/enable documentation strings]))
3400 if test -z "$with_doc_strings"
3403 if test "$with_doc_strings" != "no"
3410 # Check for Python-specific malloc support
3411 AC_MSG_CHECKING(for --with-pymalloc)
3413 AS_HELP_STRING([--with(out)-pymalloc], [disable/enable specialized mallocs]))
3415 if test -z "$with_pymalloc"
3419 if test "$with_pymalloc" != "no"
3422 [Define if you want to compile in Python-specific mallocs])
3427 # Check for --with-c-locale-coercion
3428 AC_MSG_CHECKING(for --with-c-locale-coercion)
3429 AC_ARG_WITH(c-locale-coercion,
3430 AS_HELP_STRING([--with(out)-c-locale-coercion],
3431 [disable/enable C locale coercion to a UTF-8 based locale]))
3433 if test -z "$with_c_locale_coercion"
3437 if test "$with_c_locale_coercion" != "no"
3440 [Define if you want to coerce the C locale to a UTF-8 based locale])
3444 # Check for Valgrind support
3445 AC_MSG_CHECKING([for --with-valgrind])
3447 AS_HELP_STRING([--with-valgrind], [Enable Valgrind support]),,
3448 with_valgrind=no)
3450 if test "$with_valgrind" != no; then
3455 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
3458 # Check for DTrace support
3459 AC_MSG_CHECKING(for --with-dtrace)
3461 AC_HELP_STRING(--with(out)-dtrace, [disable/enable DTrace support]),,
3462 with_dtrace=no)
3485 # generation flag '-G'. We check for presence of this flag, rather than
3489 ac_cv_dtrace_link=no
3491 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
3499 # -I${DLINCLDIR} is added to the compile rule for importdl.o
3507 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3511 if test -z "$DYNLOADFILE"
3538 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
3542 if test -z "$MACHDEP_OBJS"
3548 if test -z "$MACHDEP_OBJS"; then
3554 # checks for library functions
3578 # Force lchmod off for Linux. Linux disallows changing the mode of symbolic
3591 # For some functions, having a definition is not sufficient, since
3593 AC_MSG_CHECKING(for chroot)
3597 [AC_MSG_RESULT(no)
3599 AC_MSG_CHECKING(for link)
3603 [AC_MSG_RESULT(no)
3605 AC_MSG_CHECKING(for symlink)
3609 [AC_MSG_RESULT(no)
3611 AC_MSG_CHECKING(for fchdir)
3615 [AC_MSG_RESULT(no)
3617 AC_MSG_CHECKING(for fsync)
3621 [AC_MSG_RESULT(no)
3623 AC_MSG_CHECKING(for fdatasync)
3627 [AC_MSG_RESULT(no)
3629 AC_MSG_CHECKING(for epoll)
3633 [AC_MSG_RESULT(no)
3635 AC_MSG_CHECKING(for epoll_create1)
3639 [AC_MSG_RESULT(no)
3641 AC_MSG_CHECKING(for kqueue)
3648 [AC_MSG_RESULT(no)
3650 AC_MSG_CHECKING(for prlimit)
3657 [AC_MSG_RESULT(no)
3661 # functions ctermid_r, setgroups in the library, but no prototype
3666 AC_MSG_CHECKING(for ctermid_r)
3672 [AC_MSG_RESULT(no)
3675 AC_CACHE_CHECK([for flock declaration], [ac_cv_flock_decl],
3682 [ac_cv_flock_decl=no]
3694 AC_MSG_CHECKING(for getpagesize)
3700 [AC_MSG_RESULT(no)
3703 AC_MSG_CHECKING(for broken unsetenv)
3707 [AC_MSG_RESULT(no)],
3712 dnl check for true
3715 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
3716 dnl On others, they are in the C library, so we to take no action
3723 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
3735 [ac_cv_have_chflags=no],
3739 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
3745 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
3755 ]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cross])
3758 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
3766 dnl On MacOSX the linker will search for dylibs on the entire linker path
3767 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
3772 dnl The -L/usr/local/lib is needed as wel to get the same compilation
3779 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
3780 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
3793 AC_MSG_CHECKING(for hstrerror)
3799 [AC_MSG_RESULT(no)
3802 AC_MSG_CHECKING(for inet_aton)
3811 [AC_MSG_RESULT(no)
3814 AC_MSG_CHECKING(for inet_pton)
3823 [AC_MSG_RESULT(no)
3827 AC_MSG_CHECKING(for setgroups)
3836 [AC_MSG_RESULT(no)
3839 # check for openpty and forkpty
3843 [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
3844 AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
3849 [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
3850 AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
3854 # check for long file support functions
3878 # We search for both crypt and crypt_r as one or the other may be defined
3879 # This gets us our -lcrypt in LIBS when required on the target platform.
3885 #define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
3897 LIBS="$LIBS -lrt"
3900 [Library needed by timemodule.c: librt may be needed for clock_gettime()])
3916 AC_MSG_CHECKING(for major, minor, and makedev)
3932 AC_MSG_RESULT(no)
3936 # for [no]getaddrinfo in netdb.h.
3937 AC_MSG_CHECKING(for getaddrinfo)
3945 [have_getaddrinfo=no])
3965 for (passive = 0; passive <= 1; passive++) {
3975 for (ai = aitop; ai; ai = ai->ai_next) {
3976 if (ai->ai_addr == NULL ||
3977 ai->ai_addrlen == 0 ||
3978 getnameinfo(ai->ai_addr, ai->ai_addrlen,
3983 switch (ai->ai_family) {
4041 [ac_cv_buggy_getaddrinfo=no],
4045 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
4053 if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
4058 echo ' or you can specify "--disable-ipv6"'.
4067 # checks for structures
4084 AC_MSG_CHECKING(for time.h that defines altzone)
4088 [ac_cv_header_time_altzone=no])
4095 was_it_defined=no
4109 AC_MSG_CHECKING(for addrinfo)
4113 [ac_cv_struct_addrinfo=no]))
4119 AC_MSG_CHECKING(for sockaddr_storage)
4125 [ac_cv_struct_sockaddr_storage=no]))
4131 AC_MSG_CHECKING(for sockaddr_alg)
4138 [ac_cv_struct_sockaddr_alg=no]))
4144 # checks for compiler characteristics
4149 works=no
4150 AC_MSG_CHECKING(for working signed char)
4157 have_prototypes=no
4158 AC_MSG_CHECKING(for prototypes)
4167 works=no
4168 AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
4187 # check for socketpair
4188 AC_MSG_CHECKING(for socketpair)
4195 [AC_MSG_RESULT(no)]
4205 [AC_MSG_RESULT(no)]
4208 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4230 [Define this if you have the 6-arg version of gethostbyname_r().])
4233 AC_MSG_RESULT(no)
4249 [Define this if you have the 5-arg version of gethostbyname_r().])
4252 AC_MSG_RESULT(no)
4266 [Define this if you have the 3-arg version of gethostbyname_r().])
4269 AC_MSG_RESULT(no)
4283 # checks for system services
4286 # Linux requires this for correct f.p. operations
4292 # check for --with-libm=...
4296 *) LIBM=-lm
4298 AC_MSG_CHECKING(for --with-libm=STRING)
4300 AS_HELP_STRING([--with-libm=STRING], [math library]),
4302 if test "$withval" = no
4308 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
4312 # check for --with-libc=...
4314 AC_MSG_CHECKING(for --with-libc=STRING)
4316 AS_HELP_STRING([--with-libc=STRING], [C library]),
4318 if test "$withval" = no
4324 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
4329 # * Check for gcc x64 inline assembler *
4332 AC_MSG_CHECKING(for x64 gcc inline assembler)
4335 ]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
4344 # * Check for various properties of floating point *
4347 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
4360 [ac_cv_little_endian_double=no],
4361 [ac_cv_little_endian_double=no])])
4366 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4370 AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
4383 [ac_cv_big_endian_double=no],
4384 [ac_cv_big_endian_double=no])])
4389 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4393 # Some ARM platforms use a mixed-endian representation for doubles.
4394 # While Python doesn't currently have full support for these platforms
4395 # (see e.g., issue 1762561), we can at least make sure that float <-> string
4397 AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
4410 [ac_cv_mixed_endian_double=no],
4411 [ac_cv_mixed_endian_double=no])])
4416 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4417 in ARM mixed-endian order (byte order 45670123)])
4421 # correctly-rounded string <-> double conversion functions from
4422 # Python/dtoa.c, which in turn require that the FPU uses 53-bit
4424 # rounding precision of 64 bits. For gcc/x86, we can fix this by
4427 # This inline assembler syntax may also work for suncc and icc,
4435 ]])],[have_gcc_asm_for_x87=yes],[have_gcc_asm_for_x87=no])
4448 ]])],[have_gcc_asm_for_mc68881=yes],[have_gcc_asm_for_mc68881=no])
4456 # Detect whether system arithmetic is subject to x87-style double
4459 # mode is round-to-nearest and double rounding issues are present, and
4460 # 0 otherwise. See http://bugs.python.org/issue2937 for more info.
4461 AC_MSG_CHECKING(for x87-style double rounding)
4470 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
4471 x = 0.99999999999999989; /* 1-2**-53 */
4475 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
4485 [ac_cv_x87_double_rounding=no],
4487 [ac_cv_x87_double_rounding=no])
4493 [Define if arithmetic is subject to x87-style double rounding issue])
4497 # * Check for mathematical functions *
4507 # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
4508 # -0. on some architectures.
4517 and tanh(-0.) == -0. */
4518 if (atan2(0., -1.) == atan2(-0., -1.) ||
4519 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
4524 [ac_cv_tanh_preserves_zero_sign=no],
4525 [ac_cv_tanh_preserves_zero_sign=no])])
4530 [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
4535 # On some versions of AIX, log1p(-0.) returns 0. instead of
4536 # -0. See issue #9920.
4543 /* Fail if the signs of log1p(-0.) and -0. can be
4545 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
4551 [ac_cv_log1p_drops_zero_sign=no],
4553 [ac_cv_log1p_drops_zero_sign=no])])
4559 [Define if log1p(-0.) is 0. rather than -0.])
4564 # For multiprocessing module, check that sem_open
4565 # actually works. For FreeBSD versions <= 7.2,
4590 [ac_cv_posix_semaphores_enabled=no],
4594 if test $ac_cv_posix_semaphores_enabled = no
4600 # Multiprocessing check for broken sem_getvalue
4601 AC_MSG_CHECKING(for broken sem_getvalue)
4622 return res==-1 ? 1 : 0;
4625 [ac_cv_broken_sem_getvalue=no],
4638 # determine what size digit to use for Python's longs
4639 AC_MSG_CHECKING([digit size for Python's longs])
4640 AC_ARG_ENABLE(big-digits,
4641 AS_HELP_STRING([--enable-big-digits@<:@=BITS@:>@],[use big digits for Python longs [[BITS=30]]]),
4645 no)
4650 AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;;
4655 [AC_MSG_RESULT(no value specified)])
4657 # check for wchar.h
4663 wchar_h="no"
4672 AC_MSG_CHECKING(for UCS-4 tcl)
4673 have_ucs4_tcl=no
4695 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
4699 [ac_cv_wchar_t_signed=no],
4706 if test "$ac_cv_sizeof_wchar_t" -ge 2 \
4707 -a "$ac_cv_wchar_t_signed" = "no"
4715 AC_MSG_RESULT(no)
4718 # check for endianness
4721 # ABI version string for Python extension modules. This appears between the
4726 # * The Python implementation (always 'cpython-' for us)
4728 # * --with-pydebug (adds a 'd')
4729 # * --with-pymalloc (adds a 'm')
4730 # * --with-wide-unicode (adds a 'u')
4732 # Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
4733 # would get a shared library ABI version tag of 'cpython-32dmu' and shared
4734 # libraries would be named 'foo.cpython-32dmu.so'.
4739 SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
4757 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
4759 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
4770 exit(((-1)>>3 == -1) ? 0 : 1);
4774 [ac_cv_rshift_extends_sign=no],
4777 if test "$ac_cv_rshift_extends_sign" = no
4780 [Define if i>>j for signed int i does not extend the sign bit
4784 # check for getc_unlocked and related locking functions
4785 AC_MSG_CHECKING(for getc_unlocked() and friends)
4792 ]])],[ac_cv_have_getc_unlocked=yes],[ac_cv_have_getc_unlocked=no])])
4807 py_cv_lib_readline=no
4809 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
4810 if test -z "$py_libtermcap"; then
4811 READLINE_LIBS="-lreadline"
4813 READLINE_LIBS="-lreadline -l$py_libtermcap"
4825 if test $py_cv_lib_readline = no; then
4830 [Define if you have the readline library (-lreadline).])
4833 # check for readline 2.2
4836 [have_readline=no]
4850 # check for readline 4.0
4865 # check for readline 4.2
4873 [have_readline=no]
4890 AC_MSG_CHECKING(for broken nice())
4898 if (val1 != -1 && val1 == nice(2))
4904 [ac_cv_broken_nice=no],
4905 [ac_cv_broken_nice=no])])
4913 AC_MSG_CHECKING(for broken poll())
4935 [ac_cv_broken_poll=no],
4936 [ac_cv_broken_poll=no]))
4945 AC_MSG_CHECKING(for working tzset())
4962 tm->tm_zone does not exist since it is the alternative way
4969 time_t groundhogday = 1044144000; /* GMT-based */
4974 if (localtime(&groundhogday)->tm_hour != 0)
4977 /* For UTC, tzname[1] is sometimes "", sometimes " " */
4985 if (localtime(&groundhogday)->tm_hour != 19)
4992 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
4994 if (localtime(&groundhogday)->tm_hour != 11)
5002 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
5004 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
5012 [ac_cv_working_tzset=no],
5013 [ac_cv_working_tzset=no])])
5021 # Look for subsecond timestamps in struct stat
5022 AC_MSG_CHECKING(for tv_nsec in struct stat)
5029 [ac_cv_stat_tv_nsec=no]))
5037 # Look for BSD style subsecond timestamps in struct stat
5038 AC_MSG_CHECKING(for tv_nsec2 in struct stat)
5045 [ac_cv_stat_tv_nsec2=no]))
5055 if test "$cross_compiling" = no; then
5056 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
5076 [ac_cv_mvwdelch_is_expression=no]))
5096 w->_flags = 0;
5099 [ac_cv_window_has_flags=no]))
5109 AC_MSG_CHECKING(for is_pad)
5117 [AC_MSG_RESULT(no)]
5120 AC_MSG_CHECKING(for is_term_resized)
5124 [AC_MSG_RESULT(no)]
5127 AC_MSG_CHECKING(for resize_term)
5131 [AC_MSG_RESULT(no)]
5134 AC_MSG_CHECKING(for resizeterm)
5138 [AC_MSG_RESULT(no)]
5141 AC_MSG_CHECKING(for immedok)
5149 [AC_MSG_RESULT(no)]
5152 AC_MSG_CHECKING(for syncok)
5160 [AC_MSG_RESULT(no)]
5163 AC_MSG_CHECKING(for wchgat)
5171 [AC_MSG_RESULT(no)]
5174 AC_MSG_CHECKING(for filter)
5182 [AC_MSG_RESULT(no)]
5185 AC_MSG_CHECKING(for has_key)
5193 [AC_MSG_RESULT(no)]
5196 AC_MSG_CHECKING(for typeahead)
5204 [AC_MSG_RESULT(no)]
5207 AC_MSG_CHECKING(for use_env)
5215 [AC_MSG_RESULT(no)]
5220 AC_MSG_NOTICE([checking for device files])
5225 AC_MSG_CHECKING([for /dev/ptmx])
5227 AC_MSG_ERROR([set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling])
5230 AC_MSG_CHECKING([for /dev/ptc])
5232 AC_MSG_ERROR([set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling])
5249 LIBS="$LIBS -framework CoreFoundation"
5252 AC_CACHE_CHECK([for %zd printf() format support], ac_cv_have_size_t_format, [dnl
5280 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
5283 if (strcmp(buffer, "-123"))
5290 [ac_cv_have_size_t_format=no],
5291 [ac_cv_have_size_t_format="cross -- assuming yes"
5293 if test "$ac_cv_have_size_t_format" != no ; then
5295 [Define to printf format modifier for Py_ssize_t])
5309 AC_MSG_CHECKING(for broken mbstowcs)
5315 size_t len = -1;
5321 [ac_cv_broken_mbstowcs=no],
5323 [ac_cv_broken_mbstowcs=no]))
5332 # Check for --with-computed-gotos
5333 AC_MSG_CHECKING(for --with-computed-gotos)
5334 AC_ARG_WITH(computed-gotos,
5335 AS_HELP_STRING([--with(out)-computed-gotos],
5344 if test "$withval" = no
5348 AC_MSG_RESULT(no)
5351 [AC_MSG_RESULT(no value specified)])
5368 [ac_cv_computed_gotos=no],
5370 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
5372 ac_cv_computed_gotos=no
5388 for h in `(cd $srcdir;echo Python/thread_*.h)`
5395 AC_MSG_CHECKING(for build directories)
5396 for dir in $SRCDIRS; do
5397 if test ! -d $dir; then
5403 # Availability of -O2:
5404 AC_MSG_CHECKING(for -O2)
5406 CFLAGS="-O2"
5408 ]])],[have_O2=yes],[have_O2=no])
5412 # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
5413 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
5414 AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
5416 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
5417 if test "$have_O2" = no; then
5436 [have_glibc_memmove_bug=no],
5444 for memmove and bcopy.])
5450 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
5453 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
5455 CFLAGS="-O2"
5473 [have_ipa_pure_const_bug=no],
5480 [Define if gcc has the ipa-pure-const bug.])
5486 # Check for stdatomic.h
5487 AC_MSG_CHECKING(for stdatomic.h)
5498 ],[have_stdatomic_h=yes],[have_stdatomic_h=no])
5507 # Check for GCC >= 4.7 __atomic builtins
5508 AC_MSG_CHECKING(for GCC >= 4.7 __atomic builtins)
5518 ],[have_builtin_atomic=yes],[have_builtin_atomic=no])
5527 AC_MSG_CHECKING(for ensurepip)
5529 [AS_HELP_STRING([--with(out)-ensurepip=@<:@=upgrade@:>@],
5536 [no],[ENSUREPIP=no],
5537 [AC_MSG_ERROR([--with-ensurepip=upgrade|install|no])])
5553 ],[have_dirent_d_type=yes],[have_dirent_d_type=no])
5562 AC_MSG_CHECKING(for the Linux getrandom() syscall)
5574 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
5579 ],[have_getrandom_syscall=yes],[have_getrandom_syscall=no])
5588 # the test was written for the Solaris function of <sys/random.h>
5589 AC_MSG_CHECKING(for the getrandom() function)
5599 /* ignore the result, Python checks for ENOSYS at runtime */
5604 ],[have_getrandom=yes],[have_getrandom=no])
5612 # Check for usable OpenSSL
5613 AX_CHECK_OPENSSL([have_openssl=yes],[have_openssl=no])
5616 AC_MSG_CHECKING([for X509_VERIFY_PARAM_set1_host in libssl])
5638 ac_cv_has_x509_verify_param_set1_host=no
5653 [Default cipher suites list for ssl module.
5656 [Cipher suite string for PY_SSL_DEFAULT_CIPHERS=0]
5659 AC_MSG_CHECKING(for --with-ssl-default-suites)
5660 AC_ARG_WITH(ssl-default-suites,
5661 AS_HELP_STRING([--with-ssl-default-suites=@<:@python|openssl|STRING@:>@],
5689 AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-config.sh)
5694 if test ! -f Modules/Setup
5700 if test ! -f Modules/Setup.local
5702 echo "# Edit this file for local setup changes" >Modules/Setup.local
5706 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
5707 -s Modules \
5709 mv config.c Modules
5711 if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
5715 echo "please run ./configure --enable-optimizations" >&AS_MESSAGE_FD