Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(198086)

Delta Between Two Patch Sets: configure.in

Issue 11849: glibc allocator doesn't release all free()ed memory
Left Patch Set: Created 8 years, 7 months ago
Right Patch Set: Created 8 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Objects/obmalloc.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 dnl *********************************************** 1 dnl ***********************************************
2 dnl * Please run autoreconf to test your changes! * 2 dnl * Please run autoreconf to test your changes! *
3 dnl *********************************************** 3 dnl ***********************************************
4 4
5 # Set VERSION so we only need to edit in one place (i.e., here) 5 # Set VERSION so we only need to edit in one place (i.e., here)
6 m4_define(PYTHON_VERSION, 3.3) 6 m4_define(PYTHON_VERSION, 3.3)
7 7
8 AC_PREREQ(2.65) 8 AC_PREREQ(2.65)
9 9
10 AC_REVISION($Revision$)
11 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) 10 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
11
12 AC_SUBST(HGVERSION)
13 AC_SUBST(HGTAG)
14 AC_SUBST(HGBRANCH)
15
16 if test -e $srcdir/.hg/dirstate
17 then
18 AC_CHECK_PROG(HAS_HG, hg, found, not-found)
19 else
20 HAS_HG=no-repository
21 fi
22 if test $HAS_HG = found
23 then
24 HGVERSION="hg id -i \$(srcdir)"
25 HGTAG="hg id -t \$(srcdir)"
26 HGBRANCH="hg id -b \$(srcdir)"
27 else
28 HGVERSION=""
29 HGTAG=""
30 HGBRANCH=""
31 fi
32
12 AC_CONFIG_SRCDIR([Include/object.h]) 33 AC_CONFIG_SRCDIR([Include/object.h])
13 AC_CONFIG_HEADER(pyconfig.h) 34 AC_CONFIG_HEADER(pyconfig.h)
14 35
15 dnl Ensure that if prefix is specified, it does not end in a slash. If 36 dnl Ensure that if prefix is specified, it does not end in a slash. If
16 dnl it does, we get path names containing '//' which is both ugly and 37 dnl it does, we get path names containing '//' which is both ugly and
17 dnl can cause trouble. 38 dnl can cause trouble.
18 39
19 dnl Last slash shouldn't be stripped if prefix=/ 40 dnl Last slash shouldn't be stripped if prefix=/
20 if test "$prefix" != "/"; then 41 if test "$prefix" != "/"; then
21 prefix=`echo "$prefix" | sed -e 's/\/$//g'` 42 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 else 297 else
277 ac_sys_release=`uname -r` 298 ac_sys_release=`uname -r`
278 fi 299 fi
279 ac_md_system=`echo $ac_sys_system | 300 ac_md_system=`echo $ac_sys_system |
280 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'` 301 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
281 ac_md_release=`echo $ac_sys_release | 302 ac_md_release=`echo $ac_sys_release |
282 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'` 303 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
283 MACHDEP="$ac_md_system$ac_md_release" 304 MACHDEP="$ac_md_system$ac_md_release"
284 305
285 case $MACHDEP in 306 case $MACHDEP in
307 linux*) MACHDEP="linux";;
286 cygwin*) MACHDEP="cygwin";; 308 cygwin*) MACHDEP="cygwin";;
287 darwin*) MACHDEP="darwin";; 309 darwin*) MACHDEP="darwin";;
288 irix646) MACHDEP="irix6";; 310 irix646) MACHDEP="irix6";;
289 '') MACHDEP="unknown";; 311 '') MACHDEP="unknown";;
290 esac 312 esac
291 fi 313 fi
292 314
293 # Some systems cannot stand _XOPEN_SOURCE being defined at all; they 315 # Some systems cannot stand _XOPEN_SOURCE being defined at all; they
294 # disable features if it is defined, without any means to access these 316 # disable features if it is defined, without any means to access these
295 # features as extensions. For these systems, we skip the definition of 317 # features as extensions. For these systems, we skip the definition of
296 # _XOPEN_SOURCE. Before adding a system to the list to gain access to 318 # _XOPEN_SOURCE. Before adding a system to the list to gain access to
297 # some feature, make sure there is no alternative way to access this 319 # some feature, make sure there is no alternative way to access this
298 # feature. Also, when using wildcards, make sure you have verified the 320 # feature. Also, when using wildcards, make sure you have verified the
299 # need for not defining _XOPEN_SOURCE on all systems matching the 321 # need for not defining _XOPEN_SOURCE on all systems matching the
300 # wildcard, and that the wildcard does not include future systems 322 # wildcard, and that the wildcard does not include future systems
301 # (which may remove their limitations). 323 # (which may remove their limitations).
302 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output 324 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
303 case $ac_sys_system/$ac_sys_release in 325 case $ac_sys_system/$ac_sys_release in
304 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, 326 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
305 # even though select is a POSIX function. Reported by J. Ribbens. 327 # even though select is a POSIX function. Reported by J. Ribbens.
306 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. 328 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
307 # In addition, Stefan Krah confirms that issue #1244610 exists through 329 # In addition, Stefan Krah confirms that issue #1244610 exists through
308 # OpenBSD 4.6, but is fixed in 4.7. 330 # OpenBSD 4.6, but is fixed in 4.7.
309 OpenBSD/2.* | OpenBSD/3.@<:@0123456789@:>@ | OpenBSD/4.@<:@0123456@:>@) 331 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.@<:@0123456@:>@)
310 define_xopen_source=no 332 define_xopen_source=no
311 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is 333 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
312 # also defined. This can be overridden by defining _BSD_SOURCE 334 # also defined. This can be overridden by defining _BSD_SOURCE
313 # As this has a different meaning on Linux, only define it on OpenBSD 335 # As this has a different meaning on Linux, only define it on OpenBSD
314 AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library feature s]) 336 AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library feature s])
315 ;; 337 ;;
316 OpenBSD/4.@<:@789@:>@) 338 OpenBSD/*)
317 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is 339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
318 # also defined. This can be overridden by defining _BSD_SOURCE 340 # also defined. This can be overridden by defining _BSD_SOURCE
319 # As this has a different meaning on Linux, only define it on OpenBSD 341 # As this has a different meaning on Linux, only define it on OpenBSD
320 AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library feature s]) 342 AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library feature s])
321 ;; 343 ;;
322 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of 344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
323 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by 345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
324 # Marc Recht 346 # Marc Recht
325 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@) 347 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
326 define_xopen_source=no;; 348 define_xopen_source=no;;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from 390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
369 # defining NI_NUMERICHOST. 391 # defining NI_NUMERICHOST.
370 QNX/6.3.2) 392 QNX/6.3.2)
371 define_xopen_source=no 393 define_xopen_source=no
372 ;; 394 ;;
373 395
374 esac 396 esac
375 397
376 if test $define_xopen_source = yes 398 if test $define_xopen_source = yes
377 then 399 then
378 AC_DEFINE(_XOPEN_SOURCE, 600, 400 # X/Open 7, incorporating POSIX.1-2008
401 AC_DEFINE(_XOPEN_SOURCE, 700,
379 Define to the level of X/Open that your system supports) 402 Define to the level of X/Open that your system supports)
380 403
381 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires 404 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
382 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else 405 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
383 # several APIs are not declared. Since this is also needed in some 406 # several APIs are not declared. Since this is also needed in some
384 # cases for HP-UX, we define it globally. 407 # cases for HP-UX, we define it globally.
385 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, 408 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
386 Define to activate Unix95-and-earlier features) 409 Define to activate Unix95-and-earlier features)
387 410
388 AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001) 411 AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008)
389
390 fi 412 fi
391 413
392 # 414 #
393 # SGI compilers allow the specification of the both the ABI and the 415 # SGI compilers allow the specification of the both the ABI and the
394 # ISA on the command line. Depending on the values of these switches, 416 # ISA on the command line. Depending on the values of these switches,
395 # different and often incompatable code will be generated. 417 # different and often incompatable code will be generated.
396 # 418 #
397 # The SGI_ABI variable can be used to modify the CC and LDFLAGS and 419 # The SGI_ABI variable can be used to modify the CC and LDFLAGS and
398 # thus supply support for various ABI/ISA combinations. The MACHDEP 420 # thus supply support for various ABI/ISA combinations. The MACHDEP
399 # variable is also adjusted. 421 # variable is also adjusted.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 fi 531 fi
510 fi 532 fi
511 if test "$preset_cxx" != "$CXX" 533 if test "$preset_cxx" != "$CXX"
512 then 534 then
513 AC_MSG_WARN([ 535 AC_MSG_WARN([
514 536
515 By default, distutils will build C++ extension modules with "$CXX". 537 By default, distutils will build C++ extension modules with "$CXX".
516 If this is not intended, then set CXX on the configure command line. 538 If this is not intended, then set CXX on the configure command line.
517 ]) 539 ])
518 fi 540 fi
541
542
543 AC_MSG_CHECKING([for -Wl,--no-as-needed])
544 save_LDFLAGS="$LDFLAGS"
545 LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
546 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
547 [NO_AS_NEEDED="-Wl,--no-as-needed"
548 AC_MSG_RESULT([yes])],
549 [NO_AS_NEEDED=""
550 AC_MSG_RESULT([no])])
551 LDFLAGS="$save_LDFLAGS"
552 AC_SUBST(NO_AS_NEEDED)
519 553
520 554
521 # checks for UNIX variants that set C preprocessor variables 555 # checks for UNIX variants that set C preprocessor variables
522 AC_USE_SYSTEM_EXTENSIONS 556 AC_USE_SYSTEM_EXTENSIONS
523 557
524 # Check for unsupported systems 558 # Check for unsupported systems
525 case $ac_sys_system/$ac_sys_release in 559 case $ac_sys_system/$ac_sys_release in
526 atheos*|Linux*/1*) 560 atheos*|Linux*/1*)
527 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. 561 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
528 echo See README for details. 562 echo See README for details.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 SunOS*) 763 SunOS*)
730 LDLIBRARY='libpython$(LDVERSION).so' 764 LDLIBRARY='libpython$(LDVERSION).so'
731 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' 765 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
732 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} 766 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
733 INSTSONAME="$LDLIBRARY".$SOVERSION 767 INSTSONAME="$LDLIBRARY".$SOVERSION
734 if test "$with_pydebug" != yes 768 if test "$with_pydebug" != yes
735 then 769 then
736 PY3LIBRARY=libpython3.so 770 PY3LIBRARY=libpython3.so
737 fi 771 fi
738 ;; 772 ;;
739 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) 773 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
740 LDLIBRARY='libpython$(LDVERSION).so' 774 LDLIBRARY='libpython$(LDVERSION).so'
741 BLDLIBRARY='-L. -lpython$(LDVERSION)' 775 BLDLIBRARY='-L. -lpython$(LDVERSION)'
742 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} 776 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
743 case $ac_sys_system in 777 case $ac_sys_system in
744 FreeBSD*) 778 FreeBSD*)
745 SOVERSION=`echo $SOVERSION|cut -d "." -f 1` 779 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
746 ;; 780 ;;
747 esac 781 esac
748 INSTSONAME="$LDLIBRARY".$SOVERSION 782 INSTSONAME="$LDLIBRARY".$SOVERSION
749 if test "$with_pydebug" != yes 783 if test "$with_pydebug" != yes
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 AC_SUBST(AR) 823 AC_SUBST(AR)
790 AC_CHECK_PROGS(AR, ar aal, ar) 824 AC_CHECK_PROGS(AR, ar aal, ar)
791 825
792 # tweak ARFLAGS only if the user didn't set it on the command line 826 # tweak ARFLAGS only if the user didn't set it on the command line
793 AC_SUBST(ARFLAGS) 827 AC_SUBST(ARFLAGS)
794 if test -z "$ARFLAGS" 828 if test -z "$ARFLAGS"
795 then 829 then
796 ARFLAGS="rc" 830 ARFLAGS="rc"
797 fi 831 fi
798 832
799 AC_SUBST(HGVERSION) 833 AC_SUBST(DISABLE_ASDLGEN)
800 AC_SUBST(HGTAG) 834 DISABLE_ASDLGEN=""
801 AC_SUBST(HGBRANCH) 835 AC_CHECK_PROG(HAS_PYTHON, python, found, not-found)
802 AC_CHECK_PROG(HAS_HG, hg, found, not-found) 836 if test $HAS_HG != found -o $HAS_PYTHON != found
803 if test $HAS_HG = found 837 then
804 then 838 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdi r)/Parser/asdl_c.py #"
805 HGVERSION="hg id -i \$(srcdir)" 839 fi
806 HGTAG="hg id -t \$(srcdir)" 840
807 HGBRANCH="hg id -b \$(srcdir)"
808 else
809 HGVERSION=""
810 HGTAG=""
811 HGBRANCH=""
812 fi
813 841
814 case $MACHDEP in 842 case $MACHDEP in
815 bsdos*|hp*|HP*) 843 bsdos*|hp*|HP*)
816 # install -d does not work on BSDI or HP-UX 844 # install -d does not work on BSDI or HP-UX
817 if test -z "$INSTALL" 845 if test -z "$INSTALL"
818 then 846 then
819 INSTALL="${srcdir}/install-sh -c" 847 INSTALL="${srcdir}/install-sh -c"
820 fi 848 fi
821 esac 849 esac
822 AC_PROG_INSTALL 850 AC_PROG_INSTALL
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 then 898 then
871 case $GCC in 899 case $GCC in
872 yes) 900 yes)
873 if test "$CC" != 'g++' ; then 901 if test "$CC" != 'g++' ; then
874 STRICT_PROTO="-Wstrict-prototypes" 902 STRICT_PROTO="-Wstrict-prototypes"
875 fi 903 fi
876 # For gcc 4.x we need to use -fwrapv so lets check if its supported 904 # For gcc 4.x we need to use -fwrapv so lets check if its supported
877 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then 905 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
878 WRAP="-fwrapv" 906 WRAP="-fwrapv"
879 fi 907 fi
908
909 # Clang also needs -fwrapv
910 if test "$CC" = "clang" ; then
911 WRAP="-fwrapv"
912 fi
913
880 case $ac_cv_prog_cc_g in 914 case $ac_cv_prog_cc_g in
881 yes) 915 yes)
882 if test "$Py_DEBUG" = 'true' ; then 916 if test "$Py_DEBUG" = 'true' ; then
883 # Optimization messes up debuggers, so turn it off for 917 # Optimization messes up debuggers, so turn it off for
884 # debug builds. 918 # debug builds.
885 OPT="-g -O0 -Wall $STRICT_PROTO" 919 OPT="-g -O0 -Wall $STRICT_PROTO"
886 else 920 else
887 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" 921 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
888 fi 922 fi
889 ;; 923 ;;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 ac_cv_no_strict_aliasing=no 974 ac_cv_no_strict_aliasing=no
941 ])) 975 ]))
942 CFLAGS="$save_CFLAGS" 976 CFLAGS="$save_CFLAGS"
943 CC="$ac_save_cc" 977 CC="$ac_save_cc"
944 AC_MSG_RESULT($ac_cv_no_strict_aliasing) 978 AC_MSG_RESULT($ac_cv_no_strict_aliasing)
945 if test $ac_cv_no_strict_aliasing = yes 979 if test $ac_cv_no_strict_aliasing = yes
946 then 980 then
947 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" 981 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
948 fi 982 fi
949 983
984 AC_MSG_CHECKING(if we can turn off $CC unused result warning)
985 ac_save_cc="$CC"
986 CC="$CC -Wunused-result -Werror"
987 save_CFLAGS="$CFLAGS"
988 AC_CACHE_VAL(ac_cv_disable_unused_result_warning,
989 AC_COMPILE_IFELSE(
990 [
991 AC_LANG_PROGRAM([[]], [[]])
992 ],[
993 ac_cv_disable_unused_result_warning=yes
994 ],[
995 ac_cv_disable_unused_result_warning=no
996 ]))
997 CFLAGS="$save_CFLAGS"
998 CC="$ac_save_cc"
999 AC_MSG_RESULT($ac_cv_disable_unused_result_warning)
1000
1001 if test $ac_cv_disable_unused_result_warning = yes
1002 then
1003 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
1004 fi
1005
950 # if using gcc on alpha, use -mieee to get (near) full IEEE 754 1006 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
951 # support. Without this, treatment of subnormals doesn't follow 1007 # support. Without this, treatment of subnormals doesn't follow
952 # the standard. 1008 # the standard.
953 case $ac_sys_machine in 1009 case $ac_sys_machine in
954 alpha*) 1010 alpha*)
955 BASECFLAGS="$BASECFLAGS -mieee" 1011 BASECFLAGS="$BASECFLAGS -mieee"
956 ;; 1012 ;;
957 esac 1013 esac
958 1014
959 case $ac_sys_system in 1015 case $ac_sys_system in
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc} 1322 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
1267 dnl int foo; 1323 dnl int foo;
1268 dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something"); 1324 dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1269 dnl ]], [[;]])],[cpp_type=ansi],[AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional]) 1325 dnl ]], [[;]])],[cpp_type=ansi],[AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional])
1270 dnl AC_MSG_RESULT($cpp_type) 1326 dnl AC_MSG_RESULT($cpp_type)
1271 1327
1272 # checks for header files 1328 # checks for header files
1273 AC_HEADER_STDC 1329 AC_HEADER_STDC
1274 AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ 1330 AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
1275 fcntl.h grp.h \ 1331 fcntl.h grp.h \
1276 ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ 1332 ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
1277 shadow.h signal.h stdint.h stropts.h termios.h thread.h \ 1333 sched.h shadow.h signal.h stdint.h stropts.h termios.h \
1278 unistd.h utime.h \ 1334 unistd.h utime.h \
1279 sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ 1335 poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
1336 sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/loadavg.h \
1280 sys/lock.h sys/mkdev.h sys/modem.h \ 1337 sys/lock.h sys/mkdev.h sys/modem.h \
1281 sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \ 1338 sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
1282 sys/stat.h sys/termio.h sys/time.h \ 1339 sys/stat.h sys/termio.h sys/time.h \
1283 sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \ 1340 sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
1284 libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ 1341 libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
1285 bluetooth/bluetooth.h linux/tipc.h spawn.h util.h) 1342 bluetooth/bluetooth.h linux/tipc.h spawn.h util.h)
1286 AC_HEADER_DIRENT 1343 AC_HEADER_DIRENT
1287 AC_HEADER_MAJOR 1344 AC_HEADER_MAJOR
1288 1345
1346 # On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
1347 AC_CHECK_HEADERS([net/if.h], [], [],
1348 [#include <stdio.h>
1349 #ifdef STDC_HEADERS
1350 # include <stdlib.h>
1351 # include <stddef.h>
1352 #else
1353 # ifdef HAVE_STDLIB_H
1354 # include <stdlib.h>
1355 # endif
1356 #endif
1357 #ifdef HAVE_SYS_SOCKET_H
1358 # include <sys/socket.h>
1359 #endif
1360 ])
1361
1362
1289 # On Solaris, term.h requires curses.h 1363 # On Solaris, term.h requires curses.h
1290 AC_CHECK_HEADERS(term.h,,,[ 1364 AC_CHECK_HEADERS(term.h,,,[
1291 #ifdef HAVE_CURSES_H 1365 #ifdef HAVE_CURSES_H
1292 #include <curses.h> 1366 #include <curses.h>
1293 #endif 1367 #endif
1294 ]) 1368 ])
1295 1369
1296 # On Linux, netlink.h requires asm/types.h 1370 # On Linux, netlink.h requires asm/types.h
1297 AC_CHECK_HEADERS(linux/netlink.h,,,[ 1371 AC_CHECK_HEADERS(linux/netlink.h,,,[
1298 #ifdef HAVE_ASM_TYPES_H 1372 #ifdef HAVE_ASM_TYPES_H
1299 #include <asm/types.h> 1373 #include <asm/types.h>
1300 #endif 1374 #endif
1375 #ifdef HAVE_SYS_SOCKET_H
1376 #include <sys/socket.h>
1377 #endif
1378 ])
1379
1380 # On Linux, can.h and can/raw.h require sys/socket.h
1381 AC_CHECK_HEADERS(linux/can.h linux/can/raw.h,,,[
1301 #ifdef HAVE_SYS_SOCKET_H 1382 #ifdef HAVE_SYS_SOCKET_H
1302 #include <sys/socket.h> 1383 #include <sys/socket.h>
1303 #endif 1384 #endif
1304 ]) 1385 ])
1305 1386
1306 # checks for typedefs 1387 # checks for typedefs
1307 was_it_defined=no 1388 was_it_defined=no
1308 AC_MSG_CHECKING(for clock_t in time.h) 1389 AC_MSG_CHECKING(for clock_t in time.h)
1309 AC_EGREP_HEADER(clock_t, time.h, was_it_defined=yes, [ 1390 AC_EGREP_HEADER(clock_t, time.h, was_it_defined=yes, [
1310 AC_DEFINE(clock_t, long, [Define to 'long' if <time.h> doesn't define.]) 1391 AC_DEFINE(clock_t, long, [Define to 'long' if <time.h> doesn't define.])
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 fi 2074 fi
1994 2075
1995 # This is used to generate Setup.config 2076 # This is used to generate Setup.config
1996 AC_SUBST(USE_THREAD_MODULE) 2077 AC_SUBST(USE_THREAD_MODULE)
1997 USE_THREAD_MODULE="" 2078 USE_THREAD_MODULE=""
1998 2079
1999 AC_SUBST(LDLAST) 2080 AC_SUBST(LDLAST)
2000 2081
2001 # Templates for things AC_DEFINEd more than once. 2082 # Templates for things AC_DEFINEd more than once.
2002 # For a single AC_DEFINE, no template is needed. 2083 # For a single AC_DEFINE, no template is needed.
2003 AH_TEMPLATE(C_THREADS,[Define if you have the Mach cthreads package])
2004 AH_TEMPLATE(_REENTRANT, 2084 AH_TEMPLATE(_REENTRANT,
2005 [Define to force use of thread-safe errno, h_errno, and other functions]) 2085 [Define to force use of thread-safe errno, h_errno, and other functions])
2006 AH_TEMPLATE(WITH_THREAD, 2086 AH_TEMPLATE(WITH_THREAD,
2007 [Define if you want to compile in rudimentary thread support]) 2087 [Define if you want to compile in rudimentary thread support])
2008 2088
2009 AC_MSG_CHECKING(for --with-threads) 2089 AC_MSG_CHECKING(for --with-threads)
2010 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output 2090 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
2011 AC_ARG_WITH(threads, 2091 AC_ARG_WITH(threads,
2012 AS_HELP_STRING([--with(out)-threads@<:@=DIRECTORY@:>@], [disable/ena ble thread support])) 2092 AS_HELP_STRING([--with(out)-threads@<:@=DIRECTORY@:>@], [disable/ena ble thread support]))
2013 2093
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2075 AC_EGREP_CPP(yes, 2155 AC_EGREP_CPP(yes,
2076 [ 2156 [
2077 #include <unistd.h> 2157 #include <unistd.h>
2078 #ifdef _POSIX_THREADS 2158 #ifdef _POSIX_THREADS
2079 yes 2159 yes
2080 #endif 2160 #endif
2081 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no) 2161 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
2082 AC_MSG_RESULT($unistd_defines_pthreads) 2162 AC_MSG_RESULT($unistd_defines_pthreads)
2083 2163
2084 AC_DEFINE(_REENTRANT) 2164 AC_DEFINE(_REENTRANT)
2085 AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
2086 AC_DEFINE(C_THREADS)
2087 AC_DEFINE(HURD_C_THREADS, 1,
2088 [Define if you are using Mach cthreads directly under /include])
2089 LIBS="$LIBS -lthreads"
2090 THREADOBJ="Python/thread.o"],[
2091 AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
2092 AC_DEFINE(C_THREADS)
2093 AC_DEFINE(MACH_C_THREADS, 1,
2094 [Define if you are using Mach cthreads under mach /])
2095 THREADOBJ="Python/thread.o"],[
2096 # Just looking for pthread_create in libpthread is not enough: 2165 # Just looking for pthread_create in libpthread is not enough:
2097 # on HP/UX, pthread.h renames pthread_create to a different symbol name. 2166 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
2098 # So we really have to include pthread.h, and then link. 2167 # So we really have to include pthread.h, and then link.
2099 _libs=$LIBS 2168 _libs=$LIBS
2100 LIBS="$LIBS -lpthread" 2169 LIBS="$LIBS -lpthread"
2101 AC_MSG_CHECKING([for pthread_create in -lpthread]) 2170 AC_MSG_CHECKING([for pthread_create in -lpthread])
2102 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h> 2171 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>
2103 2172
2104 void * start_routine (void *arg) { exit (0); }]], [[ 2173 void * start_routine (void *arg) { exit (0); }]], [[
2105 pthread_create (NULL, NULL, start_routine, NULL)]])],[ 2174 pthread_create (NULL, NULL, start_routine, NULL)]])],[
(...skipping 15 matching lines...) Expand all
2121 THREADOBJ="Python/thread.o"], [ 2190 THREADOBJ="Python/thread.o"], [
2122 AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD) 2191 AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
2123 posix_threads=yes 2192 posix_threads=yes
2124 LIBS="$LIBS -lpthread" 2193 LIBS="$LIBS -lpthread"
2125 THREADOBJ="Python/thread.o"], [ 2194 THREADOBJ="Python/thread.o"], [
2126 AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD) 2195 AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
2127 posix_threads=yes 2196 posix_threads=yes
2128 LIBS="$LIBS -lcma" 2197 LIBS="$LIBS -lcma"
2129 THREADOBJ="Python/thread.o"],[ 2198 THREADOBJ="Python/thread.o"],[
2130 USE_THREAD_MODULE="#"]) 2199 USE_THREAD_MODULE="#"])
2131 ])])])])])])]) 2200 ])])])])])
2132 2201
2133 AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) 2202 AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
2134 LIBS="$LIBS -lmpc" 2203 LIBS="$LIBS -lmpc"
2135 THREADOBJ="Python/thread.o" 2204 THREADOBJ="Python/thread.o"
2136 USE_THREAD_MODULE=""]) 2205 USE_THREAD_MODULE=""])
2137 2206
2138 if test "$posix_threads" != "yes"; then 2207 if test "$posix_threads" != "yes"; then
2139 AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD) 2208 AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
2140 LIBS="$LIBS -lthread" 2209 LIBS="$LIBS -lthread"
2141 THREADOBJ="Python/thread.o" 2210 THREADOBJ="Python/thread.o"
2142 USE_THREAD_MODULE=""]) 2211 USE_THREAD_MODULE=""])
2143 fi 2212 fi
2144 fi 2213 fi
2145 2214
2146 if test "$posix_threads" = "yes"; then 2215 if test "$posix_threads" = "yes"; then
2147 if test "$unistd_defines_pthreads" = "no"; then 2216 if test "$unistd_defines_pthreads" = "no"; then
2148 AC_DEFINE(_POSIX_THREADS, 1, 2217 AC_DEFINE(_POSIX_THREADS, 1,
2149 [Define if you have POSIX threads, 2218 [Define if you have POSIX threads,
2150 and your system does not define that.]) 2219 and your system does not define that.])
2151 fi 2220 fi
2152 2221
2153 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. 2222 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
2154 case $ac_sys_system/$ac_sys_release in 2223 case $ac_sys_system/$ac_sys_release in
2155 SunOS/5.6) AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1, 2224 SunOS/5.6) AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1,
2156 [Defined for Solaris 2.6 bug in pthread header.]) 2225 [Defined for Solaris 2.6 bug in pthread header.])
2157 ;; 2226 ;;
2158 SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1, 2227 SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
2159 [Define if the Posix semaphores do not work on your syste m]) 2228 [Define if the Posix semaphores do not work on your syste m])
2160 ;; 2229 ;;
2161 AIX/5) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1, 2230 AIX/*) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
2162 [Define if the Posix semaphores do not work on your syste m]) 2231 [Define if the Posix semaphores do not work on your syste m])
2163 ;; 2232 ;;
2164 AIX/6) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
2165 Define if the Posix semaphores do not work on your system)
2166 ;;
2167 esac 2233 esac
2168 2234
2169 AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported) 2235 AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
2170 AC_CACHE_VAL(ac_cv_pthread_system_supported, 2236 AC_CACHE_VAL(ac_cv_pthread_system_supported,
2171 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h> 2237 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h>
2172 void *foo(void *parm) { 2238 void *foo(void *parm) {
2173 return NULL; 2239 return NULL;
2174 } 2240 }
2175 main() { 2241 main() {
2176 pthread_attr_t attr; 2242 pthread_attr_t attr;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 MACHDEP_OBJS=$extra_machdep_objs 2556 MACHDEP_OBJS=$extra_machdep_objs
2491 else 2557 else
2492 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" 2558 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
2493 fi 2559 fi
2494 AC_MSG_RESULT(MACHDEP_OBJS) 2560 AC_MSG_RESULT(MACHDEP_OBJS)
2495 2561
2496 # checks for library functions 2562 # checks for library functions
2497 AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ 2563 AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
2498 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \ 2564 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
2499 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ 2565 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
2500 futimens futimes \ 2566 futimens futimes gai_strerror \
2501 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ 2567 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
2502 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ 2568 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
2503 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \ 2569 if_nameindex \
2504 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \ 2570 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
2571 memrchr mbrtowc mkdirat mkfifo \
2572 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock pol l \
2505 posix_fallocate posix_fadvise pread \ 2573 posix_fallocate posix_fadvise pread \
2506 pthread_init putenv pwrite readlink readlinkat readv realpath renameat \ 2574 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath rena meat \
2507 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \ 2575 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
2508 setgid sethostname \ 2576 setgid sethostname \
2509 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setprior ity setuid setvbuf \ 2577 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setprior ity setuid setvbuf \
2510 sigaction sigaltstack siginterrupt sigrelse snprintf strftime strlcpy symlinkat sync \ 2578 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
2579 sched_rr_get_interval \
2580 sigaction sigaltstack siginterrupt sigpending sigrelse \
2581 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
2511 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ 2582 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
2512 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ 2583 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
2513 wcscoll wcsftime wcsxfrm writev _getpty) 2584 wcscoll wcsftime wcsxfrm writev _getpty)
2514 2585
2515 # For some functions, having a definition is not sufficient, since 2586 # For some functions, having a definition is not sufficient, since
2516 # we want to take their address. 2587 # we want to take their address.
2517 AC_MSG_CHECKING(for chroot) 2588 AC_MSG_CHECKING(for chroot)
2518 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=chroot]])] , 2589 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=chroot]])] ,
2519 [AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.) 2590 [AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
2520 AC_MSG_RESULT(yes)], 2591 AC_MSG_RESULT(yes)],
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 2672
2602 AC_MSG_CHECKING(for getpagesize) 2673 AC_MSG_CHECKING(for getpagesize)
2603 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 2674 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2604 #include <unistd.h> 2675 #include <unistd.h>
2605 ]], [[void* p = getpagesize]])], 2676 ]], [[void* p = getpagesize]])],
2606 [AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function. ) 2677 [AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function. )
2607 AC_MSG_RESULT(yes)], 2678 AC_MSG_RESULT(yes)],
2608 [AC_MSG_RESULT(no) 2679 [AC_MSG_RESULT(no)
2609 ]) 2680 ])
2610 2681
2611 AC_MSG_CHECKING(whether mallopt can set malloc mmap threshold) 2682 AC_MSG_CHECKING(for broken unsetenv)
2612 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 2683 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2613 #include <malloc.h> 2684 #include <stdlib.h>
2614 ]], [[mallopt(M_MMAP_THRESHOLD, 256 * 1024)]])], 2685 ]], [[int res = unsetenv("DUMMY")]])],
2615 [AC_DEFINE(HAVE_MALLOPT_MMAP_THRESHOLD, 1, Define if mallopt can set malloc mm ap threshold.) 2686 [AC_MSG_RESULT(no)],
2616 AC_MSG_RESULT(yes)], 2687 [AC_DEFINE(HAVE_BROKEN_UNSETENV, 1, Define if `unsetenv` does not return an in t.)
2617 [AC_MSG_RESULT(no) 2688 AC_MSG_RESULT(yes)
2618 ]) 2689 ])
2619 2690
2620 dnl check for true 2691 dnl check for true
2621 AC_CHECK_PROGS(TRUE, true, /bin/true) 2692 AC_CHECK_PROGS(TRUE, true, /bin/true)
2622 2693
2623 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv 2694 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
2624 dnl On others, they are in the C library, so we to take no action 2695 dnl On others, they are in the C library, so we to take no action
2625 AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_TRUE], 2696 AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_TRUE],
2626 AC_CHECK_LIB(resolv, inet_aton) 2697 AC_CHECK_LIB(resolv, inet_aton)
2627 ) 2698 )
2628 2699
2629 # On Tru64, chflags seems to be present, but calling it will 2700 # On Tru64, chflags seems to be present, but calling it will
2630 # exit Python 2701 # exit Python
2631 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl 2702 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
2632 AC_RUN_IFELSE([AC_LANG_SOURCE([[[ 2703 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2633 #include <sys/stat.h> 2704 #include <sys/stat.h>
2634 #include <unistd.h> 2705 #include <unistd.h>
2635 int main(int argc, char*argv[]) 2706 int main(int argc, char*argv[])
2636 { 2707 {
2637 if(chflags(argv[0], 0) != 0) 2708 if(chflags(argv[0], 0) != 0)
2638 return 1; 2709 return 1;
2639 return 0; 2710 return 0;
2640 } 2711 }
2641 ]]])], 2712 ]])],
2642 [ac_cv_have_chflags=yes], 2713 [ac_cv_have_chflags=yes],
2643 [ac_cv_have_chflags=no], 2714 [ac_cv_have_chflags=no],
2644 [ac_cv_have_chflags=cross]) 2715 [ac_cv_have_chflags=cross])
2645 ]) 2716 ])
2646 if test "$ac_cv_have_chflags" = cross ; then 2717 if test "$ac_cv_have_chflags" = cross ; then
2647 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"] ) 2718 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"] )
2648 fi 2719 fi
2649 if test "$ac_cv_have_chflags" = yes ; then 2720 if test "$ac_cv_have_chflags" = yes ; then
2650 AC_DEFINE(HAVE_CHFLAGS, 1, [Define to 1 if you have the `chflags' function.]) 2721 AC_DEFINE(HAVE_CHFLAGS, 1, [Define to 1 if you have the 'chflags' function.])
2651 fi 2722 fi
2652 2723
2653 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl 2724 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
2654 AC_RUN_IFELSE([AC_LANG_SOURCE([[[ 2725 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2655 #include <sys/stat.h> 2726 #include <sys/stat.h>
2656 #include <unistd.h> 2727 #include <unistd.h>
2657 int main(int argc, char*argv[]) 2728 int main(int argc, char*argv[])
2658 { 2729 {
2659 if(lchflags(argv[0], 0) != 0) 2730 if(lchflags(argv[0], 0) != 0)
2660 return 1; 2731 return 1;
2661 return 0; 2732 return 0;
2662 } 2733 }
2663 ]]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cr oss]) 2734 ]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cro ss])
2664 ]) 2735 ])
2665 if test "$ac_cv_have_lchflags" = cross ; then 2736 if test "$ac_cv_have_lchflags" = cross ; then
2666 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="n o"]) 2737 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="n o"])
2667 fi 2738 fi
2668 if test "$ac_cv_have_lchflags" = yes ; then 2739 if test "$ac_cv_have_lchflags" = yes ; then
2669 AC_DEFINE(HAVE_LCHFLAGS, 1, [Define to 1 if you have the `lchflags' function.] ) 2740 AC_DEFINE(HAVE_LCHFLAGS, 1, [Define to 1 if you have the 'lchflags' function.] )
2670 fi 2741 fi
2671 2742
2672 dnl Check if system zlib has *Copy() functions 2743 dnl Check if system zlib has *Copy() functions
2673 dnl 2744 dnl
2674 dnl On MacOSX the linker will search for dylibs on the entire linker path 2745 dnl On MacOSX the linker will search for dylibs on the entire linker path
2675 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first 2746 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
2676 dnl to revert to a more traditional unix behaviour and make it possible to 2747 dnl to revert to a more traditional unix behaviour and make it possible to
2677 dnl override the system libz with a local static library of libz. Temporarily 2748 dnl override the system libz with a local static library of libz. Temporarily
2678 dnl add that flag to our CFLAGS as well to ensure that we check the version 2749 dnl add that flag to our CFLAGS as well to ensure that we check the version
2679 dnl of libz that will be used by setup.py. 2750 dnl of libz that will be used by setup.py.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2778 ) 2849 )
2779 AC_CHECK_FUNCS(gettimeofday, 2850 AC_CHECK_FUNCS(gettimeofday,
2780 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], 2851 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]],
2781 [[gettimeofday((struct timeval*)0,(struct t imezone*)0);]])], 2852 [[gettimeofday((struct timeval*)0,(struct t imezone*)0);]])],
2782 [], 2853 [],
2783 [AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1, 2854 [AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
2784 [Define if gettimeofday() does not have second (timezone) argument 2855 [Define if gettimeofday() does not have second (timezone) argument
2785 This is the case on Motorola V4 (R40V4.2)]) 2856 This is the case on Motorola V4 (R40V4.2)])
2786 ]) 2857 ])
2787 ) 2858 )
2859
2860 AC_CHECK_FUNCS(clock_gettime, [], [
2861 AC_CHECK_LIB(rt, clock_gettime, [
2862 AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
2863 AC_DEFINE(TIMEMODULE_LIB, [rt],
2864 [Library needed by timemodule.c: librt may be needed for clock _gettime()])
2865 ])
2866 ])
2867
2868 AC_CHECK_FUNCS(clock_getres, [], [
2869 AC_CHECK_LIB(rt, clock_getres, [
2870 AC_DEFINE(HAVE_CLOCK_GETRES, 1)
2871 ])
2872 ])
2788 2873
2789 AC_MSG_CHECKING(for major, minor, and makedev) 2874 AC_MSG_CHECKING(for major, minor, and makedev)
2790 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 2875 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
2791 #if defined(MAJOR_IN_MKDEV) 2876 #if defined(MAJOR_IN_MKDEV)
2792 #include <sys/mkdev.h> 2877 #include <sys/mkdev.h>
2793 #elif defined(MAJOR_IN_SYSMACROS) 2878 #elif defined(MAJOR_IN_SYSMACROS)
2794 #include <sys/sysmacros.h> 2879 #include <sys/sysmacros.h>
2795 #else 2880 #else
2796 #include <sys/types.h> 2881 #include <sys/types.h>
2797 #endif 2882 #endif
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
3348 fi 3433 fi
3349 3434
3350 # ************************************ 3435 # ************************************
3351 # * Check for mathematical functions * 3436 # * Check for mathematical functions *
3352 # ************************************ 3437 # ************************************
3353 3438
3354 LIBS_SAVE=$LIBS 3439 LIBS_SAVE=$LIBS
3355 LIBS="$LIBS $LIBM" 3440 LIBS="$LIBS $LIBM"
3356 3441
3357 AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma]) 3442 AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
3358 AC_CHECK_FUNCS([hypot lgamma log1p round tgamma]) 3443 AC_CHECK_FUNCS([hypot lgamma log1p log2 round tgamma])
3359 AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]]) 3444 AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
3360 3445
3361 # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of 3446 # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
3362 # -0. on some architectures. 3447 # -0. on some architectures.
3363 AC_MSG_CHECKING(whether tanh preserves the sign of zero) 3448 AC_MSG_CHECKING(whether tanh preserves the sign of zero)
3364 AC_CACHE_VAL(ac_cv_tanh_preserves_zero_sign, [ 3449 AC_CACHE_VAL(ac_cv_tanh_preserves_zero_sign, [
3365 AC_RUN_IFELSE([AC_LANG_SOURCE([[ 3450 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3366 #include <math.h> 3451 #include <math.h>
3367 #include <stdlib.h> 3452 #include <stdlib.h>
3368 int main() { 3453 int main() {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3546 /* Success: exit code 0 */ 3631 /* Success: exit code 0 */
3547 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1); 3632 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
3548 } 3633 }
3549 ]])], 3634 ]])],
3550 [ac_cv_wchar_t_signed=yes], 3635 [ac_cv_wchar_t_signed=yes],
3551 [ac_cv_wchar_t_signed=no], 3636 [ac_cv_wchar_t_signed=no],
3552 [ac_cv_wchar_t_signed=yes])]) 3637 [ac_cv_wchar_t_signed=yes])])
3553 AC_MSG_RESULT($ac_cv_wchar_t_signed) 3638 AC_MSG_RESULT($ac_cv_wchar_t_signed)
3554 fi 3639 fi
3555 3640
3556 AC_MSG_CHECKING(what type to use for str)
3557 AC_ARG_WITH(wide-unicode,
3558 AS_HELP_STRING([--with-wide-unicode], [Use 4-byte Unicode characters (default is 2 bytes)]),
3559 [
3560 if test "$withval" != no
3561 then unicode_size="4"
3562 else unicode_size="2"
3563 fi
3564 ],
3565 [
3566 case "$have_ucs4_tcl" in
3567 yes) unicode_size="4";;
3568 *) unicode_size="2" ;;
3569 esac
3570 ])
3571
3572 AH_TEMPLATE(Py_UNICODE_SIZE,
3573 [Define as the size of the unicode type.])
3574 case "$unicode_size" in
3575 4)
3576 AC_DEFINE(Py_UNICODE_SIZE, 4)
3577 ABIFLAGS="${ABIFLAGS}u"
3578 ;;
3579 *) AC_DEFINE(Py_UNICODE_SIZE, 2) ;;
3580 esac
3581
3582 AH_TEMPLATE(PY_UNICODE_TYPE,
3583 [Define as the integral type used for Unicode representation.])
3584
3585 # wchar_t is only usable if it maps to an unsigned type 3641 # wchar_t is only usable if it maps to an unsigned type
3586 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \ 3642 if test "$ac_cv_sizeof_wchar_t" -ge 2 \
3587 -a "$ac_cv_wchar_t_signed" = "no" 3643 -a "$ac_cv_wchar_t_signed" = "no"
3588 then 3644 then
3589 PY_UNICODE_TYPE="wchar_t" 3645 HAVE_USABLE_WCHAR_T="yes"
3590 AC_DEFINE(HAVE_USABLE_WCHAR_T, 1, 3646 AC_DEFINE(HAVE_USABLE_WCHAR_T, 1,
3591 [Define if you have a useable wchar_t type defined in wchar.h; useable 3647 [Define if you have a useable wchar_t type defined in wchar.h; useable
3592 means wchar_t must be an unsigned type with at least 16 bits. (see 3648 means wchar_t must be an unsigned type with at least 16 bits. (see
3593 Include/unicodeobject.h).]) 3649 Include/unicodeobject.h).])
3594 AC_DEFINE(PY_UNICODE_TYPE,wchar_t)
3595 elif test "$ac_cv_sizeof_short" = "$unicode_size"
3596 then
3597 PY_UNICODE_TYPE="unsigned short"
3598 AC_DEFINE(PY_UNICODE_TYPE,unsigned short)
3599 elif test "$ac_cv_sizeof_long" = "$unicode_size"
3600 then
3601 PY_UNICODE_TYPE="unsigned long"
3602 AC_DEFINE(PY_UNICODE_TYPE,unsigned long)
3603 else 3650 else
3604 PY_UNICODE_TYPE="no type found" 3651 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
3605 fi 3652 fi
3606 AC_MSG_RESULT($PY_UNICODE_TYPE) 3653 AC_MSG_RESULT($HAVE_USABLE_WCHAR_T)
3607 3654
3608 # check for endianness 3655 # check for endianness
3609 AC_C_BIGENDIAN 3656 AC_C_BIGENDIAN
3610 3657
3611 # ABI version string for Python extension modules. This appears between the 3658 # ABI version string for Python extension modules. This appears between the
3612 # periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated 3659 # periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
3613 # from the following attributes which affect the ABI of this Python build (in 3660 # from the following attributes which affect the ABI of this Python build (in
3614 # this order): 3661 # this order):
3615 # 3662 #
3616 # * The Python implementation (always 'cpython-' for us) 3663 # * The Python implementation (always 'cpython-' for us)
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
4206 fi 4253 fi
4207 ], 4254 ],
4208 [AC_MSG_RESULT(no value specified)]) 4255 [AC_MSG_RESULT(no value specified)])
4209 4256
4210 case $ac_sys_system in 4257 case $ac_sys_system in
4211 AIX*) 4258 AIX*)
4212 AC_DEFINE(HAVE_BROKEN_PIPE_BUF, 1, [Define if the system reports an invalid PI PE_BUF value.]) ;; 4259 AC_DEFINE(HAVE_BROKEN_PIPE_BUF, 1, [Define if the system reports an invalid PI PE_BUF value.]) ;;
4213 esac 4260 esac
4214 4261
4215 4262
4216 AC_CHECK_FUNC(pipe2, AC_DEFINE(HAVE_PIPE2, 1, [Define if the OS supports pipe2() ]), )
4217
4218 AC_SUBST(THREADHEADERS) 4263 AC_SUBST(THREADHEADERS)
4219 4264
4220 for h in `(cd $srcdir;echo Python/thread_*.h)` 4265 for h in `(cd $srcdir;echo Python/thread_*.h)`
4221 do 4266 do
4222 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" 4267 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
4223 done 4268 done
4224 4269
4225 AC_SUBST(SRCDIRS) 4270 AC_SUBST(SRCDIRS)
4226 SRCDIRS="Parser Grammar Objects Python Modules Mac" 4271 SRCDIRS="Parser Grammar Objects Python Modules Mac"
4227 AC_MSG_CHECKING(for build directories) 4272 AC_MSG_CHECKING(for build directories)
(...skipping 19 matching lines...) Expand all
4247 if test ! -f Modules/Setup.local 4292 if test ! -f Modules/Setup.local
4248 then 4293 then
4249 echo "# Edit this file for local setup changes" >Modules/Setup.local 4294 echo "# Edit this file for local setup changes" >Modules/Setup.local
4250 fi 4295 fi
4251 4296
4252 echo "creating Makefile" 4297 echo "creating Makefile"
4253 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 4298 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
4254 -s Modules Modules/Setup.config \ 4299 -s Modules Modules/Setup.config \
4255 Modules/Setup.local Modules/Setup 4300 Modules/Setup.local Modules/Setup
4256 mv config.c Modules 4301 mv config.c Modules
LEFTRIGHT
« no previous file | Objects/obmalloc.c » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+