Lines Matching +full:ipv4 +full:- +full:no +full:- +full:config +full:- +full:for +full:- +full:cpp

19 # pybuilddir.txt will be created by --generate-posix-vars in the Makefile
20 rm -f pybuilddir.txt
26 AC_MSG_CHECKING([for python interpreter for cross build])
27 if test -z "$PYTHON_FOR_BUILD"; then
28 for interp in python$PACKAGE_VERSION python2 python; do
30 …if $interp -c 'import sys;sys.exit(not (sys.version_info@<:@:2@:>@ >= (2,7) and sys.version_info@<…
39 …dir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && e…
42 AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
44 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
54 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
57 dnl This is for stuff that absolutely must end up in pyconfig.h.
73 # with other autoconf-based packages that include Python.h
74 grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
85 # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
89 # certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
94 # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
103 # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
114 AC_MSG_CHECKING([for --enable-universalsdk])
116 AS_HELP_STRING([--enable-universalsdk@<:@=SDKDIR@:>@], [Build fat binary against Mac OS X SDK]),
120 # Locate the best usable SDK, see Mac/README.txt for more
122 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
123 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
126 if test ! -d "${enableval}"
134 no)
140 if test ! -d "${UNIVERSALSDK}"
142 AC_MSG_ERROR([--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}])
151 if test -n "${UNIVERSALSDK}"
155 AC_MSG_RESULT(no)
162 # For backward compatibility reasons we prefer to select '32-bit' if available,
164 UNIVERSAL_ARCHS="32-bit"
165 if test "`uname -s`" = "Darwin"
167 if test -n "${UNIVERSALSDK}"
169 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
177 AC_MSG_CHECKING(for --with-universal-archs)
178 AC_ARG_WITH(universal-archs,
179 …LP_STRING([--with-universal-archs=ARCH], [select architectures for universal build ("32-bit", "64-
184 if test -n "${UNIVERSALSDK}"
188 AC_MSG_RESULT(no)
191 AC_ARG_WITH(framework-name,
192 AS_HELP_STRING([--with-framework-name=FRAMEWORK],
193 … [specify an alternate name of the framework built with --enable-framework]),
198 AC_MSG_ERROR([--with-framework-name without --enable-framework. See Mac/README])
202 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
210 … AS_HELP_STRING([--enable-framework@<:@=INSTALLDIR@:>@], [Build (MacOSX|Darwin) framework]),
217 no)
219 PYTHONFRAMEWORKDIR=no-framework
269 # --prefix option, but wants to install
270 # the framework in a non-default location,
285 # Add files for Mac specific code to the list of output
295 PYTHONFRAMEWORKDIR=no-framework
323 ## AS_HELP_STRING([--with-dyld],
326 # Set name for machine-dependent library files
329 if test -z "$MACHDEP"
331 # avoid using uname for cross builds
333 # ac_sys_system and ac_sys_release are only used for setting
334 # `define_xopen_source' in the case statement below. For the
337 *-*-linux*)
340 *-*-cygwin*)
344 # for now, limit cross builds to known configurations
346 AC_MSG_ERROR([cross build not supported for $host])
350 ac_sys_system=`uname -s`
352 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
353 ac_sys_release=`uname -v`
355 ac_sys_release=`uname -r`
359 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
361 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
377 *-*-linux*)
386 *-*-cygwin*)
390 # for now, limit cross builds to known configurations
392 AC_MSG_ERROR([cross build not supported for $host])
394 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
399 # features as extensions. For these systems, we skip the definition of
401 # some feature, make sure there is no alternative way to access this
403 # need for not defining _XOPEN_SOURCE on all systems matching the
410 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
414 define_xopen_source=no
429 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
430 define_xopen_source=no;;
434 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
437 define_xopen_source=no;;
440 # Reconfirmed for 7.1.4 by Martin v. Loewis.
441 OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
442 define_xopen_source=no;;
446 define_xopen_source=no;;
448 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
450 define_xopen_source=no;;
457 # has no effect, don't bother defining them
459 define_xopen_source=no;;
460 Darwin/1@<:@0-9@:>@.*)
461 define_xopen_source=no;;
466 define_xopen_source=no;;
468 if test `uname -r` -eq 1; then
469 define_xopen_source=no
475 define_xopen_source=no
488 # cases for HP-UX, we define it globally.
490 Define to activate Unix95-and-earlier features)
492 AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
502 # thus supply support for various ABI/ISA combinations. The MACHDEP
506 if test ! -z "$SGI_ABI"
515 PLATDIR=plat-$MACHDEP
517 # And add extra plat-mac for darwin
521 if test -z "$EXTRAPLATDIR"
536 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
544 # checks for alternative programs
547 # for debug/optimization stuff. BASECFLAGS is for flags that are required
554 AC_MSG_CHECKING(for --without-gcc)
556 AS_HELP_STRING([--without-gcc], [never use gcc]),
559 no) CC=${CC:-cc}
562 without_gcc=no;;
567 AIX*) CC=${CC:-xlc_r}
574 BASECFLAGS="$BASECFLAGS -export pragma"
575 OPT="$OPT -O"
576 LDFLAGS="$LDFLAGS -nodup"
580 without_gcc=no
581 OPT="$OPT -O"
590 *) without_gcc=no;;
594 AC_MSG_CHECKING(for --with-icc)
596 AS_HELP_STRING([--with-icc], [build with icc]),
599 no) CC=${CC:-cc}
600 with_icc=no;;
607 with_icc=no])
611 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
613 AC_MSG_ERROR([cached CC is different -- throw away $cache_file
623 # #error This header file is to be used only for c99 mode compilations
626 # When autoconf tests for such a header, like stdint.h, this happens:
628 # configure:4619: cc -c conftest.c >&5
629 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
630 # #error directive: This header file is to be used only for c99 mode
633 # #error This header file is to be used only for c99 mode compilations
639 # Therefore, we use `-diag_error 1035` to have the compiler treat the
640 # warning as an error, which causes cc to return a non-zero result,
642 CFLAGS="$CFLAGS -diag_error 1035"
645 if test -z "$CXX"; then
654 if test ! -z "$preset_cflags"
661 AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
663 AS_HELP_STRING([--with-cxx-main=<compiler>],
668 no) with_cxx_main=no
674 if test -z "$CXX"
679 with_cxx_main=no
685 if test -z "$CXX"
696 if test -z "$CXX"
713 MULTIARCH=$($CC --print-multiarch 2>/dev/null)
717 # checks for UNIX variants that set C preprocessor variables
720 # Check for unsupported systems
723 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
724 echo See README for details.
729 AC_MSG_CHECKING(for --with-suffix)
731 AS_HELP_STRING([--with-suffix=.exe], [set executable suffix]),
734 no) EXEEXT=;;
740 # Test whether we're running on a non-case-sensitive system, in which
741 # case we give a warning if no ext is given
743 AC_MSG_CHECKING(for case-insensitive build directory)
744 if test ! -d CaseSensitiveTestDir; then
748 if test -d casesensitivetestdir
753 AC_MSG_RESULT(no)
761 gcc) CC="$CC -D_HAVE_BSDI";;
768 cc|*/cc) CC="$CC -Ae";;
779 if test -z "$LIBRARY"
797 # on the system - some systems like version suffix, others don't
811 # LINKCC is the command that links the python executable -- default is $(CC).
815 # This is altered for AIX in order to build the export list before
819 if test -z "$LINKCC"
825 if test $ac_sys_release -ge 5 -o \
826 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
832 # support -N.
839 # make sure we default having it set to "no": this is used by
840 # distutils.unixccompiler to know if it should add --enable-new-dtags
844 AC_MSG_CHECKING(for GNU ld)
847 ac_prog=`$CC -print-prog-name=ld`
849 case `"$ac_prog" -V 2>&1 < /dev/null` in
853 GNULD=no;;
857 AC_MSG_CHECKING(for --enable-shared)
859 AS_HELP_STRING([--enable-shared], [disable/enable building shared python library]))
861 if test -z "$enable_shared"
867 enable_shared="no";;
872 AC_MSG_CHECKING(for --enable-profiling)
874 AS_HELP_STRING([--enable-profiling], [enable C-level code profiling]))
877 CC="$CC -pg"
880 [enable_profiling=no])
883 enable_profiling=no
888 BASECFLAGS="-pg $BASECFLAGS"
889 LDFLAGS="-pg $LDFLAGS"
896 # will find it with a -framework option). For this reason there is an
899 # LDLIBRARY, but empty for MacOSX framework builds.
922 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
928 BLDLIBRARY='-L. -lpython$(VERSION)'
932 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
938 case `uname -m` in
946 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
951 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
956 BLDLIBRARY='-L. -lpython$(VERSION)'
957 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
961 BLDLIBRARY='-L. -lpython$(VERSION)'
991 if test -z "$ARFLAGS"
1000 if test -e $srcdir/.git
1002 AC_CHECK_PROG(HAS_GIT, git, found, not-found)
1004 HAS_GIT=no-repository
1008 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
1009 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
1010 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
1019 # install -d does not work on BSDI or HP-UX
1020 if test -z "$INSTALL"
1022 INSTALL="${srcdir}/install-sh -c"
1030 if test -z "$LN" ; then
1032 BeOS*) LN="ln -s";;
1033 CYGWIN*) LN="ln -s";;
1034 atheos*) LN="ln -s";;
1039 # Check for --with-pydebug
1040 AC_MSG_CHECKING(for --with-pydebug)
1042 AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined]),
1044 if test "$withval" != no
1047 [Define if you want to build an interpreter with many run-time checks.])
1050 else AC_MSG_RESULT(no); Py_DEBUG='false'
1052 [AC_MSG_RESULT(no)])
1058 # ------------------------
1059 # (The following bit of code is complicated enough - please keep things
1060 # indented properly. Just pretend you're editing Python code. ;-)
1070 if test "${OPT-unset}" = "unset"
1075 STRICT_PROTO="-Wstrict-prototypes"
1077 # For gcc 4.x we need to use -fwrapv so lets check if its supported
1078 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
1079 WRAP="-fwrapv"
1082 # Clang also needs -fwrapv
1084 *clang*) WRAP="-fwrapv"
1091 # Optimization messes up debuggers, so turn it off for
1093 OPT="-g -O0 -Wall $STRICT_PROTO"
1095 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
1099 OPT="-O3 -Wall $STRICT_PROTO"
1103 SCO_SV*) OPT="$OPT -m486 -DSCO5"
1109 OPT="-O"
1116 # The -arch flags for universal builds on OSX
1125 # so use -fno-strict-aliasing if supported.
1126 AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
1128 CC="$CC -fno-strict-aliasing"
1133 [ac_cv_no_strict_aliasing_ok=no]))
1138 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
1141 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
1146 BASECFLAGS="$BASECFLAGS -mieee"
1152 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
1156 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
1157 # used to be here, but non-Apple gcc doesn't accept them.
1166 CC=gcc-4.0
1167 CPP=cpp-4.0
1176 32-bit)
1177 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
1181 64-bit)
1182 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
1187 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
1188 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1189 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1192 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
1193 LIPO_32BIT_FLAGS="-extract i386"
1194 ARCH_RUN_32BIT="/usr/bin/arch -i386"
1196 intel-32)
1197 UNIVERSAL_ARCH_FLAGS="-arch i386"
1201 intel-64)
1202 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
1206 3-way)
1207 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
1208 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
1209 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
1212 AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way])
1218 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
1219 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
1220 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
1227 # Calculate an appropriate deployment target for this build:
1229 # features are enabled (such as builtin libedit support for readline)
1241 cur_target_major=`sw_vers -productVersion | \
1242 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
1243 cur_target_minor=`sw_vers -productVersion | \
1244 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
1246 if test ${cur_target_major} -eq 10 && \
1247 test ${cur_target_minor} -ge 3 && \
1248 test ${cur_target_minor} -le 5
1255 all|3-way|intel|64-bit)
1268 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
1282 BASECFLAGS="$BASECFLAGS -mieee"
1290 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
1293 BASECFLAGS="$BASECFLAGS -ieee -std"
1296 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
1302 # ICC needs -fp-model strict or floats behave badly
1305 BASECFLAGS="$BASECFLAGS -fp-model strict"
1312 OPT="-DNDEBUG $OPT"
1320 # disable check for icc since it seems to pass, but generates a warning
1323 ac_cv_opt_olimit_ok=no
1326 AC_MSG_CHECKING(whether $CC accepts -OPT:Olimit=0)
1329 CC="$CC -OPT:Olimit=0"
1333 [ac_cv_opt_olimit_ok=no]
1340 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
1345 # eradicated in the 3.x line. For now, make sure it isn't picked
1347 AIX*|SunOS*|HP-UX*|IRIX*)
1350 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
1354 AC_MSG_CHECKING(whether $CC accepts -Olimit 1500)
1357 CC="$CC -Olimit 1500"
1361 [ac_cv_olimit_ok=no]
1367 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
1368 HP-UX*)
1371 BASECFLAGS="$BASECFLAGS -Olimit 1500"
1382 CFLAGS="$CFLAGS -Werror -Wformat"
1390 AC_MSG_RESULT(no)
1400 AC_MSG_CHECKING(for --enable-optimizations)
1401 AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive optimizatio…
1403 if test "$enableval" != no
1409 AC_MSG_RESULT(no);
1411 [AC_MSG_RESULT(no)])
1416 # who want LTO need to use --with-lto themselves.
1417 DEF_MAKE_ALL_RULE="profile-opt"
1422 REQUIRE_PGO="no"
1429 AC_MSG_CHECKING(for --with-lto)
1430 AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [Enable Link Time Optimization in PGO builds. Disable…
1432 if test "$withval" != no
1438 AC_MSG_RESULT(no);
1440 [AC_MSG_RESULT(no)])
1445 LTOFLAGS="-flto"
1450 LTOFLAGS="-flto"
1453 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
1461 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
1463 LTOFLAGS="$LTOFLAGS -g"
1476 # non-suffixed name in their versioned llvm directory.
1484 if test -L "${clang_bin}"
1493 AC_PATH_TARGET_TOOL(LLVM_PROFDATA, llvm-profdata, '', ${llvm_path})
1495 if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
1499 LLVM_PROF_FOUND="not-found"
1501 if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
1503 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
1504 if test -n "${found_llvm_profdata}"
1506 # llvm-profdata isn't directly in $PATH in some cases.
1508 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
1510 AC_MSG_NOTICE([llvm-profdata found via xcrun: ${LLVM_PROFDATA}])
1513 LLVM_PROF_ERR=no
1517 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1518 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1519 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1520 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1521 if test $LLVM_PROF_FOUND = not-found
1526 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1533 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1534 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1535 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1536 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
1537 if test "${LLVM_PROF_FOUND}" = "not-found"
1542 …AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.…
1547 PGO_PROF_GEN_FLAG="-fprofile-generate"
1548 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
1555 PGO_PROF_GEN_FLAG="-prof-gen"
1556 PGO_PROF_USE_FLAG="-prof-use"
1567 # options before we can check whether -Kpthread improves anything.
1585 ac_cv_kthread=no
1586 ac_cv_pthread=no
1587 ],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no])
1594 ac_cv_kpthread=no
1596 # -Kpthread, if available, provides the right #defines
1598 # Some compilers won't report that they do not support -Kpthread,
1601 AC_MSG_CHECKING(whether $CC accepts -Kpthread)
1604 CC="$CC -Kpthread"
1618 ]])],[ac_cv_kpthread=yes],[ac_cv_kpthread=no],[ac_cv_kpthread=no])
1623 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
1625 # -Kthread, if available, provides the right #defines
1627 # Some compilers won't report that they do not support -Kthread,
1630 AC_MSG_CHECKING(whether $CC accepts -Kthread)
1633 CC="$CC -Kthread"
1647 ]])],[ac_cv_kthread=yes],[ac_cv_kthread=no],[ac_cv_kthread=no])
1652 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
1654 # -pthread, if available, provides the right #defines
1656 # Some compilers won't report that they do not support -pthread,
1659 AC_MSG_CHECKING(whether $CC accepts -pthread)
1662 CC="$CC -pthread"
1676 ]])],[ac_cv_pthread=yes],[ac_cv_pthread=no],[ac_cv_pthread=no])
1681 # If we have set a CC compiler flag for thread support then
1682 # check if it works for CXX, too.
1683 ac_cv_cxx_thread=no
1684 if test ! -z "$CXX"
1686 AC_MSG_CHECKING(whether $CXX also accepts flags for thread support)
1691 CXX="$CXX -Kpthread"
1695 CXX="$CXX -Kthread"
1699 CXX="$CXX -pthread"
1706 $CXX -c conftest.$ac_ext 2>&5
1707 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
1708 && test -s conftest$ac_exeext && ./conftest$ac_exeext
1712 ac_cv_cxx_thread=no
1714 rm -fr conftest*
1720 dnl # check for ANSI or K&R ("traditional") preprocessor
1721 dnl AC_MSG_CHECKING(for C preprocessor type)
1723 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
1729 # checks for header files
1756 # checks for typedefs
1757 was_it_defined=no
1758 AC_MSG_CHECKING(for clock_t in time.h)
1765 AC_MSG_CHECKING(for makedev)
1775 [ac_cv_has_makedev=no])
1776 if test "$ac_cv_has_makedev" = "no"; then
1783 [ac_cv_has_makedev=no])
1796 # and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
1798 # work-around, disable LFS on such configurations
1806 ]], [[struct rlimit foo;]])],[sol_lfs_bug=no],[sol_lfs_bug=yes])
1809 use_lfs=no
1827 # Add some code to confdefs.h so that the test for off_t works on SCO
1842 # There are two separate checks for each of the exact-width integer types we
1869 # ANSI C requires sizeof(char) == 1, so no need to check it
1880 AC_MSG_CHECKING(for long long support)
1881 have_long_long=no
1891 AC_MSG_CHECKING(for long double support)
1892 have_long_double=no
1902 AC_MSG_CHECKING(for _Bool support)
1903 have_c99_bool=no
1931 if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
1932 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
1936 to add some flags for configuration and compilation to enable this mode.
1937 (For Solaris and Linux, the necessary defines are already defined.)])
1940 AC_MSG_RESULT(no)
1943 AC_MSG_RESULT(no)
1958 then CC="$CC -Kpthread"
1960 then CC="$CC -Kthread"
1962 then CC="$CC -pthread"
1964 AC_MSG_CHECKING(for pthread_t)
1965 have_pthread_t=no
1979 AC_MSG_CHECKING(for --enable-toolbox-glue)
1980 AC_ARG_ENABLE(toolbox-glue,
1981 … AS_HELP_STRING([--enable-toolbox-glue], [disable/enable MacOSX glue code for extensions]))
1983 if test -z "$enable_toolbox_glue"
1989 enable_toolbox_glue="no";;
1995 extra_undefs="-u _PyMac_Error"
1997 [Define if you want to use MacPython modules on MacOSX in unix-Python.])
2010 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
2021 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
2025 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
2027 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2028 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2030 gcc_version=`gcc -dumpversion`
2033 LIBTOOL_CRUFT="-lcc_dynamic"
2047 ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
2076 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
2077 …LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYT…
2078 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2081 AC_MSG_CHECKING(for --enable-framework)
2084 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
2085 # -F. is needed to allow linking to the framework while
2093 …AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --
2096 AC_MSG_RESULT(no)
2099 AC_MSG_CHECKING(for dyld)
2103 [Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
2104 dynamic linker (dyld) instead of the old-style (NextStep) dynamic
2106 AC_MSG_RESULT(always on for Darwin)
2109 AC_MSG_RESULT(no)
2121 # -- usually .so, .sl on HP-UX, .dll on Cygwin
2123 if test -z "$SO"
2127 case `uname -m` in
2141 echo '+ Do you really mean to change the extension for shared libraries? +'
2151 # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
2155 if test -z "$LDSHARED"
2159 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2160 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
2164 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
2166 IRIX/5*) LDSHARED="ld -shared";;
2167 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
2170 LDSHARED='$(CC) -shared'
2171 LDCXXSHARED='$(CXX) -shared'
2173 LDSHARED='$(CC) -G'
2174 LDCXXSHARED='$(CXX) -G'
2178 LDSHARED='$(CC) -shared'
2179 LDCXXSHARED='$(CXX) -shared'
2181 LDSHARED='ld -b'
2183 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2185 LDSHARED='$(CC) -bundle'
2186 LDCXXSHARED='$(CXX) -bundle'
2193 # No framework. Ignore undefined symbols, assuming they come from Python
2194 LDSHARED="$LDSHARED -undefined suppress"
2195 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
2198 LDSHARED='$(CC) -bundle'
2199 LDCXXSHARED='$(CXX) -bundle'
2206 # No framework, use the Python app as bundle-loader
2207 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2208 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2209 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2212 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
2216 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
2218 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
2219 if test ${dep_target_major} -eq 10 && \
2220 test ${dep_target_minor} -le 2
2222 # building for OS X 10.0 through 10.2
2223 LDSHARED='$(CC) -bundle'
2224 LDCXXSHARED='$(CXX) -bundle'
2231 # No framework, use the Python app as bundle-loader
2232 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
2233 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2234 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
2237 # building for OS X 10.3 and later
2238 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
2239 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
2244 LDSHARED='$(CC) -shared'
2245 LDCXXSHARED='$(CXX) -shared';;
2247 LDSHARED="gcc -shared"
2248 LDCXXSHARED="g++ -shared";;
2250 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2252 LDSHARED='$(CC) -shared'
2253 LDCXXSHARED='$(CXX) -shared'
2255 LDSHARED="ld -Bshareable"
2258 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2260 LDSHARED='$(CC) -shared $(CCSHARED)'
2261 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2263 case `uname -r` in
2264 [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
2265 LDSHARED="ld -Bshareable ${LDFLAGS}"
2268 LDSHARED='$(CC) -shared $(CCSHARED)'
2269 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
2274 LDSHARED='$(CC) -shared'
2275 LDCXXSHARED='$(CXX) -shared';;
2278 LDSHARED='$(CC) -shared'
2279 LDCXXSHARED='$(CXX) -shared'
2281 LDSHARED='$(CC) -G'
2282 LDCXXSHARED='$(CXX) -G'
2285 LDSHARED='$(CC) -Wl,-G,-Bexport'
2286 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
2288 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
2289 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
2291 LDSHARED="gcc -shared"
2292 LDCXXSHARED="g++ -shared";;
2297 LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
2298 BLDSHARED=${BLDSHARED-$LDSHARED}
2300 # library (module) -- this is only needed for a few systems
2302 if test -z "$CCSHARED"
2306 then CCSHARED="-fPIC";
2307 elif test `uname -p` = sparc;
2308 then CCSHARED="-xcode=pic32";
2309 else CCSHARED="-Kpic";
2312 then CCSHARED="-fPIC";
2315 Linux*|GNU*) CCSHARED="-fPIC";;
2316 BSD/OS*/4*) CCSHARED="-fpic";;
2317 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
2320 then CCSHARED="-fPIC"
2321 else CCSHARED="-KPIC"
2325 then CCSHARED="-fPIC"
2326 else CCSHARED="-Kpic -belf"
2329 *gcc*) CCSHARED="-shared";;
2332 atheos*) CCSHARED="-fPIC";;
2337 # the python executable -- this is only needed for a few systems
2339 if test -z "$LINKFORSHARED"
2342 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
2344 LINKFORSHARED="-Wl,-E -Wl,+s";;
2345 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
2346 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
2347 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
2348 # -u libsys_s pulls in all symbols in libsys
2350 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
2354 # -prebind is no longer used, because it actually seems to give a
2364 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
2365 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
2366 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
2368 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
2370 LINKFORSHARED="-Wl,--export-dynamic"
2374 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
2376 LINKFORSHARED="-Xlinker --export-dynamic"
2380 if test $enable_shared = "no"
2382 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
2385 # -Wl,-E causes the symbols to be added to the dynamic
2387 # is loaded. -N 2048K causes the stack size to be set
2390 LINKFORSHARED='-Wl,-E -N 2048K';;
2411 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
2412 # library (with --enable-shared).
2413 # For platforms on which shared libraries are not allowed to have unresolved
2428 # checks for libraries
2429 AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
2430 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
2432 # only check for sem_init if thread support is requested
2433 if test "$with_threads" = "yes" -o -z "$with_threads"; then
2439 # check if we need libintl for locale functions
2442 [Define to 1 if libintl is needed for locale functions.]))
2444 # checks for system dependent C++ extensions support
2446 AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support)
2452 [Define for AIX if your compiler is a genuine IBM xlC/xlC_r
2453 and you want support for AIX C++ shared extension modules.])
2456 AC_MSG_RESULT(no)
2461 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2463 AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
2464 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
2468 AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
2472 AC_MSG_CHECKING(for --with-libs)
2474 AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs]),
2479 [AC_MSG_RESULT(no)])
2483 # Check for use of the system expat library
2484 AC_MSG_CHECKING(for --with-system-expat)
2486 … AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]),
2488 [with_system_expat="no"])
2492 # Check for use of the system libffi library
2493 AC_MSG_CHECKING(for --with-system-ffi)
2495 … AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library]),
2497 [with_system_ffi="no"])
2499 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
2500 … LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
2508 # Check for --with-tcltk-includes=path and --with-tcltk-libs=path
2511 AC_MSG_CHECKING(for --with-tcltk-includes)
2512 AC_ARG_WITH(tcltk-includes,
2513 … AS_HELP_STRING([--with-tcltk-includes='-I...'], [override search for Tcl and Tk include files]),
2517 AC_MSG_CHECKING(for --with-tcltk-libs)
2518 AC_ARG_WITH(tcltk-libs,
2519 AS_HELP_STRING([--with-tcltk-libs='-L...'], [override search for Tcl and Tk libs]),
2527 AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
2536 # Check for --with-dbmliborder
2537 AC_MSG_CHECKING(for --with-dbmliborder)
2539 …AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [order to check db backends for dbm. Valid value …
2543 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
2545 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
2548 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
2557 AC_MSG_CHECKING(for --with-signal-module)
2558 AC_ARG_WITH(signal-module,
2559 AS_HELP_STRING([--with-signal-module], [disable/enable signal module]))
2561 if test -z "$with_signal_module"
2574 # This is used to generate Setup.config
2578 AC_MSG_CHECKING(for --with-dec-threads)
2580 AC_ARG_WITH(dec-threads,
2581 AS_HELP_STRING([--with-dec-threads], [use DEC Alpha/OSF1 thread-safe libraries]),
2584 LDLAST=-threads
2588 [AC_MSG_RESULT(no)])
2590 # Templates for things AC_DEFINEd more than once.
2591 # For a single AC_DEFINE, no template is needed.
2594 [Define to force use of thread-safe errno, h_errno, and other functions])
2598 AC_MSG_CHECKING(for --with-threads)
2601 … AS_HELP_STRING([--with(out)-threads@<:@=DIRECTORY@:>@], [disable/enable thread support]))
2603 # --with-thread is deprecated, but check for it anyway
2606 … AS_HELP_STRING([--with(out)-thread@<:@=DIRECTORY@:>@], [deprecated; use --with(out)-threads]),
2609 if test -z "$with_threads"
2615 if test "$with_threads" = "no"
2627 CC="$CC -Kpthread"
2629 CXX="$CXX -Kpthread"
2636 CC="$CC -Kthread"
2638 CXX="$CXX -Kthread"
2645 CC="$CC -pthread"
2647 CXX="$CXX -pthread"
2653 if test ! -z "$with_threads" -a -d "$with_threads"
2654 then LDFLAGS="$LDFLAGS -L$with_threads"
2656 if test ! -z "$withval" -a -d "$withval"
2657 then LDFLAGS="$LDFLAGS -L$withval"
2663 AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h)
2670 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
2678 LIBS="$LIBS -lthreads"
2685 AC_MSG_CHECKING(for --with-pth)
2687 AS_HELP_STRING([--with-pth], [use GNU pth threading libraries]),
2692 LIBS="-lpth $LIBS"
2694 [AC_MSG_RESULT(no)
2696 # Just looking for pthread_create in libpthread is not enough:
2700 LIBS="$LIBS -lpthread"
2701 AC_MSG_CHECKING([for pthread_create in -lpthread])
2726 LIBS="$LIBS -lpthreads"
2730 LIBS="$LIBS -lc_r"
2734 LIBS="$LIBS -lpthread"
2738 LIBS="$LIBS -lcma"
2744 LIBS="$LIBS -lmpc"
2750 LIBS="$LIBS -lthread"
2758 # needs this '-threads' argument during linking.
2760 OSF1) LDLAST=-threads;;
2766 if test "$unistd_defines_pthreads" = "no"; then
2775 [Defined for Solaris 2.6 bug in pthread header.])
2796 if (pthread_attr_init(&attr)) exit(-1);
2797 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
2798 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
2802 [ac_cv_pthread_system_supported=no],
2803 [ac_cv_pthread_system_supported=no])
2820 # Check for enable-ipv6
2821 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
2822 AC_MSG_CHECKING([if --enable-ipv6 is specified])
2824 [ --enable-ipv6 Enable ipv6 (with ipv4) support
2825 --disable-ipv6 Disable ipv6 support],
2827 no)
2828 AC_MSG_RESULT(no)
2829 ipv6=no
2846 AC_MSG_RESULT(no)
2847 ipv6=no
2861 AC_MSG_RESULT(no, IPv6 disabled)
2862 ipv6=no
2873 ipv6trylibc=no
2877 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
2901 linux-glibc)
2911 linux-inet6)
2913 if test -d /usr/inet6; then
2917 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
2921 if test -f /etc/netconfig; then
2922 if $GREP -q tcp6 /etc/netconfig; then
2947 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
2967 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
2968 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
2969 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
2975 echo 'Fatal: no $ipv6lib library found. cannot continue.'
2983 AC_MSG_CHECKING(for OSX 10.5 SDK or later)
2990 AC_MSG_RESULT(no)
2993 # Check for --with-doc-strings
2994 AC_MSG_CHECKING(for --with-doc-strings)
2995 AC_ARG_WITH(doc-strings,
2996 AS_HELP_STRING([--with(out)-doc-strings], [disable/enable documentation strings]))
2998 if test -z "$with_doc_strings"
3001 if test "$with_doc_strings" != "no"
3008 # Check for Python-specific malloc support
3009 AC_MSG_CHECKING(for --with-tsc)
3011 AS_HELP_STRING([--with(out)-tsc],[enable/disable timestamp counter profile]),[
3012 if test "$withval" != no
3017 else AC_MSG_RESULT(no)
3019 [AC_MSG_RESULT(no)])
3021 # Check for Python-specific malloc support
3022 AC_MSG_CHECKING(for --with-pymalloc)
3024 AS_HELP_STRING([--with(out)-pymalloc], [disable/enable specialized mallocs]))
3026 if test -z "$with_pymalloc"
3029 if test "$with_pymalloc" != "no"
3032 [Define if you want to compile in Python-specific mallocs])
3036 # Check for Valgrind support
3037 AC_MSG_CHECKING([for --with-valgrind])
3039 AS_HELP_STRING([--with-valgrind], [Enable Valgrind support]),,
3040 with_valgrind=no)
3042 if test "$with_valgrind" != no; then
3049 # Check for --with-wctype-functions
3050 AC_MSG_CHECKING(for --with-wctype-functions)
3051 AC_ARG_WITH(wctype-functions,
3052 AS_HELP_STRING([--with-wctype-functions], [use wctype.h functions]),
3054 if test "$withval" != no
3060 else AC_MSG_RESULT(no)
3062 [AC_MSG_RESULT(no)])
3064 # -I${DLINCLDIR} is added to the compile rule for importdl.o
3072 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3076 if test -z "$DYNLOADFILE"
3107 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
3111 if test -z "$MACHDEP_OBJS"
3119 # checks for library functions
3137 # Force lchmod off for Linux. Linux disallows changing the mode of symbolic
3144 # For some functions, having a definition is not sufficient, since
3146 AC_MSG_CHECKING(for chroot)
3150 [AC_MSG_RESULT(no)
3152 AC_MSG_CHECKING(for link)
3156 [AC_MSG_RESULT(no)
3158 AC_MSG_CHECKING(for symlink)
3162 [AC_MSG_RESULT(no)
3164 AC_MSG_CHECKING(for fchdir)
3168 [AC_MSG_RESULT(no)
3170 AC_MSG_CHECKING(for fsync)
3174 [AC_MSG_RESULT(no)
3176 AC_MSG_CHECKING(for fdatasync)
3180 [AC_MSG_RESULT(no)
3182 AC_MSG_CHECKING(for epoll)
3186 [AC_MSG_RESULT(no)
3188 AC_MSG_CHECKING(for kqueue)
3195 [AC_MSG_RESULT(no)
3198 # functions ctermid_r, setgroups in the library, but no prototype
3203 AC_MSG_CHECKING(for ctermid_r)
3209 [AC_MSG_RESULT(no)
3212 AC_CACHE_CHECK([for flock declaration], [ac_cv_flock_decl],
3219 [ac_cv_flock_decl=no]
3231 AC_MSG_CHECKING(for getpagesize)
3237 [AC_MSG_RESULT(no)
3240 AC_MSG_CHECKING(for broken unsetenv)
3244 [AC_MSG_RESULT(no)],
3249 dnl check for true
3252 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
3253 dnl On others, they are in the C library, so we to take no action
3260 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
3272 [ac_cv_have_chflags=no],
3276 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
3282 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
3292 ]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cross])
3295 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
3303 dnl On MacOSX the linker will search for dylibs on the entire linker path
3304 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
3309 dnl The -L/usr/local/lib is needed as wel to get the same compilation
3316 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
3317 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
3330 AC_MSG_CHECKING(for hstrerror)
3336 [AC_MSG_RESULT(no)
3339 AC_MSG_CHECKING(for inet_aton)
3348 [AC_MSG_RESULT(no)
3351 AC_MSG_CHECKING(for inet_pton)
3360 [AC_MSG_RESULT(no)
3364 AC_MSG_CHECKING(for setgroups)
3373 [AC_MSG_RESULT(no)
3376 # check for openpty and forkpty
3380 [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
3381 AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
3386 [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
3387 AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
3391 # Stuff for expat.
3394 # check for long file support functions
3418 AC_MSG_CHECKING(for major, minor, and makedev)
3434 AC_MSG_RESULT(no)
3438 # for [no]getaddrinfo in netdb.h.
3439 AC_MSG_CHECKING(for getaddrinfo)
3447 [have_getaddrinfo=no])
3467 for (passive = 0; passive <= 1; passive++) {
3477 for (ai = aitop; ai; ai = ai->ai_next) {
3478 if (ai->ai_addr == NULL ||
3479 ai->ai_addrlen == 0 ||
3480 getnameinfo(ai->ai_addr, ai->ai_addrlen,
3485 switch (ai->ai_family) {
3543 [ac_cv_buggy_getaddrinfo=no],
3547 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
3555 if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
3560 echo ' or you can specify "--disable-ipv6"'.
3569 # checks for structures
3580 AC_MSG_CHECKING(for time.h that defines altzone)
3584 [ac_cv_header_time_altzone=no])
3591 was_it_defined=no
3605 AC_MSG_CHECKING(for addrinfo)
3609 [ac_cv_struct_addrinfo=no]))
3615 AC_MSG_CHECKING(for sockaddr_storage)
3621 [ac_cv_struct_sockaddr_storage=no]))
3627 # checks for compiler characteristics
3632 works=no
3633 AC_MSG_CHECKING(for working volatile)
3640 works=no
3641 AC_MSG_CHECKING(for working signed char)
3648 have_prototypes=no
3649 AC_MSG_CHECKING(for prototypes)
3658 works=no
3659 AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
3678 # check for socketpair
3679 AC_MSG_CHECKING(for socketpair)
3686 [AC_MSG_RESULT(no)]
3696 [AC_MSG_RESULT(no)]
3699 va_list_is_array=no
3713 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
3735 [Define this if you have the 6-arg version of gethostbyname_r().])
3738 AC_MSG_RESULT(no)
3754 [Define this if you have the 5-arg version of gethostbyname_r().])
3757 AC_MSG_RESULT(no)
3771 [Define this if you have the 3-arg version of gethostbyname_r().])
3774 AC_MSG_RESULT(no)
3788 # checks for system services
3791 # Linux requires this for correct f.p. operations
3797 # Check for --with-fpectl
3798 AC_MSG_CHECKING(for --with-fpectl)
3800 AS_HELP_STRING([--with-fpectl], [enable SIGFPE catching]),
3802 if test "$withval" != no
3807 else AC_MSG_RESULT(no)
3809 [AC_MSG_RESULT(no)])
3811 # check for --with-libm=...
3816 *) LIBM=-lm
3818 AC_MSG_CHECKING(for --with-libm=STRING)
3820 AS_HELP_STRING([--with-libm=STRING], [math library]),
3822 if test "$withval" = no
3828 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
3832 # check for --with-libc=...
3834 AC_MSG_CHECKING(for --with-libc=STRING)
3836 AS_HELP_STRING([--with-libc=STRING], [C library]),
3838 if test "$withval" = no
3844 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
3849 # * Check for various properties of floating point *
3852 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
3865 [ac_cv_little_endian_double=no],
3866 [ac_cv_little_endian_double=no])])
3871 [Define if C doubles are 64-bit IEEE 754 binary format, stored
3875 AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
3888 [ac_cv_big_endian_double=no],
3889 [ac_cv_big_endian_double=no])])
3894 [Define if C doubles are 64-bit IEEE 754 binary format, stored
3898 # Some ARM platforms use a mixed-endian representation for doubles.
3899 # While Python doesn't currently have full support for these platforms
3900 # (see e.g., issue 1762561), we can at least make sure that float <-> string
3902 AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
3915 [ac_cv_mixed_endian_double=no],
3916 [ac_cv_mixed_endian_double=no])])
3921 [Define if C doubles are 64-bit IEEE 754 binary format, stored
3922 in ARM mixed-endian order (byte order 45670123)])
3926 # correctly-rounded string <-> double conversion functions from
3927 # Python/dtoa.c, which in turn require that the FPU uses 53-bit
3929 # rounding precision of 64 bits. For gcc/x86, we can fix this by
3932 # This inline assembler syntax may also work for suncc and icc,
3940 ]])],[have_gcc_asm_for_x87=yes],[have_gcc_asm_for_x87=no])
3948 # Detect whether system arithmetic is subject to x87-style double
3951 # mode is round-to-nearest and double rounding issues are present, and
3952 # 0 otherwise. See http://bugs.python.org/issue2937 for more info.
3953 AC_MSG_CHECKING(for x87-style double rounding)
3962 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
3963 x = 0.99999999999999989; /* 1-2**-53 */
3967 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
3977 [ac_cv_x87_double_rounding=no],
3979 [ac_cv_x87_double_rounding=no])
3985 [Define if arithmetic is subject to x87-style double rounding issue])
3989 # * Check for mathematical functions *
3995 # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
3996 # -0. on some architectures.
4005 and tanh(-0.) == -0. */
4006 if (atan2(0., -1.) == atan2(-0., -1.) ||
4007 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
4012 [ac_cv_tanh_preserves_zero_sign=no],
4013 [ac_cv_tanh_preserves_zero_sign=no])])
4018 [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
4027 # For multiprocessing module, check that sem_open
4028 # actually works. For FreeBSD versions <= 7.2,
4053 [ac_cv_posix_semaphores_enabled=no],
4057 if test $ac_cv_posix_semaphores_enabled = no
4063 # Multiprocessing check for broken sem_getvalue
4064 AC_MSG_CHECKING(for broken sem_getvalue)
4085 return res==-1 ? 1 : 0;
4088 [ac_cv_broken_sem_getvalue=no],
4099 # determine what size digit to use for Python's longs
4100 AC_MSG_CHECKING([digit size for Python's longs])
4101 AC_ARG_ENABLE(big-digits,
4102 AS_HELP_STRING([--enable-big-digits@<:@=BITS@:>@],[use big digits for Python longs [[BITS=30]]]),
4106 no)
4111 AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;;
4116 [AC_MSG_RESULT(no value specified)])
4118 # check for wchar.h
4124 wchar_h="no"
4133 AC_MSG_CHECKING(for UCS-4 tcl)
4134 have_ucs4_tcl=no
4156 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
4160 [ac_cv_wchar_t_signed=no],
4165 AC_MSG_CHECKING(what type to use for unicode)
4168 …AS_HELP_STRING([--enable-unicode@<:@=ucs@<:@24@:>@@:>@], [Enable Unicode strings (default is ucs2)…
4174 # Without any arguments, Py_UNICODE defaults to two-byte mode
4192 no) ;; # To allow --disable-unicode
4193 *) AC_MSG_ERROR([invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase).]) ;;
4197 [Define as the integral type used for Unicode representation.])
4200 if test "$enable_unicode" = "no"
4211 -a "$ac_cv_wchar_t_signed" = "no"
4228 PY_UNICODE_TYPE="no type found"
4233 # check for endianness
4243 exit(((-1)>>3 == -1) ? 0 : 1);
4247 [ac_cv_rshift_extends_sign=no],
4250 if test "$ac_cv_rshift_extends_sign" = no
4253 [Define if i>>j for signed int i does not extend the sign bit
4257 # check for getc_unlocked and related locking functions
4258 AC_MSG_CHECKING(for getc_unlocked() and friends)
4265 ]])],[ac_cv_have_getc_unlocked=yes],[ac_cv_have_getc_unlocked=no])])
4280 py_cv_lib_readline=no
4282 for py_libtermcap in "" ncursesw ncurses curses termcap; do
4283 if test -z "$py_libtermcap"; then
4284 READLINE_LIBS="-lreadline"
4286 READLINE_LIBS="-lreadline -l$py_libtermcap"
4298 if test $py_cv_lib_readline = no; then
4303 [Define if you have the readline library (-lreadline).])
4306 # check for readline 2.1
4311 # check for readline 2.2
4314 [have_readline=no]
4328 # check for readline 4.0
4343 # check for readline 4.2
4351 [have_readline=no]
4364 AC_MSG_CHECKING(for broken nice())
4370 if (val1 != -1 && val1 == nice(2))
4376 [ac_cv_broken_nice=no],
4377 [ac_cv_broken_nice=no])])
4385 AC_MSG_CHECKING(for broken poll())
4407 [ac_cv_broken_poll=no],
4408 [ac_cv_broken_poll=no]))
4422 AC_MSG_CHECKING(for working tzset())
4439 tm->tm_zone does not exist since it is the alternative way
4446 time_t groundhogday = 1044144000; /* GMT-based */
4451 if (localtime(&groundhogday)->tm_hour != 0)
4454 /* For UTC, tzname[1] is sometimes "", sometimes " " */
4462 if (localtime(&groundhogday)->tm_hour != 19)
4469 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
4471 if (localtime(&groundhogday)->tm_hour != 11)
4479 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
4481 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
4489 [ac_cv_working_tzset=no],
4490 [ac_cv_working_tzset=no])])
4498 # Look for subsecond timestamps in struct stat
4499 AC_MSG_CHECKING(for tv_nsec in struct stat)
4506 [ac_cv_stat_tv_nsec=no]))
4514 # Look for BSD style subsecond timestamps in struct stat
4515 AC_MSG_CHECKING(for tv_nsec2 in struct stat)
4522 [ac_cv_stat_tv_nsec2=no]))
4532 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
4551 [ac_cv_mvwdelch_is_expression=no]))
4571 w->_flags = 0;
4574 [ac_cv_window_has_flags=no]))
4584 AC_MSG_CHECKING(for is_pad)
4592 [AC_MSG_RESULT(no)]
4595 AC_MSG_CHECKING(for is_term_resized)
4599 [AC_MSG_RESULT(no)]
4602 AC_MSG_CHECKING(for resize_term)
4606 [AC_MSG_RESULT(no)]
4609 AC_MSG_CHECKING(for resizeterm)
4613 [AC_MSG_RESULT(no)]
4616 AC_MSG_CHECKING(for immedok)
4624 [AC_MSG_RESULT(no)]
4627 AC_MSG_CHECKING(for syncok)
4635 [AC_MSG_RESULT(no)]
4638 AC_MSG_CHECKING(for wchgat)
4646 [AC_MSG_RESULT(no)]
4649 AC_MSG_CHECKING(for filter)
4657 [AC_MSG_RESULT(no)]
4660 AC_MSG_CHECKING(for has_key)
4668 [AC_MSG_RESULT(no)]
4671 AC_MSG_CHECKING(for typeahead)
4679 [AC_MSG_RESULT(no)]
4682 AC_MSG_CHECKING(for use_env)
4690 [AC_MSG_RESULT(no)]
4695 AC_MSG_NOTICE([checking for device files])
4700 AC_MSG_CHECKING([for /dev/ptmx])
4702 AC_MSG_ERROR([set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling])
4705 AC_MSG_CHECKING([for /dev/ptc])
4707 AC_MSG_ERROR([set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling])
4724 AC_MSG_CHECKING(for %lld and %llu printf() format support)
4744 if (sprintf(buffer, "%lld", (long long)-123) < 0)
4746 if (strcmp(buffer, "-123"))
4758 [ac_cv_have_long_long_format=no],
4759 [ac_cv_have_long_long_format="cross -- assuming no"
4762 CFLAGS="$CFLAGS -Werror -Wformat"
4769 sprintf(buffer, "%lld", (long long)-123);
4783 [Define to printf format modifier for long long type])
4788 LIBS="$LIBS -framework CoreFoundation"
4792 AC_CACHE_CHECK([for %zd printf() format support], ac_cv_have_size_t_format, [dnl
4820 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
4823 if (strcmp(buffer, "-123"))
4830 [ac_cv_have_size_t_format=no],
4831 [ac_cv_have_size_t_format="cross -- assuming yes"
4833 if test "$ac_cv_have_size_t_format" != no ; then
4835 [Define to printf format modifier for Py_ssize_t])
4857 for h in `(cd $srcdir;echo Python/thread_*.h)`
4864 AC_MSG_CHECKING(for build directories)
4865 for dir in $SRCDIRS; do
4866 if test ! -d $dir; then
4872 # Check for --with-computed-gotos
4873 AC_MSG_CHECKING(for --with-computed-gotos)
4874 AC_ARG_WITH(computed-gotos,
4875 AS_HELP_STRING([--with(out)-computed-gotos],
4884 if test "$withval" = no
4888 AC_MSG_RESULT(no)
4891 [AC_MSG_RESULT(no value specified)])
4908 [ac_cv_computed_gotos=no],
4910 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
4912 ac_cv_computed_gotos=no
4924 AC_MSG_CHECKING(for ensurepip)
4926 [AS_HELP_STRING([--with(out)-ensurepip=@<:@=OPTION@:>@],
4927 ["install" or "upgrade" using bundled pip, default is "no"])],
4929 [with_ensurepip=no])
4933 [no],[ENSUREPIP=no],
4934 [AC_MSG_ERROR([--with-ensurepip=upgrade|install|no])])
4939 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
4944 if test ! -f Modules/Setup
4950 if test ! -f Modules/Setup.local
4952 echo "# Edit this file for local setup changes" >Modules/Setup.local
4956 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
4957 -s Modules Modules/Setup.config \
4964 Support for BeOS is deprecated as of Python 2.6.
4965 See PEP 11 for the gory details.
4971 mv config.c Modules
4973 if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
4977 echo "please run ./configure --enable-optimizations" >&AS_MESSAGE_FD