• Home
  • Raw
  • Download

Lines Matching +full:clang +full:- +full:cl +full:- +full:10 +full:- +full:x64

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
66 if test -z "$PYTHON_FOR_BUILD"; then
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'`
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@:>@],
161 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
162 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
165 if test ! -d "${enableval}"
179 if test ! -d "${UNIVERSALSDK}"
181 AC_MSG_ERROR([--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}])
190 if test -n "${UNIVERSALSDK}"
201 # For backward compatibility reasons we prefer to select '32-bit' if available,
203 UNIVERSAL_ARCHS="32-bit"
204 if test "`uname -s`" = "Darwin"
206 if test -n "${UNIVERSALSDK}"
208 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
216 AC_MSG_CHECKING(for --with-universal-archs)
217 AC_ARG_WITH(universal-archs,
218 AS_HELP_STRING([--with-universal-archs=ARCH],
220 only valid when --enable-universalsdk is set; options are:
221 … ("universal2", "32-bit", "64-bit", "3-way", "intel", "intel-32", "intel-64", or "all")
227 if test -n "${UNIVERSALSDK}"
234 AC_ARG_WITH(framework-name,
235 AS_HELP_STRING([--with-framework-name=FRAMEWORK],
237 only valid when --enable-framework is set. see Mac/README.rst
242 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
250 AS_HELP_STRING([--enable-framework@<:@=INSTALLDIR@:>@],
262 PYTHONFRAMEWORKDIR=no-framework
314 # --prefix option, but wants to install
315 # the framework in a non-default location,
339 PYTHONFRAMEWORKDIR=no-framework
371 ## AS_HELP_STRING([--with-dyld],
374 # Set name for machine-dependent library files
375 AC_ARG_VAR([MACHDEP], [name for machine-dependent library files])
377 if test -z "$MACHDEP"
385 *-*-linux-android*)
386 ac_sys_system=Linux-android
388 *-*-linux*)
391 *-*-cygwin*)
394 *-*-vxworks*)
404 ac_sys_system=`uname -s`
406 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
407 ac_sys_release=`uname -v`
409 ac_sys_release=`uname -r`
413 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
415 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
431 *-*-linux*)
440 *-*-cygwin*)
443 *-*-vxworks*)
451 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
486 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
498 OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
513 Darwin/@<:@[12]@:>@@<:@0-9@:>@.*)
521 if test `uname -r` -eq 1; then
536 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
546 # X/Open 7, incorporating POSIX.1-2008
553 # cases for HP-UX, we define it globally.
555 Define to activate Unix95-and-earlier features)
557 AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008)
560 # On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
573 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
590 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
592 AC_MSG_ERROR([cached CC is different -- throw away $cache_file
596 # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
597 # when the compiler supports them, but we don't always want -O2, and
598 # we set -g later.
599 if test -z "$CFLAGS"; then
608 if test -z "${CC}"
616 if test -x "${as_dir}/gcc"; then
617 if test -z "${found_gcc}"; then
621 if test -x "${as_dir}/clang"; then
622 if test -z "${found_clang}"; then
623 found_clang="${as_dir}/clang"
629 if test -n "$found_gcc" -a -n "$found_clang"
631 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
633 AC_MSG_NOTICE([Detected llvm-gcc, falling back to clang])
639 elif test -z "$found_gcc" -a -n "$found_clang"
641 AC_MSG_NOTICE([No GCC found, use CLANG])
645 elif test -z "$found_gcc" -a -z "$found_clang"
647 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
648 if test -n "${found_clang}"
650 AC_MSG_NOTICE([Using clang from Xcode.app])
652 CXX="`/usr/bin/xcrun -find clang++`"
666 AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
668 AS_HELP_STRING([--with-cxx-main@<:@=COMPILER@:>@],
679 if test -z "$CXX"
690 if test -z "$CXX"
695 clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
703 if test -z "$CXX"
705 AC_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
721 MULTIARCH=$($CC --print-multiarch 2>/dev/null)
741 x86_64-linux-gnu
743 x86_64-linux-gnux32
745 i386-linux-gnu
748 aarch64_ilp32-linux-gnu
750 aarch64-linux-gnu
754 aarch64_be_ilp32-linux-gnu
756 aarch64_be-linux-gnu
759 alpha-linux-gnu
762 arm-linux-gnueabihf
764 armeb-linux-gnueabihf
768 arm-linux-gnueabi
770 armeb-linux-gnueabi
773 hppa-linux-gnu
775 ia64-linux-gnu
777 m68k-linux-gnu
780 mipsisa32r6el-linux-gnu
782 mipsisa64r6el-linux-gnuabin32
784 mipsisa64r6el-linux-gnuabi64
790 mipsisa32r6-linux-gnu
792 mipsisa64r6-linux-gnuabin32
794 mipsisa64r6-linux-gnuabi64
800 mipsel-linux-gnu
802 mips64el-linux-gnuabin32
804 mips64el-linux-gnuabi64
810 mips-linux-gnu
812 mips64-linux-gnuabin32
814 mips64-linux-gnuabi64
819 or1k-linux-gnu
821 powerpc-linux-gnuspe
824 powerpc64le-linux-gnu
826 powerpc64-linux-gnu
829 powerpc-linux-gnu
831 s390x-linux-gnu
833 s390-linux-gnu
835 sh4-linux-gnu
837 sparc64-linux-gnu
839 sparc-linux-gnu
842 riscv32-linux-gnu
844 riscv64-linux-gnu
853 x86_64-kfreebsd-gnu
855 i386-kfreebsd-gnu
860 i386-gnu
872 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
877 rm -f conftest.c conftest.out
888 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
892 AC_MSG_CHECKING([for -Wl,--no-as-needed])
894 LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
896 [NO_AS_NEEDED="-Wl,--no-as-needed"
918 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
919 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
921 if test -z "$ANDROID_API_LEVEL"; then
930 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
931 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
936 rm -f conftest.c conftest.out
947 AC_MSG_CHECKING(for --with-suffix)
949 … AS_HELP_STRING([--with-suffix=SUFFIX], [set executable suffix to SUFFIX (default is '.exe')]),
958 # Test whether we're running on a non-case-sensitive system, in which
961 AC_MSG_CHECKING(for case-insensitive build directory)
962 if test ! -d CaseSensitiveTestDir; then
966 if test -d casesensitivetestdir
979 cc|*/cc) CC="$CC -Ae";;
985 if test -z "$LIBRARY"
1003 # on the system - some systems like version suffix, others don't
1023 # LINKCC is the command that links the python executable -- default is $(CC).
1029 if test -z "$LINKCC"
1035 # support -N.
1051 if test $ac_sys_release -ge 5 -o \
1052 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
1061 # distutils.unixccompiler to know if it should add --enable-new-dtags
1068 ac_prog=`$CC -print-prog-name=ld`
1070 case `"$ac_prog" -V 2>&1 < /dev/null` in
1078 AC_MSG_CHECKING(for --enable-shared)
1080 … AS_HELP_STRING([--enable-shared], [enable building a shared Python library (default is no)]))
1082 if test -z "$enable_shared"
1093 AC_MSG_CHECKING(for --enable-profiling)
1095 … AS_HELP_STRING([--enable-profiling], [enable C-level code profiling with gprof (default is no)]))
1098 CC="$CC -pg"
1109 BASECFLAGS="-pg $BASECFLAGS"
1110 LDFLAGS="-pg $LDFLAGS"
1117 # will find it with a -framework option). For this reason there is an
1141 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
1151 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1160 case `uname -m` in
1168 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
1173 BLDLIBRARY='-L. -lpython$(LDVERSION)'
1203 if test -z "$ARFLAGS"
1221 # install -d does not work on HP-UX
1222 if test -z "$INSTALL"
1224 INSTALL="${srcdir}/install-sh -c"
1232 if test -z "$LN" ; then
1234 CYGWIN*) LN="ln -s";;
1243 # Check for --with-pydebug
1244 AC_MSG_CHECKING(for --with-pydebug)
1246 AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined (default is no)]),
1251 [Define if you want to build an interpreter with many run-time checks.])
1259 # Check for --with-trace-refs
1260 # --with-trace-refs
1261 AC_MSG_CHECKING(for --with-trace-refs)
1262 AC_ARG_WITH(trace-refs,
1264 [--with-trace-refs],
1274 # Check for --with-assertions.
1277 AC_MSG_CHECKING(for --with-assertions)
1279 AS_HELP_STRING([--with-assertions],[build with C assertions enabled (default is no)]),
1290 AC_MSG_RESULT(implied by --with-pydebug)
1299 AC_MSG_CHECKING(for --enable-optimizations)
1301 [--enable-optimizations],
1317 # who want LTO need to use --with-lto themselves.
1318 DEF_MAKE_ALL_RULE="profile-opt"
1329 if test -z "$PROFILE_TASK"
1331 PROFILE_TASK='-m test --pgo'
1335 # Make llvm-relatec checks work on systems where llvm tools are not installed with their
1337 # non-suffixed name in their versioned llvm directory.
1341 if test "${CC}" = "clang"
1343 clang_bin=`which clang`
1344 # Some systems install clang elsewhere as a symlink to the real path
1346 if test -L "${clang_bin}"
1356 AC_MSG_CHECKING(for --with-lto)
1357 AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [enable Link-Time-Optimization in any build (default …
1370 *clang*)
1372 AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
1374 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
1378 LLVM_AR_FOUND="not-found"
1380 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
1382 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
1383 if test -n "${found_llvm_ar}"
1385 LLVM_AR='/usr/bin/xcrun llvm-ar'
1387 AC_MSG_NOTICE([llvm-ar found via xcrun: ${LLVM_AR}])
1390 if test $LLVM_AR_FOUND = not-found
1393 … AC_MSG_ERROR([llvm-ar is required for a --with-lto build with clang but could not be found.])
1401 LTOFLAGS="-flto -Wl,-export_dynamic"
1404 LTOFLAGS="-flto"
1411 LTOFLAGS="-flto -Wl,-export_dynamic"
1414 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
1422 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
1424 LTOFLAGS="$LTOFLAGS -g"
1438 AC_PATH_TOOL(LLVM_PROFDATA, llvm-profdata, '', ${llvm_path})
1440 if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
1444 LLVM_PROF_FOUND="not-found"
1446 if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
1448 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
1449 if test -n "${found_llvm_profdata}"
1451 # llvm-profdata isn't directly in $PATH in some cases.
1453 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
1455 AC_MSG_NOTICE([llvm-profdata found via xcrun: ${LLVM_PROFDATA}])
1460 *clang*)
1462 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1463 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1464 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1465 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1466 if test $LLVM_PROF_FOUND = not-found
1471 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1478 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1479 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1480 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1481 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1482 if test "${LLVM_PROF_FOUND}" = "not-found"
1487 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1492 PGO_PROF_GEN_FLAG="-fprofile-generate"
1493 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
1500 PGO_PROF_GEN_FLAG="-prof-gen"
1501 PGO_PROF_USE_FLAG="-prof-use"
1511 # ------------------------
1512 # (The following bit of code is complicated enough - please keep things
1513 # indented properly. Just pretend you're editing Python code. ;-)
1521 *clang*)
1525 if $CC --version 2>&1 | grep -q clang
1537 if test "${OPT-unset}" = "unset"
1541 # For gcc 4.x we need to use -fwrapv so lets check if its supported
1542 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
1543 WRAP="-fwrapv"
1546 if test -n "${cc_is_clang}"
1548 # Clang also needs -fwrapv
1549 WRAP="-fwrapv"
1550 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
1552 CFLAGS_ALIASING="-fno-strict-aliasing"
1560 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
1561 OPT="-g -Og -Wall"
1563 OPT="-g -O0 -Wall"
1566 OPT="-g $WRAP -O3 -Wall"
1570 OPT="-O3 -Wall"
1575 SCO_SV*) OPT="$OPT -m486 -DSCO5"
1581 OPT="-O"
1590 # The -arch flags for universal builds on macOS
1597 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
1599 AC_MSG_CHECKING(for -Wextra)
1601 CC="$CC -Wextra -Werror"
1616 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
1621 # -fno-strict-aliasing on versions of GCC that support but produce
1623 AC_MSG_CHECKING(whether $CC accepts and needs -fno-strict-aliasing)
1625 CC="$CC -fno-strict-aliasing"
1632 CC="$ac_save_cc -fstrict-aliasing"
1633 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
1651 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
1663 CC="$CC -Wunused-result -Werror"
1682 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
1683 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
1688 CC="$CC -Wunused-parameter -Werror"
1703 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
1708 CC="$CC -Wmissing-field-initializers -Werror"
1723 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
1728 CC="$CC -Wsign-compare"
1745 BASECFLAGS="$BASECFLAGS -Wsign-compare"
1750 CC="$CC -Wunreachable-code"
1765 # results in non-standard code paths.
1768 # It is supported on clang but on OS X systems gcc may be an alias
1769 # for clang. Try to determine if the compiler is not really gcc and,
1773 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
1775 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
1781 AC_MSG_CHECKING(if we can turn on $CC strict-prototypes warning)
1783 CC="$CC -Werror -Wstrict-prototypes"
1798 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
1803 CC="$CC -Werror=implicit-function-declaration"
1818 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
1823 CC="$CC -fvisibility=hidden"
1838 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
1841 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
1846 BASECFLAGS="$BASECFLAGS -mieee"
1852 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
1856 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
1857 # used to be here, but non-Apple gcc doesn't accept them.
1866 CC=gcc-4.0
1867 CPP=cpp-4.0
1876 32-bit)
1877 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
1881 64-bit)
1882 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
1887 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
1888 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1889 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1892 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
1897 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
1898 LIPO_32BIT_FLAGS="-extract i386"
1899 ARCH_RUN_32BIT="/usr/bin/arch -i386"
1901 intel-32)
1902 UNIVERSAL_ARCH_FLAGS="-arch i386"
1906 intel-64)
1907 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
1911 3-way)
1912 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
1913 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1914 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1917 … AC_MSG_ERROR([proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way])
1923 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
1924 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
1925 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
1946 cur_target_major=`sw_vers -productVersion | \
1947 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
1948 cur_target_minor=`sw_vers -productVersion | \
1949 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
1951 if test ${cur_target_major} -eq 10 && \
1952 test ${cur_target_minor} -ge 3 && \
1953 test ${cur_target_minor} -le 5
1960 all|3-way|intel|64-bit)
1973 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
1988 AC_MSG_ERROR(check config.log and use the '--with-universal-archs' option)
1999 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
2002 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
2010 # ICC needs -fp-model strict or floats behave badly
2011 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
2014 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
2021 OPT="-DNDEBUG $OPT"
2033 # options before we can check whether -Kpthread improves anything.
2062 # -Kpthread, if available, provides the right #defines
2064 # Some compilers won't report that they do not support -Kpthread,
2067 AC_MSG_CHECKING(whether $CC accepts -Kpthread)
2070 CC="$CC -Kpthread"
2089 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
2091 # -Kthread, if available, provides the right #defines
2093 # Some compilers won't report that they do not support -Kthread,
2096 AC_MSG_CHECKING(whether $CC accepts -Kthread)
2099 CC="$CC -Kthread"
2118 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
2120 # -pthread, if available, provides the right #defines
2122 # Some compilers won't report that they do not support -pthread,
2125 AC_MSG_CHECKING(whether $CC accepts -pthread)
2128 CC="$CC -pthread"
2150 if test ! -z "$CXX"
2157 CXX="$CXX -Kpthread"
2161 CXX="$CXX -Kthread"
2165 CXX="$CXX -pthread"
2172 $CXX -c conftest.$ac_ext 2>&5
2173 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
2174 && test -s conftest$ac_exeext && ./conftest$ac_exeext
2180 rm -fr conftest*
2189 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
2214 # bluetooth/bluetooth.h has been known to not compile with -std=c99.
2217 CFLAGS="-std=c99 $CFLAGS"
2378 if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2379 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
2402 then CC="$CC -Kpthread"
2404 then CC="$CC -Kthread"
2406 then CC="$CC -pthread"
2427 if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
2446 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
2457 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
2461 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
2463 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2464 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2466 gcc_version=`gcc -dumpversion`
2469 LIBTOOL_CRUFT="-lcc_dynamic"
2515 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
2516 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2517 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2519 AC_MSG_CHECKING(for --enable-framework)
2522 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
2523 # -F. is needed to allow linking to the framework while
2531 …AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --
2541 [Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
2542 dynamic linker (dyld) instead of the old-style (NextStep) dynamic
2560 # -- usually .so, .sl on HP-UX, .dll on Cygwin
2562 if test -z "$SHLIB_SUFFIX"; then
2565 case `uname -m` in
2577 # -- "cc -G" on SunOS 5.x.
2581 if test -z "$LDSHARED"
2585 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2586 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
2590 LDSHARED='$(CC) -shared'
2591 LDCXXSHARED='$(CXX) -shared'
2593 LDSHARED='$(CC) -G'
2594 LDCXXSHARED='$(CXX) -G'
2598 LDSHARED='$(CC) -shared'
2599 LDCXXSHARED='$(CXX) -shared'
2601 LDSHARED='$(CC) -b'
2602 LDCXXSHARED='$(CXX) -b'
2605 LDSHARED='$(CC) -bundle'
2606 LDCXXSHARED='$(CXX) -bundle'
2614 LDSHARED="$LDSHARED -undefined suppress"
2615 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
2618 LDSHARED='$(CC) -bundle'
2619 LDCXXSHARED='$(CXX) -bundle'
2626 # No framework, use the Python app as bundle-loader
2627 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2628 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2629 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2632 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
2636 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
2638 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
2639 if test ${dep_target_major} -eq 10 && \
2640 test ${dep_target_minor} -le 2
2643 LDSHARED='$(CC) -bundle'
2644 LDCXXSHARED='$(CXX) -bundle'
2651 # No framework, use the Python app as bundle-loader
2652 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2653 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2654 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2658 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
2659 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
2664 LDSHARED='$(CC) -shared'
2665 LDCXXSHARED='$(CXX) -shared';;
2667 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2669 LDSHARED='$(CC) -shared'
2670 LDCXXSHARED='$(CXX) -shared'
2672 LDSHARED="ld -Bshareable"
2675 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2677 LDSHARED='$(CC) -shared $(CCSHARED)'
2678 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2680 case `uname -r` in
2681 [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
2682 LDSHARED="ld -Bshareable ${LDFLAGS}"
2685 LDSHARED='$(CC) -shared $(CCSHARED)'
2686 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2691 LDSHARED='$(CC) -shared'
2692 LDCXXSHARED='$(CXX) -shared';;
2695 LDSHARED='$(CC) -shared'
2696 LDCXXSHARED='$(CXX) -shared'
2698 LDSHARED='$(CC) -G'
2699 LDCXXSHARED='$(CXX) -G'
2702 LDSHARED='$(CC) -Wl,-G,-Bexport'
2703 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
2705 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
2706 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
2711 LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
2712 BLDSHARED=${BLDSHARED-$LDSHARED}
2714 # library (module) -- this is only needed for a few systems
2716 if test -z "$CCSHARED"
2720 then CCSHARED="-fPIC";
2721 elif test `uname -p` = sparc;
2722 then CCSHARED="-xcode=pic32";
2723 else CCSHARED="-Kpic";
2726 then CCSHARED="-fPIC";
2729 Linux-android*) ;;
2730 Linux*|GNU*) CCSHARED="-fPIC";;
2731 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
2734 then CCSHARED="-fPIC"
2735 else CCSHARED="-KPIC"
2739 then CCSHARED="-fPIC"
2740 else CCSHARED="-Kpic -belf"
2743 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
2748 # the python executable -- this is only needed for a few systems
2750 if test -z "$LINKFORSHARED"
2753 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
2755 LINKFORSHARED="-Wl,-E -Wl,+s";;
2756 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
2757 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
2758 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
2759 # -u libsys_s pulls in all symbols in libsys
2761 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
2768 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
2775 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
2776 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
2777 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
2779 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2781 LINKFORSHARED="-Wl,--export-dynamic"
2785 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
2787 LINKFORSHARED="-Xlinker --export-dynamic"
2793 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
2796 # -Wl,-E causes the symbols to be added to the dynamic
2798 # is loaded. -N 2048K causes the stack size to be set
2801 LINKFORSHARED='-Wl,-E -N 2048K';;
2803 LINKFORSHARED='--export-dynamic';;
2824 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
2825 # library (with --enable-shared).
2844 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
2873 # Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
2874 # stream in big-endian byte-order
2895 LIBS="-lintl $LIBS"])
2911 dnl The AIX_BUILDDATE is obtained from the kernel fileset - bos.mp64
2916 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
2955 AC_MSG_CHECKING(for --with-hash-algorithm)
2958 AS_HELP_STRING([--with-hash-algorithm=@<:@fnv|siphash24@:>@],
2978 if test -z "$1"; then
2985 if ( echo $1 | grep -qE '(^|:)(@<:@^/@:>@|$)' ); then
2986 AC_MSG_ERROR([--with-tzpath must contain only absolute paths, not $1])
2992 AC_MSG_CHECKING(for --with-tzpath)
2994 AS_HELP_STRING([--with-tzpath=<list of absolute paths separated by pathsep>]
2999 AC_MSG_ERROR([--with-tzpath requires a value])
3012 AC_MSG_CHECKING(for --with-address-sanitizer)
3014 AS_HELP_STRING([--with-address-sanitizer],
3018 BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
3019 LDFLAGS="-fsanitize=address $LDFLAGS"
3025 AC_MSG_CHECKING(for --with-memory-sanitizer)
3027 AS_HELP_STRING([--with-memory-sanitizer],
3031 BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
3032 LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
3038 AC_MSG_CHECKING(for --with-undefined-behavior-sanitizer)
3040 AS_HELP_STRING([--with-undefined-behavior-sanitizer],
3044 BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
3045 LDFLAGS="-fsanitize=undefined $LDFLAGS"
3049 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3050 AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
3051 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
3053 AC_MSG_CHECKING(for --with-libs)
3055 … AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),
3065 AC_MSG_CHECKING(for --with-system-expat)
3067 …AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library, see …
3074 AC_MSG_CHECKING(for --with-system-ffi)
3076 …AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library, see Doc/…
3087 AC_MSG_ERROR([--with-system-ffi accepts no arguments])
3095 AC_MSG_WARN([--with(out)-system-ffi is ignored on this platform])
3100 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
3101 … LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
3108 AC_MSG_CHECKING(for --with-system-libmpdec)
3110 …AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec librar…
3116 # Check whether _decimal should use a coroutine-local or thread-local context
3117 AC_MSG_CHECKING(for --with-decimal-contextvar)
3119 …AS_HELP_STRING([--with-decimal-contextvar], [build _decimal module using a coroutine-local rather …
3126 …[Define if you want build the _decimal module using a coroutine-local rather than a thread-local c…
3132 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
3133 AC_ARG_ENABLE(loadable-sqlite-extensions,
3134 AS_HELP_STRING([--enable-loadable-sqlite-extensions],
3141 # Check for --with-tcltk-includes=path and --with-tcltk-libs=path
3144 AC_MSG_CHECKING(for --with-tcltk-includes)
3145 AC_ARG_WITH(tcltk-includes,
3146 … AS_HELP_STRING([--with-tcltk-includes='-I...'], [override search for Tcl and Tk include files]),
3150 AC_MSG_CHECKING(for --with-tcltk-libs)
3151 AC_ARG_WITH(tcltk-libs,
3152 AS_HELP_STRING([--with-tcltk-libs='-L...'], [override search for Tcl and Tk libs]),
3160 AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
3169 # Check for --with-dbmliborder
3170 AC_MSG_CHECKING(for --with-dbmliborder)
3172 …AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [override order to check db backends for dbm; a v…
3176 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3181 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
3190 [Define to force use of thread-safe errno, h_errno, and other functions])
3198 CFLAGS="$CFLAGS -D_REENTRANT"
3202 CC="$CC -Kpthread"
3204 CXX="$CXX -Kpthread"
3209 CC="$CC -Kthread"
3211 CXX="$CXX -Kthread"
3216 CC="$CC -pthread"
3218 CXX="$CXX -pthread"
3222 if test ! -z "$withval" -a -d "$withval"
3223 then LDFLAGS="$LDFLAGS -L$withval"
3244 LIBS="$LIBS -lpthread"
3245 AC_MSG_CHECKING([for pthread_create in -lpthread])
3261 LIBS="$LIBS -lpthreads"
3265 LIBS="$LIBS -lc_r"
3269 LIBS="$LIBS -lpthread"
3273 LIBS="$LIBS -lcma"
3280 LIBS="$LIBS -lmpc"
3316 if (pthread_attr_init(&attr)) return (-1);
3317 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
3318 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
3340 # Check for enable-ipv6
3341 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
3342 AC_MSG_CHECKING([if --enable-ipv6 is specified])
3344 AS_HELP_STRING([--enable-ipv6],
3397 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
3421 linux-glibc)
3431 linux-inet6)
3433 if test -d /usr/inet6; then
3437 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
3441 if test -f /etc/netconfig; then
3442 if $GREP -q tcp6 /etc/netconfig; then
3467 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
3487 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
3488 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
3489 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
3523 # Check for --with-doc-strings
3524 AC_MSG_CHECKING(for --with-doc-strings)
3525 AC_ARG_WITH(doc-strings,
3526 AS_HELP_STRING([--with-doc-strings], [enable documentation strings (default is yes)]))
3528 if test -z "$with_doc_strings"
3538 # Check for Python-specific malloc support
3539 AC_MSG_CHECKING(for --with-pymalloc)
3541 AS_HELP_STRING([--with-pymalloc], [enable specialized mallocs (default is yes)]))
3543 if test -z "$with_pymalloc"
3550 [Define if you want to compile in Python-specific mallocs])
3554 # Check for --with-c-locale-coercion
3555 AC_MSG_CHECKING(for --with-c-locale-coercion)
3556 AC_ARG_WITH(c-locale-coercion,
3557 AS_HELP_STRING([--with-c-locale-coercion],
3558 [enable C locale coercion to a UTF-8 based locale (default is yes)]))
3560 if test -z "$with_c_locale_coercion"
3567 [Define if you want to coerce the C locale to a UTF-8 based locale])
3572 AC_MSG_CHECKING([for --with-valgrind])
3574 AS_HELP_STRING([--with-valgrind], [enable Valgrind support (default is no)]),,
3582 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
3586 AC_MSG_CHECKING(for --with-dtrace)
3588 AS_HELP_STRING([--with-dtrace],[enable DTrace support (default is no)]),,
3611 # generation flag '-G'. We check for presence of this flag, rather than
3617 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
3625 # -I${DLINCLDIR} is added to the compile rule for importdl.o
3637 if test -z "$DYNLOADFILE"
3664 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
3668 if test -z "$MACHDEP_OBJS"
3674 if test -z "$MACHDEP_OBJS"; then
3789 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mach-o/dyld.h>]], [[void *x=_dyld_shared_cache_conta…
3864 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
3916 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
3921 dnl The -L/usr/local/lib is needed as wel to get the same compilation
3928 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
3929 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
3992 [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
3993 AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
3998 [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
3999 AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
4019 # This gets us our -lcrypt in LIBS when required on the target platform.
4037 LIBS="$LIBS -lrt"
4115 for (ai = aitop; ai; ai = ai->ai_next) {
4116 if (ai->ai_addr == NULL ||
4117 ai->ai_addrlen == 0 ||
4118 getnameinfo(ai->ai_addr, ai->ai_addrlen,
4123 switch (ai->ai_family) {
4185 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
4198 echo ' or you can specify "--disable-ipv6"'.
4299 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(int x) { return 0; }]], [[return foo(10);]])],
4319 ]], [[return foo(10, "", 3.14);]])],[
4348 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4370 [Define this if you have the 6-arg version of gethostbyname_r().])
4389 [Define this if you have the 5-arg version of gethostbyname_r().])
4406 [Define this if you have the 3-arg version of gethostbyname_r().])
4432 # check for --with-libm=...
4436 *) LIBM=-lm
4438 AC_MSG_CHECKING(for --with-libm=STRING)
4440 …AS_HELP_STRING([--with-libm=STRING], [override libm math library to STRING (default is system-depe…
4448 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
4452 # check for --with-libc=...
4454 AC_MSG_CHECKING(for --with-libc=STRING)
4456 …AS_HELP_STRING([--with-libc=STRING], [override libc C library to STRING (default is system-depende…
4464 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
4469 # * Check for gcc x64 inline assembler *
4472 AC_MSG_CHECKING(for x64 gcc inline assembler)
4480 [Define if we can use x64 gcc inline assembler])
4491 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4496 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4499 # Some ARM platforms use a mixed-endian representation for doubles.
4501 # (see e.g., issue 1762561), we can at least make sure that float <-> string
4506 [Define if C doubles are 64-bit IEEE 754 binary format, stored
4507 in ARM mixed-endian order (byte order 45670123)])
4511 # correctly-rounded string <-> double conversion functions from
4512 # Python/dtoa.c, which in turn require that the FPU uses 53-bit
4546 # Detect whether system arithmetic is subject to x87-style double
4549 # mode is round-to-nearest and double rounding issues are present, and
4551 AC_MSG_CHECKING(for x87-style double rounding)
4560 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
4561 x = 0.99999999999999989; /* 1-2**-53 */
4565 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
4583 [Define if arithmetic is subject to x87-style double rounding issue])
4655 return res==-1 ? 1 : 0;
4673 AC_ARG_ENABLE(big-digits,
4674 AS_HELP_STRING([--enable-big-digits@<:@=15|30@:>@],[use big digits (30 or 15 bits) for Python longs…
4683 AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;;
4705 AC_MSG_CHECKING(for UCS-4 tcl)
4728 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
4739 if test "$ac_cv_sizeof_wchar_t" -ge 2 \
4740 -a "$ac_cv_wchar_t_signed" = "no"
4759 # * The Python implementation (always 'cpython-' for us)
4761 # * --with-pydebug (adds a 'd')
4764 # would get a shared library ABI version tag of 'cpython-32dmu' and shared
4765 # libraries would be named 'foo.cpython-32dmu.so'.
4767 # In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
4768 # In Python 3.7 and older, --with-pymalloc added a 'm' flag.
4773 SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
4777 if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
4780 …ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATF…
4794 if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
4795 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
4805 # Check for --with-platlibdir
4809 AC_MSG_CHECKING(for --with-platlibdir)
4811 AS_HELP_STRING([--with-platlibdir=DIRNAME],
4815 # --with-platlibdir
4816 # --with-platlibdir=
4817 # --without-platlibdir
4818 if test -n "$withval" -a "$withval" != yes -a "$withval" != no
4832 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
4834 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
4845 return (((-1)>>3 == -1) ? 0 : 1);
4885 if test -z "$py_libtermcap"; then
4886 READLINE_LIBS="-lreadline"
4888 READLINE_LIBS="-lreadline -l$py_libtermcap"
4905 [Define if you have the readline library (-lreadline).])
4973 if (val1 != -1 && val1 == nice(2))
5038 tm->tm_zone does not exist since it is the alternative way
5045 time_t groundhogday = 1044144000; /* GMT-based */
5050 if (localtime(&groundhogday)->tm_hour != 0)
5061 if (localtime(&groundhogday)->tm_hour != 19)
5068 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
5070 if (localtime(&groundhogday)->tm_hour != 11)
5078 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
5080 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
5132 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
5172 w->_flags = 0;
5325 LIBS="$LIBS -framework CoreFoundation"
5356 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
5359 if (strcmp(buffer, "-123"))
5367 [ac_cv_have_size_t_format="cross -- assuming yes"
5391 size_t len = -1;
5408 # Check for --with-computed-gotos
5409 AC_MSG_CHECKING(for --with-computed-gotos)
5410 AC_ARG_WITH(computed-gotos,
5411 AS_HELP_STRING([--with-computed-gotos],
5446 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
5473 if test ! -d $dir; then
5479 # Availability of -O2:
5480 AC_MSG_CHECKING(for -O2)
5482 CFLAGS="-O2"
5489 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
5492 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
5526 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
5529 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
5531 CFLAGS="-O2"
5556 [Define if gcc has the ipa-pure-const bug.])
5608 [AS_HELP_STRING([--with-ensurepip@<:@=install|upgrade|no@:>@],
5616 [AC_MSG_ERROR([--with-ensurepip=upgrade|install|no])])
5696 if test "$ac_cv_search_shm_open" = "-lrt"; then
5698 [Define to 1 if you must link with -lrt for shm_open().])
5762 AC_MSG_CHECKING(for --with-ssl-default-suites)
5763 AC_ARG_WITH(ssl-default-suites,
5764 AS_HELP_STRING([--with-ssl-default-suites=@<:@python|openssl|STRING@:>@],
5794 AC_MSG_CHECKING(for --with-builtin-hashlib-hashes)
5795 AC_ARG_WITH(builtin-hashlib-hashes,
5796 AS_HELP_STRING([--with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2],
5817 AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
5822 if test ! -f Modules/Setup.local
5828 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
5829 -s Modules \
5833 if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
5837 echo "please run ./configure --enable-optimizations" >&AS_MESSAGE_FD