• Home
  • Raw
  • Download

Lines Matching +full:x86_64 +full:- +full:unknown +full:- +full:linux +full:- +full:gnux32

2 dnl * Please run autoreconf -if to test your changes! *
5 dnl Python's configure script requires autoconf 2.69 and autoconf-archive.
18 [AC_MSG_ERROR([Please install autoconf-archive package and re-run autoreconf])]
22 if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
23 # If we're building out-of-tree, we need to make sure the following
25 # Objects/ -> typeslots.inc
26 # Include/ -> Python.h
27 # Python/ -> importlib.h
29 # regenerated when building out-of-tree, regardless of whether or not
30 # the $srcdir counterpart is up-to-date. This is an acceptable trade
32 BASECPPFLAGS="-IObjects -IInclude -IPython"
41 if test -e $srcdir/.git
43 AC_CHECK_PROG(HAS_GIT, git, found, not-found)
45 HAS_GIT=no-repository
49 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
50 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
51 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
65 # pybuilddir.txt will be created by --generate-posix-vars in the Makefile
66 rm -f pybuilddir.txt
73 if test -z "$PYTHON_FOR_BUILD"; then
76 …if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info@<:@:2@:>@) == '$P…
85 …dir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && e…
88 AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
90 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
100 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
119 # with other autoconf-based packages that include Python.h
120 grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
132 # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
133 AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])
136 # certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
141 # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
146 # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
157 AC_MSG_CHECKING([for --enable-universalsdk])
159 AS_HELP_STRING([--enable-universalsdk@<:@=SDKDIR@:>@],
168 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
169 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
172 if test ! -d "${enableval}"
186 if test ! -d "${UNIVERSALSDK}"
188 AC_MSG_ERROR([--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}])
197 if test -n "${UNIVERSALSDK}"
208 # For backward compatibility reasons we prefer to select '32-bit' if available,
210 UNIVERSAL_ARCHS="32-bit"
211 if test "`uname -s`" = "Darwin"
213 if test -n "${UNIVERSALSDK}"
215 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
224 AC_MSG_CHECKING(for --with-universal-archs)
225 AC_ARG_WITH(universal-archs,
226 AS_HELP_STRING([--with-universal-archs=ARCH],
228 This option is only valid when --enable-universalsdk is set; options are:
229 ("universal2", "intel-64", "intel-32", "intel", "32-bit",
230 "64-bit", "3-way", or "all")
236 if test -n "${UNIVERSALSDK}"
243 AC_ARG_WITH(framework-name,
244 AS_HELP_STRING([--with-framework-name=FRAMEWORK],
246 only valid when --enable-framework is set. see Mac/README.rst
251 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
259 AS_HELP_STRING([--enable-framework@<:@=INSTALLDIR@:>@],
271 PYTHONFRAMEWORKDIR=no-framework
323 # --prefix option, but wants to install
324 # the framework in a non-default location,
348 PYTHONFRAMEWORKDIR=no-framework
380 ## AS_HELP_STRING([--with-dyld],
383 # Set name for machine-dependent library files
384 AC_ARG_VAR([MACHDEP], [name for machine-dependent library files])
386 if test -z "$MACHDEP"
394 *-*-linux-android*)
395 ac_sys_system=Linux-android
397 *-*-linux*)
398 ac_sys_system=Linux
400 *-*-cygwin*)
403 *-*-vxworks*)
408 MACHDEP="unknown"
413 ac_sys_system=`uname -s`
415 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
416 ac_sys_release=`uname -v`
418 ac_sys_release=`uname -r`
422 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
424 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
429 linux*) MACHDEP="linux";;
432 '') MACHDEP="unknown";;
440 *-*-linux*)
449 *-*-cygwin*)
452 *-*-vxworks*)
457 MACHDEP="unknown"
460 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
483 # As this has a different meaning on Linux, only define it on OpenBSD
489 # As this has a different meaning on Linux, only define it on OpenBSD
495 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
507 OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
522 Darwin/@<:@[12]@:>@@<:@0-9@:>@.*)
535 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
545 # X/Open 7, incorporating POSIX.1-2008
552 # cases for HP-UX, we define it globally.
554 Define to activate Unix95-and-earlier features)
556 AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008)
559 # On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
572 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
589 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
591 AC_MSG_ERROR([cached CC is different -- throw away $cache_file
595 # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
596 # when the compiler supports them, but we don't always want -O2, and
597 # we set -g later.
598 if test -z "$CFLAGS"; then
607 if test -z "${CC}"
615 if test -x "${as_dir}/gcc"; then
616 if test -z "${found_gcc}"; then
620 if test -x "${as_dir}/clang"; then
621 if test -z "${found_clang}"; then
628 if test -n "$found_gcc" -a -n "$found_clang"
630 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
632 AC_MSG_NOTICE([Detected llvm-gcc, falling back to clang])
638 elif test -z "$found_gcc" -a -n "$found_clang"
644 elif test -z "$found_gcc" -a -z "$found_clang"
646 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
647 if test -n "${found_clang}"
651 CXX="`/usr/bin/xcrun -find clang++`"
665 AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
667 AS_HELP_STRING([--with-cxx-main@<:@=COMPILER@:>@],
678 if test -z "$CXX"
689 if test -z "$CXX"
702 if test -z "$CXX"
725 #undef linux
737 x86_64-linux-gnu
739 x86_64-linux-gnux32
741 i386-linux-gnu
744 aarch64_ilp32-linux-gnu
746 aarch64-linux-gnu
750 aarch64_be_ilp32-linux-gnu
752 aarch64_be-linux-gnu
755 alpha-linux-gnu
758 arm-linux-gnueabihf
760 armeb-linux-gnueabihf
764 arm-linux-gnueabi
766 armeb-linux-gnueabi
769 hppa-linux-gnu
771 ia64-linux-gnu
773 m68k-linux-gnu
776 mipsisa32r6el-linux-gnu
778 mipsisa64r6el-linux-gnuabin32
780 mipsisa64r6el-linux-gnuabi64
782 # error unknown platform triplet
786 mipsisa32r6-linux-gnu
788 mipsisa64r6-linux-gnuabin32
790 mipsisa64r6-linux-gnuabi64
792 # error unknown platform triplet
796 mipsel-linux-gnu
798 mips64el-linux-gnuabin32
800 mips64el-linux-gnuabi64
802 # error unknown platform triplet
806 mips-linux-gnu
808 mips64-linux-gnuabin32
810 mips64-linux-gnuabi64
812 # error unknown platform triplet
815 or1k-linux-gnu
817 powerpc-linux-gnuspe
820 powerpc64le-linux-gnu
822 powerpc64-linux-gnu
825 powerpc-linux-gnu
827 s390x-linux-gnu
829 s390-linux-gnu
831 sh4-linux-gnu
833 sparc64-linux-gnu
835 sparc-linux-gnu
838 riscv32-linux-gnu
840 riscv64-linux-gnu
842 # error unknown platform triplet
845 # error unknown platform triplet
849 x86_64-kfreebsd-gnu
851 i386-kfreebsd-gnu
853 # error unknown platform triplet
856 i386-gnu
862 # error unknown platform triplet
868 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
873 rm -f conftest.c conftest.out
879 [MULTIARCH=$($CC --print-multiarch 2>/dev/null)]
894 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
898 AC_MSG_CHECKING([for -Wl,--no-as-needed])
900 LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
902 [NO_AS_NEEDED="-Wl,--no-as-needed"
924 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
925 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
927 if test -z "$ANDROID_API_LEVEL"; then
936 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
937 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
942 rm -f conftest.c conftest.out
946 atheos*|Linux*/1*)
953 AC_MSG_CHECKING(for --with-suffix)
955 … AS_HELP_STRING([--with-suffix=SUFFIX], [set executable suffix to SUFFIX (default is '.exe')]),
964 # Test whether we're running on a non-case-sensitive system, in which
967 AC_MSG_CHECKING(for case-insensitive build directory)
968 if test ! -d CaseSensitiveTestDir; then
972 if test -d casesensitivetestdir
985 cc|*/cc) CC="$CC -Ae";;
991 if test -z "$LIBRARY"
1009 # on the system - some systems like version suffix, others don't
1029 # LINKCC is the command that links the python executable -- default is $(CC).
1035 if test -z "$LINKCC"
1041 # support -N.
1064 # distutils.unixccompiler to know if it should add --enable-new-dtags
1071 ac_prog=`$CC -print-prog-name=ld`
1073 case `"$ac_prog" -V 2>&1 < /dev/null` in
1081 AC_MSG_CHECKING(for --enable-shared)
1083 … AS_HELP_STRING([--enable-shared], [enable building a shared Python library (default is no)]))
1085 if test -z "$enable_shared"
1096 AC_MSG_CHECKING(for --enable-profiling)
1098 … AS_HELP_STRING([--enable-profiling], [enable C-level code profiling with gprof (default is no)]))
1101 CC="$CC -pg"
1112 BASECFLAGS="-pg $BASECFLAGS"
1113 LDFLAGS="-pg $LDFLAGS"
1120 # will find it with a -framework option). For this reason there is an
1144 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
1152 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
1154 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1163 case `uname -m` in
1171 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
1176 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1206 if test -z "$ARFLAGS"
1224 # install -d does not work on HP-UX
1225 if test -z "$INSTALL"
1227 INSTALL="${srcdir}/install-sh -c"
1235 if test -z "$LN" ; then
1237 CYGWIN*) LN="ln -s";;
1246 # Check for --with-pydebug
1247 AC_MSG_CHECKING(for --with-pydebug)
1249 AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined (default is no)]),
1254 [Define if you want to build an interpreter with many run-time checks.])
1262 # Check for --with-trace-refs
1263 # --with-trace-refs
1264 AC_MSG_CHECKING(for --with-trace-refs)
1265 AC_ARG_WITH(trace-refs,
1267 [--with-trace-refs],
1277 # Check for --with-assertions.
1280 AC_MSG_CHECKING(for --with-assertions)
1282 AS_HELP_STRING([--with-assertions],[build with C assertions enabled (default is no)]),
1293 AC_MSG_RESULT(implied by --with-pydebug)
1302 AC_MSG_CHECKING(for --enable-optimizations)
1304 [--enable-optimizations],
1320 # who want LTO need to use --with-lto themselves.
1321 DEF_MAKE_ALL_RULE="profile-opt"
1326 AX_CHECK_COMPILE_FLAG([-fno-semantic-interposition],[
1327 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
1328 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
1342 if test -z "$PROFILE_TASK"
1344 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
1348 # Make llvm-relatec checks work on systems where llvm tools are not installed with their
1350 # non-suffixed name in their versioned llvm directory.
1359 if test -L "${clang_bin}"
1369 AC_MSG_CHECKING(for --with-lto)
1370 AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [enable Link-Time-Optimization in any build (default …
1385 AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
1387 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
1391 LLVM_AR_FOUND="not-found"
1393 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
1395 # The Apple-supplied ar in Xcode or the Command Line Tools is apparently sufficient
1396 found_llvm_ar=`/usr/bin/xcrun -find ar 2>/dev/null`
1397 if test -n "${found_llvm_ar}"
1401 AC_MSG_NOTICE([llvm-ar found via xcrun: ${LLVM_AR}])
1404 if test $LLVM_AR_FOUND = not-found
1407 … AC_MSG_ERROR([llvm-ar is required for a --with-lto build with clang but could not be found.])
1415 LTOFLAGS="-flto -Wl,-export_dynamic"
1416 LTOCFLAGS="-flto"
1419 LTOFLAGS="-flto"
1426 LTOFLAGS="-flto -Wl,-export_dynamic"
1427 LTOCFLAGS="-flto"
1430 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
1438 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
1440 LTOFLAGS="$LTOFLAGS -g"
1443 CFLAGS_NODIST="$CFLAGS_NODIST ${LTOCFLAGS-$LTOFLAGS}"
1454 AC_PATH_TOOL(LLVM_PROFDATA, llvm-profdata, '', ${llvm_path})
1456 if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
1460 LLVM_PROF_FOUND="not-found"
1462 if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
1464 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
1465 if test -n "${found_llvm_profdata}"
1467 # llvm-profdata isn't directly in $PATH in some cases.
1469 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
1471 AC_MSG_NOTICE([llvm-profdata found via xcrun: ${LLVM_PROFDATA}])
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.…
1494 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1495 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1496 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1497 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1498 if test "${LLVM_PROF_FOUND}" = "not-found"
1503 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1508 PGO_PROF_GEN_FLAG="-fprofile-generate"
1509 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
1516 PGO_PROF_GEN_FLAG="-prof-gen"
1517 PGO_PROF_USE_FLAG="-prof-use"
1527 # ------------------------
1528 # (The following bit of code is complicated enough - please keep things
1529 # indented properly. Just pretend you're editing Python code. ;-)
1541 if $CC --version 2>&1 | grep -q clang
1553 if test "${OPT-unset}" = "unset"
1557 # For gcc 4.x we need to use -fwrapv so lets check if its supported
1558 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
1559 WRAP="-fwrapv"
1562 if test -n "${cc_is_clang}"
1564 # Clang also needs -fwrapv
1565 WRAP="-fwrapv"
1566 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
1568 CFLAGS_ALIASING="-fno-strict-aliasing"
1576 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
1577 OPT="-g -Og -Wall"
1579 OPT="-g -O0 -Wall"
1582 OPT="-g $WRAP -O3 -Wall"
1586 OPT="-O3 -Wall"
1591 SCO_SV*) OPT="$OPT -m486 -DSCO5"
1597 OPT="-O"
1606 # The -arch flags for universal builds on macOS
1613 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
1615 AC_MSG_CHECKING(for -Wextra)
1617 CC="$CC -Wextra -Werror"
1632 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
1637 # -fno-strict-aliasing on versions of GCC that support but produce
1639 AC_MSG_CHECKING(whether $CC accepts and needs -fno-strict-aliasing)
1641 CC="$CC -fno-strict-aliasing"
1648 CC="$ac_save_cc -fstrict-aliasing"
1649 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
1667 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
1679 CC="$CC -Wunused-result -Werror"
1698 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
1699 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
1704 CC="$CC -Wunused-parameter -Werror"
1719 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
1724 CC="$CC -Wmissing-field-initializers -Werror"
1739 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
1744 CC="$CC -Wsign-compare"
1761 BASECFLAGS="$BASECFLAGS -Wsign-compare"
1766 CC="$CC -Wunreachable-code"
1781 # results in non-standard code paths.
1789 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
1791 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
1797 AC_MSG_CHECKING(if we can turn on $CC strict-prototypes warning)
1799 CC="$CC -Werror -Wstrict-prototypes"
1814 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
1819 CC="$CC -Werror=implicit-function-declaration"
1834 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
1839 CC="$CC -fvisibility=hidden"
1854 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
1857 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
1862 BASECFLAGS="$BASECFLAGS -mieee"
1868 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
1872 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
1873 # used to be here, but non-Apple gcc doesn't accept them.
1882 CC=gcc-4.0
1883 CPP=cpp-4.0
1893 32-bit)
1894 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
1898 64-bit)
1899 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
1904 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
1905 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1906 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1909 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
1911 LIPO_INTEL64_FLAGS="-extract x86_64"
1915 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
1916 LIPO_32BIT_FLAGS="-extract i386"
1917 ARCH_RUN_32BIT="/usr/bin/arch -i386"
1919 intel-32)
1920 UNIVERSAL_ARCH_FLAGS="-arch i386"
1924 intel-64)
1925 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
1929 3-way)
1930 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
1931 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1932 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1935 … AC_MSG_ERROR([proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way])
1941 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
1942 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
1943 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
1964 cur_target_major=`sw_vers -productVersion | \
1965 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
1966 cur_target_minor=`sw_vers -productVersion | \
1967 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
1969 if test ${cur_target_major} -eq 10 && \
1970 test ${cur_target_minor} -ge 3 && \
1971 test ${cur_target_minor} -le 5
1978 all|3-way|intel|64-bit)
1991 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
2006 AC_MSG_ERROR(check config.log and use the '--with-universal-archs' option)
2017 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
2020 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
2028 # ICC needs -fp-model strict or floats behave badly
2029 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
2032 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
2039 OPT="-DNDEBUG $OPT"
2051 # options before we can check whether -Kpthread improves anything.
2080 # -Kpthread, if available, provides the right #defines
2082 # Some compilers won't report that they do not support -Kpthread,
2085 AC_MSG_CHECKING(whether $CC accepts -Kpthread)
2088 CC="$CC -Kpthread"
2107 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
2109 # -Kthread, if available, provides the right #defines
2111 # Some compilers won't report that they do not support -Kthread,
2114 AC_MSG_CHECKING(whether $CC accepts -Kthread)
2117 CC="$CC -Kthread"
2136 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
2138 # -pthread, if available, provides the right #defines
2140 # Some compilers won't report that they do not support -pthread,
2143 AC_MSG_CHECKING(whether $CC accepts -pthread)
2146 CC="$CC -pthread"
2168 if test ! -z "$CXX"
2175 CXX="$CXX -Kpthread"
2179 CXX="$CXX -Kthread"
2183 CXX="$CXX -pthread"
2190 $CXX -c conftest.$ac_ext 2>&5
2191 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
2192 && test -s conftest$ac_exeext && ./conftest$ac_exeext
2198 rm -fr conftest*
2207 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
2227 linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
2228 sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
2233 # bluetooth/bluetooth.h has been known to not compile with -std=c99.
2234 # http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
2236 CFLAGS="-std=c99 $CFLAGS"
2256 # On Linux, netlink.h requires asm/types.h
2257 AC_CHECK_HEADERS(linux/netlink.h,,,[
2266 # On Linux, qrtr.h requires asm/types.h
2267 AC_CHECK_HEADERS(linux/qrtr.h,,,[
2276 AC_CHECK_HEADERS(linux/vm_sockets.h,,,[
2282 # On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
2283 AC_CHECK_HEADERS(linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h,,,[
2399 if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2400 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
2405 (For Solaris and Linux, the necessary defines are already defined.)])
2423 then CC="$CC -Kpthread"
2425 then CC="$CC -Kthread"
2427 then CC="$CC -pthread"
2448 if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
2467 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
2478 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
2482 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
2484 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2485 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2487 gcc_version=`gcc -dumpversion`
2490 LIBTOOL_CRUFT="-lcc_dynamic"
2521 MACOSX_DEFAULT_ARCH="x86_64"
2536 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
2537 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2538 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2540 AC_MSG_CHECKING(for --enable-framework)
2543 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
2544 # -F. is needed to allow linking to the framework while
2552 …AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --
2562 [Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
2563 dynamic linker (dyld) instead of the old-style (NextStep) dynamic
2572 AC_MSG_CHECKING(for --with-address-sanitizer)
2574 AS_HELP_STRING([--with-address-sanitizer],
2578 BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
2579 LDFLAGS="-fsanitize=address $LDFLAGS"
2585 AC_MSG_CHECKING(for --with-memory-sanitizer)
2587 AS_HELP_STRING([--with-memory-sanitizer],
2591 AX_CHECK_COMPILE_FLAG([-fsanitize=memory],[
2592 BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
2593 LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
2600 AC_MSG_CHECKING(for --with-undefined-behavior-sanitizer)
2602 AS_HELP_STRING([--with-undefined-behavior-sanitizer],
2606 BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
2607 LDFLAGS="-fsanitize=undefined $LDFLAGS"
2624 # -- usually .so, .sl on HP-UX, .dll on Cygwin
2626 if test -z "$SHLIB_SUFFIX"; then
2629 case `uname -m` in
2641 # -- "cc -G" on SunOS 5.x.
2645 if test -z "$LDSHARED"
2649 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2650 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
2654 LDSHARED='$(CC) -shared'
2655 LDCXXSHARED='$(CXX) -shared'
2657 LDSHARED='$(CC) -G'
2658 LDCXXSHARED='$(CXX) -G'
2662 LDSHARED='$(CC) -shared'
2663 LDCXXSHARED='$(CXX) -shared'
2665 LDSHARED='$(CC) -b'
2666 LDCXXSHARED='$(CXX) -b'
2669 LDSHARED='$(CC) -bundle'
2670 LDCXXSHARED='$(CXX) -bundle'
2678 LDSHARED="$LDSHARED -undefined suppress"
2679 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
2682 LDSHARED='$(CC) -bundle'
2683 LDCXXSHARED='$(CXX) -bundle'
2690 # No framework, use the Python app as bundle-loader
2691 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2692 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2693 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2696 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
2700 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
2702 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
2703 if test ${dep_target_major} -eq 10 && \
2704 test ${dep_target_minor} -le 2
2710 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
2711 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
2715 Linux*|GNU*|QNX*|VxWorks*)
2716 LDSHARED='$(CC) -shared'
2717 LDCXXSHARED='$(CXX) -shared';;
2719 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2721 LDSHARED='$(CC) -shared'
2722 LDCXXSHARED='$(CXX) -shared'
2724 LDSHARED="ld -Bshareable"
2727 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2729 LDSHARED='$(CC) -shared $(CCSHARED)'
2730 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2732 case `uname -r` in
2733 [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
2734 LDSHARED="ld -Bshareable ${LDFLAGS}"
2737 LDSHARED='$(CC) -shared $(CCSHARED)'
2738 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2743 LDSHARED='$(CC) -shared'
2744 LDCXXSHARED='$(CXX) -shared';;
2747 LDSHARED='$(CC) -shared'
2748 LDCXXSHARED='$(CXX) -shared'
2750 LDSHARED='$(CC) -G'
2751 LDCXXSHARED='$(CXX) -G'
2754 LDSHARED='$(CC) -Wl,-G,-Bexport'
2755 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
2757 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
2758 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
2763 LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
2764 BLDSHARED=${BLDSHARED-$LDSHARED}
2766 # library (module) -- this is only needed for a few systems
2768 if test -z "$CCSHARED"
2772 then CCSHARED="-fPIC";
2773 elif test `uname -p` = sparc;
2774 then CCSHARED="-xcode=pic32";
2775 else CCSHARED="-Kpic";
2778 then CCSHARED="-fPIC";
2781 Linux-android*) ;;
2782 Linux*|GNU*) CCSHARED="-fPIC";;
2783 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
2786 then CCSHARED="-fPIC"
2787 else CCSHARED="-KPIC"
2791 then CCSHARED="-fPIC"
2792 else CCSHARED="-Kpic -belf"
2795 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
2800 # the python executable -- this is only needed for a few systems
2802 if test -z "$LINKFORSHARED"
2805 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
2807 LINKFORSHARED="-Wl,-E -Wl,+s";;
2808 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
2809 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
2810 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
2811 # -u libsys_s pulls in all symbols in libsys
2813 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
2825 LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED"
2836 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
2837 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
2838 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
2840 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2842 LINKFORSHARED="-Wl,--export-dynamic"
2846 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
2848 LINKFORSHARED="-Xlinker --export-dynamic"
2854 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
2857 # -Wl,-E causes the symbols to be added to the dynamic
2859 # is loaded. -N 2048K causes the stack size to be set
2862 LINKFORSHARED='-Wl,-E -N 2048K';;
2864 LINKFORSHARED='-Wl,-export-dynamic';;
2885 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
2886 # library (with --enable-shared).
2905 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
2921 # check for libuuid from util-linux
2939 # Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
2940 # stream in big-endian byte-order
2954 # pthread (first!) on Linux
2961 LIBS="-lintl $LIBS"])
2977 dnl The AIX_BUILDDATE is obtained from the kernel fileset - bos.mp64
2982 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
3021 AC_MSG_CHECKING(for --with-hash-algorithm)
3024 AS_HELP_STRING([--with-hash-algorithm=@<:@fnv|siphash24@:>@],
3036 AC_MSG_ERROR([unknown hash algorithm '$withval'])
3044 if test -z "$1"; then
3052 AC_MSG_ERROR([--with-tzpath must contain only absolute paths, not $1])
3058 AC_MSG_CHECKING(for --with-tzpath)
3060 AS_HELP_STRING([--with-tzpath=<list of absolute paths separated by pathsep>]
3065 AC_MSG_ERROR([--with-tzpath requires a value])
3078 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3079 AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
3080 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
3082 AC_MSG_CHECKING(for --with-libs)
3084 … AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),
3094 AC_MSG_CHECKING(for --with-system-expat)
3096 …AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library, see …
3103 AC_MSG_CHECKING(for --with-system-ffi)
3105 …AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library, see Doc/…
3116 AC_MSG_ERROR([--with-system-ffi accepts no arguments])
3124 AC_MSG_WARN([--with(out)-system-ffi is ignored on this platform])
3129 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
3130 … LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
3137 AC_MSG_CHECKING(for --with-system-libmpdec)
3139 …AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec librar…
3145 # Check whether _decimal should use a coroutine-local or thread-local context
3146 AC_MSG_CHECKING(for --with-decimal-contextvar)
3148 …AS_HELP_STRING([--with-decimal-contextvar], [build _decimal module using a coroutine-local rather …
3155 …[Define if you want build the _decimal module using a coroutine-local rather than a thread-local c…
3161 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
3162 AC_ARG_ENABLE(loadable-sqlite-extensions,
3163 AS_HELP_STRING([--enable-loadable-sqlite-extensions],
3170 # Check for --with-tcltk-includes=path and --with-tcltk-libs=path
3173 AC_MSG_CHECKING(for --with-tcltk-includes)
3174 AC_ARG_WITH(tcltk-includes,
3175 … AS_HELP_STRING([--with-tcltk-includes='-I...'], [override search for Tcl and Tk include files]),
3179 AC_MSG_CHECKING(for --with-tcltk-libs)
3180 AC_ARG_WITH(tcltk-libs,
3181 AS_HELP_STRING([--with-tcltk-libs='-L...'], [override search for Tcl and Tk libs]),
3189 AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
3191 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
3192 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
3193 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
3203 # Check for --with-dbmliborder
3204 AC_MSG_CHECKING(for --with-dbmliborder)
3206 …AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [override order to check db backends for dbm; a v…
3210 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3215 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3224 [Define to force use of thread-safe errno, h_errno, and other functions])
3232 CFLAGS="$CFLAGS -D_REENTRANT"
3236 CC="$CC -Kpthread"
3238 CXX="$CXX -Kpthread"
3243 CC="$CC -Kthread"
3245 CXX="$CXX -Kthread"
3250 CC="$CC -pthread"
3252 CXX="$CXX -pthread"
3256 if test ! -z "$withval" -a -d "$withval"
3257 then LDFLAGS="$LDFLAGS -L$withval"
3278 LIBS="$LIBS -lpthread"
3279 AC_MSG_CHECKING([for pthread_create in -lpthread])
3295 LIBS="$LIBS -lpthreads"
3299 LIBS="$LIBS -lc_r"
3303 LIBS="$LIBS -lpthread"
3307 LIBS="$LIBS -lcma"
3314 LIBS="$LIBS -lmpc"
3350 if (pthread_attr_init(&attr)) return (-1);
3351 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
3352 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
3374 # Check for enable-ipv6
3375 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
3376 AC_MSG_CHECKING([if --enable-ipv6 is specified])
3378 AS_HELP_STRING([--enable-ipv6],
3425 ipv6type=unknown
3431 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
3455 linux-glibc)
3456 dnl http://www.v6.linux.or.jp/
3465 linux-inet6)
3466 dnl http://www.v6.linux.or.jp/
3467 if test -d /usr/inet6; then
3471 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
3475 if test -f /etc/netconfig; then
3476 if $GREP -q tcp6 /etc/netconfig; then
3501 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
3514 if test "$ipv6type" != "unknown"; then
3521 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
3522 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
3523 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
3539 #include <linux/can/raw.h>]],
3541 AC_DEFINE(HAVE_LINUX_CAN_RAW_FD_FRAMES, 1, [Define if compiling using Linux 3.6 or later.])
3549 #include <linux/can/raw.h>]],
3551 AC_DEFINE(HAVE_LINUX_CAN_RAW_JOIN_FILTERS, 1, [Define if compiling using Linux 4.1 or later.])
3557 # Check for --with-doc-strings
3558 AC_MSG_CHECKING(for --with-doc-strings)
3559 AC_ARG_WITH(doc-strings,
3560 AS_HELP_STRING([--with-doc-strings], [enable documentation strings (default is yes)]))
3562 if test -z "$with_doc_strings"
3572 # Check for Python-specific malloc support
3573 AC_MSG_CHECKING(for --with-pymalloc)
3575 AS_HELP_STRING([--with-pymalloc], [enable specialized mallocs (default is yes)]))
3577 if test -z "$with_pymalloc"
3584 [Define if you want to compile in Python-specific mallocs])
3588 # Check for --with-c-locale-coercion
3589 AC_MSG_CHECKING(for --with-c-locale-coercion)
3590 AC_ARG_WITH(c-locale-coercion,
3591 AS_HELP_STRING([--with-c-locale-coercion],
3592 [enable C locale coercion to a UTF-8 based locale (default is yes)]))
3594 if test -z "$with_c_locale_coercion"
3601 [Define if you want to coerce the C locale to a UTF-8 based locale])
3606 AC_MSG_CHECKING([for --with-valgrind])
3608 AS_HELP_STRING([--with-valgrind], [enable Valgrind support (default is no)]),,
3616 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
3620 AC_MSG_CHECKING(for --with-dtrace)
3622 AS_HELP_STRING([--with-dtrace],[enable DTrace support (default is no)]),,
3645 # generation flag '-G'. We check for presence of this flag, rather than
3651 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
3659 # -I${DLINCLDIR} is added to the compile rule for importdl.o
3671 if test -z "$DYNLOADFILE"
3692 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
3696 if test -z "$MACHDEP_OBJS"
3702 if test -z "$MACHDEP_OBJS"; then
3735 # Force lchmod off for Linux. Linux disallows changing the mode of symbolic
3738 if test "$MACHDEP" != linux; then
3817 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mach-o/dyld.h>]], [[void *x=_dyld_shared_cache_conta…
3903 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
3955 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
3960 dnl The -L/usr/local/lib is needed as wel to get the same compilation
3967 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
3968 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
4031 [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
4032 AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
4037 [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
4038 AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
4058 # This gets us our -lcrypt in LIBS when required on the target platform.
4076 LIBS="$LIBS -lrt"
4154 for (ai = aitop; ai; ai = ai->ai_next) {
4155 if (ai->ai_addr == NULL ||
4156 ai->ai_addrlen == 0 ||
4157 getnameinfo(ai->ai_addr, ai->ai_addrlen,
4162 switch (ai->ai_family) {
4224 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
4237 echo ' or you can specify "--disable-ipv6"'.
4315 # include <linux/if_alg.h>]], [[struct sockaddr_alg s]])],
4320 AC_DEFINE(HAVE_SOCKADDR_ALG, 1, [struct sockaddr_alg (linux/if_alg.h)])
4387 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4409 [Define this if you have the 6-arg version of gethostbyname_r().])
4428 [Define this if you have the 5-arg version of gethostbyname_r().])
4445 [Define this if you have the 3-arg version of gethostbyname_r().])
4465 # Linux requires this for correct f.p. operations
4471 # check for --with-libm=...
4475 *) LIBM=-lm
4477 AC_MSG_CHECKING(for --with-libm=STRING)
4479 …AS_HELP_STRING([--with-libm=STRING], [override libm math library to STRING (default is system-depe…
4487 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
4491 # check for --with-libc=...
4493 AC_MSG_CHECKING(for --with-libc=STRING)
4495 …AS_HELP_STRING([--with-libc=STRING], [override libc C library to STRING (default is system-depende…
4503 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
4530 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4535 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4538 # Some ARM platforms use a mixed-endian representation for doubles.
4540 # (see e.g., issue 1762561), we can at least make sure that float <-> string
4545 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4546 in ARM mixed-endian order (byte order 45670123)])
4550 # correctly-rounded string <-> double conversion functions from
4551 # Python/dtoa.c, which in turn require that the FPU uses 53-bit
4585 # Detect whether system arithmetic is subject to x87-style double
4588 # mode is round-to-nearest and double rounding issues are present, and
4590 AC_MSG_CHECKING(for x87-style double rounding)
4599 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
4600 x = 0.99999999999999989; /* 1-2**-53 */
4604 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
4622 [Define if arithmetic is subject to x87-style double rounding issue])
4694 return res==-1 ? 1 : 0;
4712 AC_ARG_ENABLE(big-digits,
4713 AS_HELP_STRING([--enable-big-digits@<:@=15|30@:>@],[use big digits (30 or 15 bits) for Python longs…
4722 AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;;
4744 AC_MSG_CHECKING(for UCS-4 tcl)
4767 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
4778 if test "$ac_cv_sizeof_wchar_t" -ge 2 \
4779 -a "$ac_cv_wchar_t_signed" = "no"
4792 if test -f /etc/os-release; then
4793 OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
4795 # bpo-43667: In Oracle Solaris, the internal form of wchar_t in
4796 # non-Unicode locales is not Unicode and hence cannot be used directly.
4799 [Define if the internal form of wchar_t in non-Unicode locales
4814 # * The Python implementation (always 'cpython-' for us)
4816 # * --with-pydebug (adds a 'd')
4819 # would get a shared library ABI version tag of 'cpython-32dmu' and shared
4820 # libraries would be named 'foo.cpython-32dmu.so'.
4822 # In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
4823 # In Python 3.7 and older, --with-pymalloc added a 'm' flag.
4828 SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
4832 if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
4835 …ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATF…
4849 if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
4850 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
4860 # Check for --with-platlibdir
4864 AC_MSG_CHECKING(for --with-platlibdir)
4866 AS_HELP_STRING([--with-platlibdir=DIRNAME],
4870 # --with-platlibdir
4871 # --with-platlibdir=
4872 # --without-platlibdir
4873 if test -n "$withval" -a "$withval" != yes -a "$withval" != no
4887 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
4889 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
4893 # Check for --with-wheel-pkg-dir=PATH
4896 AC_MSG_CHECKING(for --with-wheel-pkg-dir)
4897 AC_ARG_WITH(wheel-pkg-dir,
4898 AS_HELP_STRING([--with-wheel-pkg-dir=PATH],
4901 if test -n "$withval"; then
4916 return (((-1)>>3 == -1) ? 0 : 1);
4947 [AS_HELP_STRING([--with(out)-readline@<:@=editline@:>@],
4968 AC_MSG_ERROR([proper usage is --with(out)-readline@<:@=editline@:>@])
4977 if test -z "$py_libtermcap"; then
4978 READLINE_LIBS="-l$LIBREADLINE"
4980 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
5076 if (val1 != -1 && val1 == nice(2))
5141 tm->tm_zone does not exist since it is the alternative way
5148 time_t groundhogday = 1044144000; /* GMT-based */
5153 if (localtime(&groundhogday)->tm_hour != 0)
5164 if (localtime(&groundhogday)->tm_hour != 19)
5171 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
5173 if (localtime(&groundhogday)->tm_hour != 11)
5181 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
5183 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
5235 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
5275 w->_flags = 0;
5428 LIBS="$LIBS -framework CoreFoundation"
5459 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
5462 if (strcmp(buffer, "-123"))
5470 [ac_cv_have_size_t_format="cross -- assuming yes"
5494 size_t len = -1;
5511 # Check for --with-computed-gotos
5512 AC_MSG_CHECKING(for --with-computed-gotos)
5513 AC_ARG_WITH(computed-gotos,
5514 AS_HELP_STRING([--with-computed-gotos],
5549 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
5576 if test ! -d $dir; then
5582 # Availability of -O2:
5583 AC_MSG_CHECKING(for -O2)
5585 CFLAGS="-O2"
5592 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
5595 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
5629 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
5632 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
5634 CFLAGS="-O2"
5659 [Define if gcc has the ipa-pure-const bug.])
5712 [AS_HELP_STRING([--with-ensurepip@<:@=install|upgrade|no@:>@],
5720 [AC_MSG_ERROR([--with-ensurepip=upgrade|install|no])])
5744 # check if the Linux getrandom() syscall is available
5745 AC_MSG_CHECKING(for the Linux getrandom() syscall)
5751 #include <linux/random.h>
5767 [Define to 1 if the Linux getrandom() syscall is available])
5800 if test "$ac_cv_search_shm_open" = "-lrt"; then
5802 [Define to 1 if you must link with -lrt for shm_open().])
5823 AC_MSG_CHECKING(for --with-openssl-rpath)
5824 AC_ARG_WITH(openssl-rpath,
5825 AS_HELP_STRING([--with-openssl-rpath=@<:@DIR|auto|no@:>@],
5828 auto: auto-detect rpath from --with-openssl and pkg-config,
5838 [test -d "$with_openssl_rpath"],
5840 AC_MSG_ERROR([--with-openssl-rpath "$with_openssl_rpath" is not a directory]))
5896 AC_MSG_CHECKING(for --with-ssl-default-suites)
5897 AC_ARG_WITH(ssl-default-suites,
5898 AS_HELP_STRING([--with-ssl-default-suites=@<:@python|openssl|STRING@:>@],
5928 AC_MSG_CHECKING(for --with-builtin-hashlib-hashes)
5929 AC_ARG_WITH(builtin-hashlib-hashes,
5930 AS_HELP_STRING([--with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2],
5950 # --with-experimental-isolated-subinterpreters
5953 AC_MSG_CHECKING(for --with-experimental-isolated-subinterpreters)
5954 AC_ARG_WITH(experimental-isolated-subinterpreters,
5955 AS_HELP_STRING([--with-experimental-isolated-subinterpreters],
5967 # --with-static-libpython
5969 AC_MSG_CHECKING(for --with-static-libpython)
5970 AC_ARG_WITH(static-libpython,
5971 AS_HELP_STRING([--without-static-libpython],
5996 AC_MSG_CHECKING(for --disable-test-modules)
5997 AC_ARG_ENABLE(test-modules,
5998 AS_HELP_STRING([--disable-test-modules], [don't build nor install test modules]))
6010 AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
6015 if test ! -f Modules/Setup.local
6021 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
6022 -s Modules \
6026 if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
6030 echo "please run ./configure --enable-optimizations" >&AS_MESSAGE_FD