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

Delta Between Two Patch Sets: configure.in

Issue 7652: Merge C version of decimal into py3k.
Left Patch Set: Created 8 years, 3 months ago
Right Patch Set: Created 7 years, 6 months 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 | « configure ('k') | Doc/library/decimal.rst » ('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_INIT(python, PYTHON_VERSION, http://bugs.python.org/) 10 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
11 11
12 AC_SUBST(HGVERSION) 12 AC_SUBST(HGVERSION)
13 AC_SUBST(HGTAG) 13 AC_SUBST(HGTAG)
14 AC_SUBST(HGBRANCH) 14 AC_SUBST(HGBRANCH)
15 15
16 if test -e $srcdir/.hg/00changelog.i 16 if test -e $srcdir/.hg/dirstate
17 then 17 then
18 AC_CHECK_PROG(HAS_HG, hg, found, not-found) 18 AC_CHECK_PROG(HAS_HG, hg, found, not-found)
19 else 19 else
20 HAS_HG=no-repository 20 HAS_HG=no-repository
21 fi 21 fi
22 if test $HAS_HG = found 22 if test $HAS_HG = found
23 then 23 then
24 HGVERSION="hg id -i \$(srcdir)" 24 HGVERSION="hg id -i \$(srcdir)"
25 HGTAG="hg id -t \$(srcdir)" 25 HGTAG="hg id -t \$(srcdir)"
26 HGBRANCH="hg id -b \$(srcdir)" 26 HGBRANCH="hg id -b \$(srcdir)"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 else 297 else
298 ac_sys_release=`uname -r` 298 ac_sys_release=`uname -r`
299 fi 299 fi
300 ac_md_system=`echo $ac_sys_system | 300 ac_md_system=`echo $ac_sys_system |
301 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'` 301 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
302 ac_md_release=`echo $ac_sys_release | 302 ac_md_release=`echo $ac_sys_release |
303 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'` 303 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
304 MACHDEP="$ac_md_system$ac_md_release" 304 MACHDEP="$ac_md_system$ac_md_release"
305 305
306 case $MACHDEP in 306 case $MACHDEP in
307 linux*) MACHDEP="linux";;
307 cygwin*) MACHDEP="cygwin";; 308 cygwin*) MACHDEP="cygwin";;
308 darwin*) MACHDEP="darwin";; 309 darwin*) MACHDEP="darwin";;
309 irix646) MACHDEP="irix6";; 310 irix646) MACHDEP="irix6";;
310 '') MACHDEP="unknown";; 311 '') MACHDEP="unknown";;
311 esac 312 esac
312 fi 313 fi
313 314
314 # Some systems cannot stand _XOPEN_SOURCE being defined at all; they 315 # Some systems cannot stand _XOPEN_SOURCE being defined at all; they
315 # 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
316 # features as extensions. For these systems, we skip the definition of 317 # features as extensions. For these systems, we skip the definition of
317 # _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
318 # 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
319 # feature. Also, when using wildcards, make sure you have verified the 320 # feature. Also, when using wildcards, make sure you have verified the
320 # need for not defining _XOPEN_SOURCE on all systems matching the 321 # need for not defining _XOPEN_SOURCE on all systems matching the
321 # wildcard, and that the wildcard does not include future systems 322 # wildcard, and that the wildcard does not include future systems
322 # (which may remove their limitations). 323 # (which may remove their limitations).
323 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output 324 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
324 case $ac_sys_system/$ac_sys_release in 325 case $ac_sys_system/$ac_sys_release in
325 # 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,
326 # even though select is a POSIX function. Reported by J. Ribbens. 327 # even though select is a POSIX function. Reported by J. Ribbens.
327 # 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.
328 # In addition, Stefan Krah confirms that issue #1244610 exists through 329 # In addition, Stefan Krah confirms that issue #1244610 exists through
329 # OpenBSD 4.6, but is fixed in 4.7. 330 # OpenBSD 4.6, but is fixed in 4.7.
330 OpenBSD/2.* | OpenBSD/3.@<:@0123456789@:>@ | OpenBSD/4.@<:@0123456@:>@) 331 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.@<:@0123456@:>@)
331 define_xopen_source=no 332 define_xopen_source=no
332 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is 333 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
333 # also defined. This can be overridden by defining _BSD_SOURCE 334 # also defined. This can be overridden by defining _BSD_SOURCE
334 # 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
335 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])
336 ;; 337 ;;
337 OpenBSD/4.@<:@789@:>@) 338 OpenBSD/*)
338 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is 339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
339 # also defined. This can be overridden by defining _BSD_SOURCE 340 # also defined. This can be overridden by defining _BSD_SOURCE
340 # 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
341 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])
342 ;; 343 ;;
343 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of 344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
344 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by 345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
345 # Marc Recht 346 # Marc Recht
346 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@:>@)
347 define_xopen_source=no;; 348 define_xopen_source=no;;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 # 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
390 # defining NI_NUMERICHOST. 391 # defining NI_NUMERICHOST.
391 QNX/6.3.2) 392 QNX/6.3.2)
392 define_xopen_source=no 393 define_xopen_source=no
393 ;; 394 ;;
394 395
395 esac 396 esac
396 397
397 if test $define_xopen_source = yes 398 if test $define_xopen_source = yes
398 then 399 then
399 AC_DEFINE(_XOPEN_SOURCE, 600, 400 # X/Open 7, incorporating POSIX.1-2008
401 AC_DEFINE(_XOPEN_SOURCE, 700,
400 Define to the level of X/Open that your system supports) 402 Define to the level of X/Open that your system supports)
401 403
402 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires 404 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
403 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else 405 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
404 # 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
405 # cases for HP-UX, we define it globally. 407 # cases for HP-UX, we define it globally.
406 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, 408 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
407 Define to activate Unix95-and-earlier features) 409 Define to activate Unix95-and-earlier features)
408 410
409 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)
410
411 fi 412 fi
412 413
413 # 414 #
414 # 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
415 # 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,
416 # different and often incompatable code will be generated. 417 # different and often incompatable code will be generated.
417 # 418 #
418 # 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
419 # thus supply support for various ABI/ISA combinations. The MACHDEP 420 # thus supply support for various ABI/ISA combinations. The MACHDEP
420 # variable is also adjusted. 421 # variable is also adjusted.
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 SunOS*) 763 SunOS*)
763 LDLIBRARY='libpython$(LDVERSION).so' 764 LDLIBRARY='libpython$(LDVERSION).so'
764 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' 765 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
765 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} 766 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
766 INSTSONAME="$LDLIBRARY".$SOVERSION 767 INSTSONAME="$LDLIBRARY".$SOVERSION
767 if test "$with_pydebug" != yes 768 if test "$with_pydebug" != yes
768 then 769 then
769 PY3LIBRARY=libpython3.so 770 PY3LIBRARY=libpython3.so
770 fi 771 fi
771 ;; 772 ;;
772 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) 773 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
773 LDLIBRARY='libpython$(LDVERSION).so' 774 LDLIBRARY='libpython$(LDVERSION).so'
774 BLDLIBRARY='-L. -lpython$(LDVERSION)' 775 BLDLIBRARY='-L. -lpython$(LDVERSION)'
775 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} 776 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
776 case $ac_sys_system in 777 case $ac_sys_system in
777 FreeBSD*) 778 FreeBSD*)
778 SOVERSION=`echo $SOVERSION|cut -d "." -f 1` 779 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
779 ;; 780 ;;
780 esac 781 esac
781 INSTSONAME="$LDLIBRARY".$SOVERSION 782 INSTSONAME="$LDLIBRARY".$SOVERSION
782 if test "$with_pydebug" != yes 783 if test "$with_pydebug" != yes
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 then 898 then
898 case $GCC in 899 case $GCC in
899 yes) 900 yes)
900 if test "$CC" != 'g++' ; then 901 if test "$CC" != 'g++' ; then
901 STRICT_PROTO="-Wstrict-prototypes" 902 STRICT_PROTO="-Wstrict-prototypes"
902 fi 903 fi
903 # 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
904 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
905 WRAP="-fwrapv" 906 WRAP="-fwrapv"
906 fi 907 fi
908
909 # Clang also needs -fwrapv
910 case $CC in
911 *clang*) WRAP="-fwrapv"
912 ;;
913 esac
914
907 case $ac_cv_prog_cc_g in 915 case $ac_cv_prog_cc_g in
908 yes) 916 yes)
909 if test "$Py_DEBUG" = 'true' ; then 917 if test "$Py_DEBUG" = 'true' ; then
910 # Optimization messes up debuggers, so turn it off for 918 # Optimization messes up debuggers, so turn it off for
911 # debug builds. 919 # debug builds.
912 OPT="-g -O0 -Wall $STRICT_PROTO" 920 OPT="-g -O0 -Wall $STRICT_PROTO"
913 else 921 else
914 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" 922 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
915 fi 923 fi
916 ;; 924 ;;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 ac_cv_no_strict_aliasing=no 975 ac_cv_no_strict_aliasing=no
968 ])) 976 ]))
969 CFLAGS="$save_CFLAGS" 977 CFLAGS="$save_CFLAGS"
970 CC="$ac_save_cc" 978 CC="$ac_save_cc"
971 AC_MSG_RESULT($ac_cv_no_strict_aliasing) 979 AC_MSG_RESULT($ac_cv_no_strict_aliasing)
972 if test $ac_cv_no_strict_aliasing = yes 980 if test $ac_cv_no_strict_aliasing = yes
973 then 981 then
974 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" 982 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
975 fi 983 fi
976 984
985 AC_MSG_CHECKING(if we can turn off $CC unused result warning)
986 ac_save_cc="$CC"
987 CC="$CC -Wunused-result -Werror"
988 save_CFLAGS="$CFLAGS"
989 AC_CACHE_VAL(ac_cv_disable_unused_result_warning,
990 AC_COMPILE_IFELSE(
991 [
992 AC_LANG_PROGRAM([[]], [[]])
993 ],[
994 ac_cv_disable_unused_result_warning=yes
995 ],[
996 ac_cv_disable_unused_result_warning=no
997 ]))
998 CFLAGS="$save_CFLAGS"
999 CC="$ac_save_cc"
1000 AC_MSG_RESULT($ac_cv_disable_unused_result_warning)
1001
1002 if test $ac_cv_disable_unused_result_warning = yes
1003 then
1004 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
1005 fi
1006
977 # if using gcc on alpha, use -mieee to get (near) full IEEE 754 1007 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
978 # support. Without this, treatment of subnormals doesn't follow 1008 # support. Without this, treatment of subnormals doesn't follow
979 # the standard. 1009 # the standard.
980 case $ac_sys_machine in 1010 case $ac_sys_machine in
981 alpha*) 1011 alpha*)
982 BASECFLAGS="$BASECFLAGS -mieee" 1012 BASECFLAGS="$BASECFLAGS -mieee"
983 ;; 1013 ;;
984 esac 1014 esac
985 1015
986 case $ac_sys_system in 1016 case $ac_sys_system in
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc} 1323 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
1294 dnl int foo; 1324 dnl int foo;
1295 dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something"); 1325 dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1296 dnl ]], [[;]])],[cpp_type=ansi],[AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional]) 1326 dnl ]], [[;]])],[cpp_type=ansi],[AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional])
1297 dnl AC_MSG_RESULT($cpp_type) 1327 dnl AC_MSG_RESULT($cpp_type)
1298 1328
1299 # checks for header files 1329 # checks for header files
1300 AC_HEADER_STDC 1330 AC_HEADER_STDC
1301 AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ 1331 AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
1302 fcntl.h grp.h \ 1332 fcntl.h grp.h \
1303 ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ 1333 ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
1304 shadow.h signal.h stdint.h stropts.h termios.h thread.h \ 1334 sched.h shadow.h signal.h stdint.h stropts.h termios.h \
1305 unistd.h utime.h \ 1335 unistd.h utime.h \
1306 sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ 1336 poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
1307 sys/lock.h sys/mkdev.h sys/modem.h \ 1337 sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
1308 sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \ 1338 sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
1309 sys/stat.h sys/termio.h sys/time.h \ 1339 sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
1340 sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
1310 sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \ 1341 sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
1311 libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ 1342 libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
1312 bluetooth/bluetooth.h linux/tipc.h spawn.h util.h) 1343 bluetooth/bluetooth.h linux/tipc.h spawn.h util.h)
1313 AC_HEADER_DIRENT 1344 AC_HEADER_DIRENT
1314 AC_HEADER_MAJOR 1345 AC_HEADER_MAJOR
1315 1346
1316 # On Darwin (OS X) net/if.h requires sys/socket.h to be imported first. 1347 # On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
1317 AC_CHECK_HEADERS([net/if.h], [], [], 1348 AC_CHECK_HEADERS([net/if.h], [], [],
1318 [#include <stdio.h> 1349 [#include <stdio.h>
1319 #ifdef STDC_HEADERS 1350 #ifdef STDC_HEADERS
(...skipping 15 matching lines...) Expand all
1335 #ifdef HAVE_CURSES_H 1366 #ifdef HAVE_CURSES_H
1336 #include <curses.h> 1367 #include <curses.h>
1337 #endif 1368 #endif
1338 ]) 1369 ])
1339 1370
1340 # On Linux, netlink.h requires asm/types.h 1371 # On Linux, netlink.h requires asm/types.h
1341 AC_CHECK_HEADERS(linux/netlink.h,,,[ 1372 AC_CHECK_HEADERS(linux/netlink.h,,,[
1342 #ifdef HAVE_ASM_TYPES_H 1373 #ifdef HAVE_ASM_TYPES_H
1343 #include <asm/types.h> 1374 #include <asm/types.h>
1344 #endif 1375 #endif
1376 #ifdef HAVE_SYS_SOCKET_H
1377 #include <sys/socket.h>
1378 #endif
1379 ])
1380
1381 # On Linux, can.h and can/raw.h require sys/socket.h
1382 AC_CHECK_HEADERS(linux/can.h linux/can/raw.h,,,[
1345 #ifdef HAVE_SYS_SOCKET_H 1383 #ifdef HAVE_SYS_SOCKET_H
1346 #include <sys/socket.h> 1384 #include <sys/socket.h>
1347 #endif 1385 #endif
1348 ]) 1386 ])
1349 1387
1350 # checks for typedefs 1388 # checks for typedefs
1351 was_it_defined=no 1389 was_it_defined=no
1352 AC_MSG_CHECKING(for clock_t in time.h) 1390 AC_MSG_CHECKING(for clock_t in time.h)
1353 AC_EGREP_HEADER(clock_t, time.h, was_it_defined=yes, [ 1391 AC_EGREP_HEADER(clock_t, time.h, was_it_defined=yes, [
1354 AC_DEFINE(clock_t, long, [Define to 'long' if <time.h> doesn't define.]) 1392 AC_DEFINE(clock_t, long, [Define to 'long' if <time.h> doesn't define.])
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
2039 fi 2077 fi
2040 2078
2041 # This is used to generate Setup.config 2079 # This is used to generate Setup.config
2042 AC_SUBST(USE_THREAD_MODULE) 2080 AC_SUBST(USE_THREAD_MODULE)
2043 USE_THREAD_MODULE="" 2081 USE_THREAD_MODULE=""
2044 2082
2045 AC_SUBST(LDLAST) 2083 AC_SUBST(LDLAST)
2046 2084
2047 # Templates for things AC_DEFINEd more than once. 2085 # Templates for things AC_DEFINEd more than once.
2048 # For a single AC_DEFINE, no template is needed. 2086 # For a single AC_DEFINE, no template is needed.
2049 AH_TEMPLATE(C_THREADS,[Define if you have the Mach cthreads package])
2050 AH_TEMPLATE(_REENTRANT, 2087 AH_TEMPLATE(_REENTRANT,
2051 [Define to force use of thread-safe errno, h_errno, and other functions]) 2088 [Define to force use of thread-safe errno, h_errno, and other functions])
2052 AH_TEMPLATE(WITH_THREAD, 2089 AH_TEMPLATE(WITH_THREAD,
2053 [Define if you want to compile in rudimentary thread support]) 2090 [Define if you want to compile in rudimentary thread support])
2054 2091
2055 AC_MSG_CHECKING(for --with-threads) 2092 AC_MSG_CHECKING(for --with-threads)
2056 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output 2093 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
2057 AC_ARG_WITH(threads, 2094 AC_ARG_WITH(threads,
2058 AS_HELP_STRING([--with(out)-threads@<:@=DIRECTORY@:>@], [disable/ena ble thread support])) 2095 AS_HELP_STRING([--with(out)-threads@<:@=DIRECTORY@:>@], [disable/ena ble thread support]))
2059 2096
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 AC_EGREP_CPP(yes, 2158 AC_EGREP_CPP(yes,
2122 [ 2159 [
2123 #include <unistd.h> 2160 #include <unistd.h>
2124 #ifdef _POSIX_THREADS 2161 #ifdef _POSIX_THREADS
2125 yes 2162 yes
2126 #endif 2163 #endif
2127 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no) 2164 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
2128 AC_MSG_RESULT($unistd_defines_pthreads) 2165 AC_MSG_RESULT($unistd_defines_pthreads)
2129 2166
2130 AC_DEFINE(_REENTRANT) 2167 AC_DEFINE(_REENTRANT)
2131 AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
2132 AC_DEFINE(C_THREADS)
2133 AC_DEFINE(HURD_C_THREADS, 1,
2134 [Define if you are using Mach cthreads directly under /include])
2135 LIBS="$LIBS -lthreads"
2136 THREADOBJ="Python/thread.o"],[
2137 AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
2138 AC_DEFINE(C_THREADS)
2139 AC_DEFINE(MACH_C_THREADS, 1,
2140 [Define if you are using Mach cthreads under mach /])
2141 THREADOBJ="Python/thread.o"],[
2142 # Just looking for pthread_create in libpthread is not enough: 2168 # Just looking for pthread_create in libpthread is not enough:
2143 # on HP/UX, pthread.h renames pthread_create to a different symbol name. 2169 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
2144 # So we really have to include pthread.h, and then link. 2170 # So we really have to include pthread.h, and then link.
2145 _libs=$LIBS 2171 _libs=$LIBS
2146 LIBS="$LIBS -lpthread" 2172 LIBS="$LIBS -lpthread"
2147 AC_MSG_CHECKING([for pthread_create in -lpthread]) 2173 AC_MSG_CHECKING([for pthread_create in -lpthread])
2148 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h> 2174 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>
2149 2175
2150 void * start_routine (void *arg) { exit (0); }]], [[ 2176 void * start_routine (void *arg) { exit (0); }]], [[
2151 pthread_create (NULL, NULL, start_routine, NULL)]])],[ 2177 pthread_create (NULL, NULL, start_routine, NULL)]])],[
(...skipping 15 matching lines...) Expand all
2167 THREADOBJ="Python/thread.o"], [ 2193 THREADOBJ="Python/thread.o"], [
2168 AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD) 2194 AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
2169 posix_threads=yes 2195 posix_threads=yes
2170 LIBS="$LIBS -lpthread" 2196 LIBS="$LIBS -lpthread"
2171 THREADOBJ="Python/thread.o"], [ 2197 THREADOBJ="Python/thread.o"], [
2172 AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD) 2198 AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
2173 posix_threads=yes 2199 posix_threads=yes
2174 LIBS="$LIBS -lcma" 2200 LIBS="$LIBS -lcma"
2175 THREADOBJ="Python/thread.o"],[ 2201 THREADOBJ="Python/thread.o"],[
2176 USE_THREAD_MODULE="#"]) 2202 USE_THREAD_MODULE="#"])
2177 ])])])])])])]) 2203 ])])])])])
2178 2204
2179 AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) 2205 AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
2180 LIBS="$LIBS -lmpc" 2206 LIBS="$LIBS -lmpc"
2181 THREADOBJ="Python/thread.o" 2207 THREADOBJ="Python/thread.o"
2182 USE_THREAD_MODULE=""]) 2208 USE_THREAD_MODULE=""])
2183 2209
2184 if test "$posix_threads" != "yes"; then 2210 if test "$posix_threads" != "yes"; then
2185 AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD) 2211 AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
2186 LIBS="$LIBS -lthread" 2212 LIBS="$LIBS -lthread"
2187 THREADOBJ="Python/thread.o" 2213 THREADOBJ="Python/thread.o"
2188 USE_THREAD_MODULE=""]) 2214 USE_THREAD_MODULE=""])
2189 fi 2215 fi
2190 fi 2216 fi
2191 2217
2192 if test "$posix_threads" = "yes"; then 2218 if test "$posix_threads" = "yes"; then
2193 if test "$unistd_defines_pthreads" = "no"; then 2219 if test "$unistd_defines_pthreads" = "no"; then
2194 AC_DEFINE(_POSIX_THREADS, 1, 2220 AC_DEFINE(_POSIX_THREADS, 1,
2195 [Define if you have POSIX threads, 2221 [Define if you have POSIX threads,
2196 and your system does not define that.]) 2222 and your system does not define that.])
2197 fi 2223 fi
2198 2224
2199 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. 2225 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
2200 case $ac_sys_system/$ac_sys_release in 2226 case $ac_sys_system/$ac_sys_release in
2201 SunOS/5.6) AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1, 2227 SunOS/5.6) AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1,
2202 [Defined for Solaris 2.6 bug in pthread header.]) 2228 [Defined for Solaris 2.6 bug in pthread header.])
2203 ;; 2229 ;;
2204 SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1, 2230 SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
2205 [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])
2206 ;; 2232 ;;
2207 AIX/5) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1, 2233 AIX/*) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
2208 [Define if the Posix semaphores do not work on your syste m]) 2234 [Define if the Posix semaphores do not work on your syste m])
2209 ;; 2235 ;;
2210 AIX/6) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
2211 Define if the Posix semaphores do not work on your system)
2212 ;;
2213 esac 2236 esac
2214 2237
2215 AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported) 2238 AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
2216 AC_CACHE_VAL(ac_cv_pthread_system_supported, 2239 AC_CACHE_VAL(ac_cv_pthread_system_supported,
2217 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h> 2240 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h>
2218 void *foo(void *parm) { 2241 void *foo(void *parm) {
2219 return NULL; 2242 return NULL;
2220 } 2243 }
2221 main() { 2244 main() {
2222 pthread_attr_t attr; 2245 pthread_attr_t attr;
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
2540 AC_MSG_RESULT(MACHDEP_OBJS) 2563 AC_MSG_RESULT(MACHDEP_OBJS)
2541 2564
2542 # checks for library functions 2565 # checks for library functions
2543 AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ 2566 AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
2544 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \ 2567 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
2545 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ 2568 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
2546 futimens futimes gai_strerror \ 2569 futimens futimes gai_strerror \
2547 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ 2570 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
2548 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ 2571 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
2549 if_nameindex \ 2572 if_nameindex \
2550 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \ 2573 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
2574 memrchr mbrtowc mkdirat mkfifo \
2551 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock pol l \ 2575 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock pol l \
2552 posix_fallocate posix_fadvise pread \ 2576 posix_fallocate posix_fadvise pread \
2553 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath rena meat \ 2577 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath rena meat \
2554 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \ 2578 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
2555 setgid sethostname \ 2579 setgid sethostname \
2556 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setprior ity setuid setvbuf \ 2580 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setprior ity setuid setvbuf \
2557 sigaction sigaltstack siginterrupt sigpending \ 2581 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
2558 sigrelse sigwait snprintf strftime strlcpy symlinkat sync \ 2582 sched_rr_get_interval \
2583 sigaction sigaltstack siginterrupt sigpending sigrelse \
2584 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
2559 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ 2585 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
2560 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ 2586 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
2561 wcscoll wcsftime wcsxfrm writev _getpty) 2587 wcscoll wcsftime wcsxfrm writev _getpty)
2588
2589 AC_CHECK_DECL(dirfd,
2590 AC_DEFINE(HAVE_DIRFD, 1,
2591 Define if you have the 'dirfd' function or macro.), ,
2592 [#include <sys/types.h>
2593 #include <dirent.h>])
2562 2594
2563 # For some functions, having a definition is not sufficient, since 2595 # For some functions, having a definition is not sufficient, since
2564 # we want to take their address. 2596 # we want to take their address.
2565 AC_MSG_CHECKING(for chroot) 2597 AC_MSG_CHECKING(for chroot)
2566 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=chroot]])] , 2598 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=chroot]])] ,
2567 [AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.) 2599 [AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
2568 AC_MSG_RESULT(yes)], 2600 AC_MSG_RESULT(yes)],
2569 [AC_MSG_RESULT(no) 2601 [AC_MSG_RESULT(no)
2570 ]) 2602 ])
2571 AC_MSG_CHECKING(for link) 2603 AC_MSG_CHECKING(for link)
(...skipping 25 matching lines...) Expand all
2597 [AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.) 2629 [AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.)
2598 AC_MSG_RESULT(yes)], 2630 AC_MSG_RESULT(yes)],
2599 [AC_MSG_RESULT(no) 2631 [AC_MSG_RESULT(no)
2600 ]) 2632 ])
2601 AC_MSG_CHECKING(for epoll) 2633 AC_MSG_CHECKING(for epoll)
2602 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/epoll.h>]], [[void *x=epoll_c reate]])], 2634 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/epoll.h>]], [[void *x=epoll_c reate]])],
2603 [AC_DEFINE(HAVE_EPOLL, 1, Define if you have the 'epoll' functions.) 2635 [AC_DEFINE(HAVE_EPOLL, 1, Define if you have the 'epoll' functions.)
2604 AC_MSG_RESULT(yes)], 2636 AC_MSG_RESULT(yes)],
2605 [AC_MSG_RESULT(no) 2637 [AC_MSG_RESULT(no)
2606 ]) 2638 ])
2639 AC_MSG_CHECKING(for epoll_create1)
2640 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/epoll.h>]], [[void *x=epoll_c reate1]])],
2641 [AC_DEFINE(HAVE_EPOLL_CREATE1, 1, Define if you have the 'epoll_create1' funct ion.)
2642 AC_MSG_RESULT(yes)],
2643 [AC_MSG_RESULT(no)
2644 ])
2607 AC_MSG_CHECKING(for kqueue) 2645 AC_MSG_CHECKING(for kqueue)
2608 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 2646 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2609 #include <sys/types.h> 2647 #include <sys/types.h>
2610 #include <sys/event.h> 2648 #include <sys/event.h>
2611 ]], [[int x=kqueue()]])], 2649 ]], [[int x=kqueue()]])],
2612 [AC_DEFINE(HAVE_KQUEUE, 1, Define if you have the 'kqueue' functions.) 2650 [AC_DEFINE(HAVE_KQUEUE, 1, Define if you have the 'kqueue' functions.)
2613 AC_MSG_RESULT(yes)], 2651 AC_MSG_RESULT(yes)],
2614 [AC_MSG_RESULT(no) 2652 [AC_MSG_RESULT(no)
2615 ]) 2653 ])
2616 # On some systems (eg. FreeBSD 5), we would find a definition of the 2654 # On some systems (eg. FreeBSD 5), we would find a definition of the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 2687
2650 AC_MSG_CHECKING(for getpagesize) 2688 AC_MSG_CHECKING(for getpagesize)
2651 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 2689 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2652 #include <unistd.h> 2690 #include <unistd.h>
2653 ]], [[void* p = getpagesize]])], 2691 ]], [[void* p = getpagesize]])],
2654 [AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function. ) 2692 [AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function. )
2655 AC_MSG_RESULT(yes)], 2693 AC_MSG_RESULT(yes)],
2656 [AC_MSG_RESULT(no) 2694 [AC_MSG_RESULT(no)
2657 ]) 2695 ])
2658 2696
2659 AC_MSG_CHECKING(whether mallopt can set malloc mmap threshold) 2697 AC_MSG_CHECKING(for broken unsetenv)
2660 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 2698 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2661 #include <malloc.h> 2699 #include <stdlib.h>
2662 ]], [[mallopt(M_MMAP_THRESHOLD, 256 * 1024)]])], 2700 ]], [[int res = unsetenv("DUMMY")]])],
2663 [AC_DEFINE(HAVE_MALLOPT_MMAP_THRESHOLD, 1, Define if mallopt can set malloc mm ap threshold.) 2701 [AC_MSG_RESULT(no)],
2664 AC_MSG_RESULT(yes)], 2702 [AC_DEFINE(HAVE_BROKEN_UNSETENV, 1, Define if `unsetenv` does not return an in t.)
2665 [AC_MSG_RESULT(no) 2703 AC_MSG_RESULT(yes)
2666 ]) 2704 ])
2667 2705
2668 dnl check for true 2706 dnl check for true
2669 AC_CHECK_PROGS(TRUE, true, /bin/true) 2707 AC_CHECK_PROGS(TRUE, true, /bin/true)
2670 2708
2671 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv 2709 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
2672 dnl On others, they are in the C library, so we to take no action 2710 dnl On others, they are in the C library, so we to take no action
2673 AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_TRUE], 2711 AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_TRUE],
2674 AC_CHECK_LIB(resolv, inet_aton) 2712 AC_CHECK_LIB(resolv, inet_aton)
2675 ) 2713 )
2676 2714
2677 # On Tru64, chflags seems to be present, but calling it will 2715 # On Tru64, chflags seems to be present, but calling it will
2678 # exit Python 2716 # exit Python
2679 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl 2717 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
2680 AC_RUN_IFELSE([AC_LANG_SOURCE([[[ 2718 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2681 #include <sys/stat.h> 2719 #include <sys/stat.h>
2682 #include <unistd.h> 2720 #include <unistd.h>
2683 int main(int argc, char*argv[]) 2721 int main(int argc, char*argv[])
2684 { 2722 {
2685 if(chflags(argv[0], 0) != 0) 2723 if(chflags(argv[0], 0) != 0)
2686 return 1; 2724 return 1;
2687 return 0; 2725 return 0;
2688 } 2726 }
2689 ]]])], 2727 ]])],
2690 [ac_cv_have_chflags=yes], 2728 [ac_cv_have_chflags=yes],
2691 [ac_cv_have_chflags=no], 2729 [ac_cv_have_chflags=no],
2692 [ac_cv_have_chflags=cross]) 2730 [ac_cv_have_chflags=cross])
2693 ]) 2731 ])
2694 if test "$ac_cv_have_chflags" = cross ; then 2732 if test "$ac_cv_have_chflags" = cross ; then
2695 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"] ) 2733 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"] )
2696 fi 2734 fi
2697 if test "$ac_cv_have_chflags" = yes ; then 2735 if test "$ac_cv_have_chflags" = yes ; then
2698 AC_DEFINE(HAVE_CHFLAGS, 1, [Define to 1 if you have the `chflags' function.]) 2736 AC_DEFINE(HAVE_CHFLAGS, 1, [Define to 1 if you have the 'chflags' function.])
2699 fi 2737 fi
2700 2738
2701 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl 2739 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
2702 AC_RUN_IFELSE([AC_LANG_SOURCE([[[ 2740 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2703 #include <sys/stat.h> 2741 #include <sys/stat.h>
2704 #include <unistd.h> 2742 #include <unistd.h>
2705 int main(int argc, char*argv[]) 2743 int main(int argc, char*argv[])
2706 { 2744 {
2707 if(lchflags(argv[0], 0) != 0) 2745 if(lchflags(argv[0], 0) != 0)
2708 return 1; 2746 return 1;
2709 return 0; 2747 return 0;
2710 } 2748 }
2711 ]]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cr oss]) 2749 ]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cro ss])
2712 ]) 2750 ])
2713 if test "$ac_cv_have_lchflags" = cross ; then 2751 if test "$ac_cv_have_lchflags" = cross ; then
2714 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="n o"]) 2752 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="n o"])
2715 fi 2753 fi
2716 if test "$ac_cv_have_lchflags" = yes ; then 2754 if test "$ac_cv_have_lchflags" = yes ; then
2717 AC_DEFINE(HAVE_LCHFLAGS, 1, [Define to 1 if you have the `lchflags' function.] ) 2755 AC_DEFINE(HAVE_LCHFLAGS, 1, [Define to 1 if you have the 'lchflags' function.] )
2718 fi 2756 fi
2719 2757
2720 dnl Check if system zlib has *Copy() functions 2758 dnl Check if system zlib has *Copy() functions
2721 dnl 2759 dnl
2722 dnl On MacOSX the linker will search for dylibs on the entire linker path 2760 dnl On MacOSX the linker will search for dylibs on the entire linker path
2723 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first 2761 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
2724 dnl to revert to a more traditional unix behaviour and make it possible to 2762 dnl to revert to a more traditional unix behaviour and make it possible to
2725 dnl override the system libz with a local static library of libz. Temporarily 2763 dnl override the system libz with a local static library of libz. Temporarily
2726 dnl add that flag to our CFLAGS as well to ensure that we check the version 2764 dnl add that flag to our CFLAGS as well to ensure that we check the version
2727 dnl of libz that will be used by setup.py. 2765 dnl of libz that will be used by setup.py.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2826 ) 2864 )
2827 AC_CHECK_FUNCS(gettimeofday, 2865 AC_CHECK_FUNCS(gettimeofday,
2828 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], 2866 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]],
2829 [[gettimeofday((struct timeval*)0,(struct t imezone*)0);]])], 2867 [[gettimeofday((struct timeval*)0,(struct t imezone*)0);]])],
2830 [], 2868 [],
2831 [AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1, 2869 [AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
2832 [Define if gettimeofday() does not have second (timezone) argument 2870 [Define if gettimeofday() does not have second (timezone) argument
2833 This is the case on Motorola V4 (R40V4.2)]) 2871 This is the case on Motorola V4 (R40V4.2)])
2834 ]) 2872 ])
2835 ) 2873 )
2874
2875 AC_CHECK_FUNCS(clock_gettime, [], [
2876 AC_CHECK_LIB(rt, clock_gettime, [
2877 AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
2878 AC_DEFINE(TIMEMODULE_LIB, [rt],
2879 [Library needed by timemodule.c: librt may be needed for clock _gettime()])
2880 ])
2881 ])
2882
2883 AC_CHECK_FUNCS(clock_getres, [], [
2884 AC_CHECK_LIB(rt, clock_getres, [
2885 AC_DEFINE(HAVE_CLOCK_GETRES, 1)
2886 ])
2887 ])
2836 2888
2837 AC_MSG_CHECKING(for major, minor, and makedev) 2889 AC_MSG_CHECKING(for major, minor, and makedev)
2838 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 2890 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
2839 #if defined(MAJOR_IN_MKDEV) 2891 #if defined(MAJOR_IN_MKDEV)
2840 #include <sys/mkdev.h> 2892 #include <sys/mkdev.h>
2841 #elif defined(MAJOR_IN_SYSMACROS) 2893 #elif defined(MAJOR_IN_SYSMACROS)
2842 #include <sys/sysmacros.h> 2894 #include <sys/sysmacros.h>
2843 #else 2895 #else
2844 #include <sys/types.h> 2896 #include <sys/types.h>
2845 #endif 2897 #endif
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
3609 /* Success: exit code 0 */ 3661 /* Success: exit code 0 */
3610 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1); 3662 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
3611 } 3663 }
3612 ]])], 3664 ]])],
3613 [ac_cv_wchar_t_signed=yes], 3665 [ac_cv_wchar_t_signed=yes],
3614 [ac_cv_wchar_t_signed=no], 3666 [ac_cv_wchar_t_signed=no],
3615 [ac_cv_wchar_t_signed=yes])]) 3667 [ac_cv_wchar_t_signed=yes])])
3616 AC_MSG_RESULT($ac_cv_wchar_t_signed) 3668 AC_MSG_RESULT($ac_cv_wchar_t_signed)
3617 fi 3669 fi
3618 3670
3619 AC_MSG_CHECKING(what type to use for str)
3620 AC_ARG_WITH(wide-unicode,
3621 AS_HELP_STRING([--with-wide-unicode], [Use 4-byte Unicode characters (default is 2 bytes)]),
3622 [
3623 if test "$withval" != no
3624 then unicode_size="4"
3625 else unicode_size="2"
3626 fi
3627 ],
3628 [
3629 case "$have_ucs4_tcl" in
3630 yes) unicode_size="4";;
3631 *) unicode_size="2" ;;
3632 esac
3633 ])
3634
3635 AH_TEMPLATE(Py_UNICODE_SIZE,
3636 [Define as the size of the unicode type.])
3637 case "$unicode_size" in
3638 4)
3639 AC_DEFINE(Py_UNICODE_SIZE, 4)
3640 ABIFLAGS="${ABIFLAGS}u"
3641 ;;
3642 *) AC_DEFINE(Py_UNICODE_SIZE, 2) ;;
3643 esac
3644
3645 AH_TEMPLATE(PY_UNICODE_TYPE,
3646 [Define as the integral type used for Unicode representation.])
3647
3648 # wchar_t is only usable if it maps to an unsigned type 3671 # wchar_t is only usable if it maps to an unsigned type
3649 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \ 3672 if test "$ac_cv_sizeof_wchar_t" -ge 2 \
3650 -a "$ac_cv_wchar_t_signed" = "no" 3673 -a "$ac_cv_wchar_t_signed" = "no"
3651 then 3674 then
3652 PY_UNICODE_TYPE="wchar_t" 3675 HAVE_USABLE_WCHAR_T="yes"
3653 AC_DEFINE(HAVE_USABLE_WCHAR_T, 1, 3676 AC_DEFINE(HAVE_USABLE_WCHAR_T, 1,
3654 [Define if you have a useable wchar_t type defined in wchar.h; useable 3677 [Define if you have a useable wchar_t type defined in wchar.h; useable
3655 means wchar_t must be an unsigned type with at least 16 bits. (see 3678 means wchar_t must be an unsigned type with at least 16 bits. (see
3656 Include/unicodeobject.h).]) 3679 Include/unicodeobject.h).])
3657 AC_DEFINE(PY_UNICODE_TYPE,wchar_t)
3658 elif test "$ac_cv_sizeof_short" = "$unicode_size"
3659 then
3660 PY_UNICODE_TYPE="unsigned short"
3661 AC_DEFINE(PY_UNICODE_TYPE,unsigned short)
3662 elif test "$ac_cv_sizeof_long" = "$unicode_size"
3663 then
3664 PY_UNICODE_TYPE="unsigned long"
3665 AC_DEFINE(PY_UNICODE_TYPE,unsigned long)
3666 else 3680 else
3667 PY_UNICODE_TYPE="no type found" 3681 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
3668 fi 3682 fi
3669 AC_MSG_RESULT($PY_UNICODE_TYPE) 3683 AC_MSG_RESULT($HAVE_USABLE_WCHAR_T)
3670 3684
3671 # check for endianness 3685 # check for endianness
3672 AC_C_BIGENDIAN 3686 AC_C_BIGENDIAN
3673 3687
3674 # ABI version string for Python extension modules. This appears between the 3688 # ABI version string for Python extension modules. This appears between the
3675 # periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated 3689 # periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
3676 # from the following attributes which affect the ABI of this Python build (in 3690 # from the following attributes which affect the ABI of this Python build (in
3677 # this order): 3691 # this order):
3678 # 3692 #
3679 # * The Python implementation (always 'cpython-' for us) 3693 # * The Python implementation (always 'cpython-' for us)
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
4391 if test ! -f Modules/Setup.local 4405 if test ! -f Modules/Setup.local
4392 then 4406 then
4393 echo "# Edit this file for local setup changes" >Modules/Setup.local 4407 echo "# Edit this file for local setup changes" >Modules/Setup.local
4394 fi 4408 fi
4395 4409
4396 echo "creating Makefile" 4410 echo "creating Makefile"
4397 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 4411 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
4398 -s Modules Modules/Setup.config \ 4412 -s Modules Modules/Setup.config \
4399 Modules/Setup.local Modules/Setup 4413 Modules/Setup.local Modules/Setup
4400 mv config.c Modules 4414 mv config.c Modules
LEFTRIGHT

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