annotate configure.ac @ 79675:c0a2294de787 2.7

Issue #16199: Backport 2to3 typo fix from 3.2.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Thu, 11 Oct 2012 16:15:46 -0700
parents 2dde5a7439fd
children e0a2b14a3cf9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47297
4d98ebaed278 put a big note on configure.in asking people to run autoconf
Benjamin Peterson <benjamin@python.org>
parents: 47232
diff changeset
1 dnl ***********************************************
4d98ebaed278 put a big note on configure.in asking people to run autoconf
Benjamin Peterson <benjamin@python.org>
parents: 47232
diff changeset
2 dnl * Please run autoreconf to test your changes! *
4d98ebaed278 put a big note on configure.in asking people to run autoconf
Benjamin Peterson <benjamin@python.org>
parents: 47232
diff changeset
3 dnl ***********************************************
25923
834b0e0389c5 Patch #623771: Properly use autoconf 2.5x macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25921
diff changeset
4
834b0e0389c5 Patch #623771: Properly use autoconf 2.5x macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25921
diff changeset
5 # Set VERSION so we only need to edit in one place (i.e., here)
49398
1091008f2cbd Bump version to 2.7. Regenerate.
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
6 m4_define(PYTHON_VERSION, 2.7)
25923
834b0e0389c5 Patch #623771: Properly use autoconf 2.5x macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25921
diff changeset
7
68017
226f001a701f Merged revisions 88426 via svnmerge from
Georg Brandl <georg@python.org>
parents: 67315
diff changeset
8 AC_PREREQ(2.65)
25923
834b0e0389c5 Patch #623771: Properly use autoconf 2.5x macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25921
diff changeset
9
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
10 AC_REVISION($Revision$)
54221
4fa4ca4503c8 Update bug tracker URL.
Georg Brandl <georg@python.org>
parents: 53937
diff changeset
11 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
25923
834b0e0389c5 Patch #623771: Properly use autoconf 2.5x macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25921
diff changeset
12 AC_CONFIG_SRCDIR([Include/object.h])
18835
2dea40e40d9d Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774.
Martin v. Löwis <martin@v.loewis.de>
parents: 18827
diff changeset
13 AC_CONFIG_HEADER(pyconfig.h)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
14
52599
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
15 dnl Ensure that if prefix is specified, it does not end in a slash. If
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
16 dnl it does, we get path names containing '//' which is both ugly and
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
17 dnl can cause trouble.
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
18
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
19 dnl Last slash shouldn't be stripped if prefix=/
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
20 if test "$prefix" != "/"; then
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
21 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
22 fi
e5286be24ed5 #1676135: remove trailing slashes from --prefix argument.
Georg Brandl <georg@python.org>
parents: 52453
diff changeset
23
29460
9883cf8ff217 Explicitly undefine PACKAGE_ variables. Fixes #746012.
Martin v. Löwis <martin@v.loewis.de>
parents: 29341
diff changeset
24 dnl This is for stuff that absolutely must end up in pyconfig.h.
9883cf8ff217 Explicitly undefine PACKAGE_ variables. Fixes #746012.
Martin v. Löwis <martin@v.loewis.de>
parents: 29341
diff changeset
25 dnl Please use pyport.h instead, if possible.
26147
65d6f0bfa461 Protect pyconfig.h from multiple inclusions.
Martin v. Löwis <martin@v.loewis.de>
parents: 26146
diff changeset
26 AH_TOP([
65d6f0bfa461 Protect pyconfig.h from multiple inclusions.
Martin v. Löwis <martin@v.loewis.de>
parents: 26146
diff changeset
27 #ifndef Py_PYCONFIG_H
65d6f0bfa461 Protect pyconfig.h from multiple inclusions.
Martin v. Löwis <martin@v.loewis.de>
parents: 26146
diff changeset
28 #define Py_PYCONFIG_H
65d6f0bfa461 Protect pyconfig.h from multiple inclusions.
Martin v. Löwis <martin@v.loewis.de>
parents: 26146
diff changeset
29 ])
22989
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
30 AH_BOTTOM([
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
31 /* Define the macros needed if on a UnixWare 7.x system. */
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
32 #if defined(__USLC__) && defined(__SCO_VERSION__)
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
33 #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
34 #endif
26147
65d6f0bfa461 Protect pyconfig.h from multiple inclusions.
Martin v. Löwis <martin@v.loewis.de>
parents: 26146
diff changeset
35
65d6f0bfa461 Protect pyconfig.h from multiple inclusions.
Martin v. Löwis <martin@v.loewis.de>
parents: 26146
diff changeset
36 #endif /*Py_PYCONFIG_H*/
22989
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
37 ])
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
38
29460
9883cf8ff217 Explicitly undefine PACKAGE_ variables. Fixes #746012.
Martin v. Löwis <martin@v.loewis.de>
parents: 29341
diff changeset
39 # We don't use PACKAGE_ variables, and they cause conflicts
9883cf8ff217 Explicitly undefine PACKAGE_ variables. Fixes #746012.
Martin v. Löwis <martin@v.loewis.de>
parents: 29341
diff changeset
40 # with other autoconf-based packages that include Python.h
9883cf8ff217 Explicitly undefine PACKAGE_ variables. Fixes #746012.
Martin v. Löwis <martin@v.loewis.de>
parents: 29341
diff changeset
41 grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
9883cf8ff217 Explicitly undefine PACKAGE_ variables. Fixes #746012.
Martin v. Löwis <martin@v.loewis.de>
parents: 29341
diff changeset
42 rm confdefs.h
9883cf8ff217 Explicitly undefine PACKAGE_ variables. Fixes #746012.
Martin v. Löwis <martin@v.loewis.de>
parents: 29341
diff changeset
43 mv confdefs.h.new confdefs.h
9883cf8ff217 Explicitly undefine PACKAGE_ variables. Fixes #746012.
Martin v. Löwis <martin@v.loewis.de>
parents: 29341
diff changeset
44
5856
c4dd3329fd7d Set $VERSION here (fixed to 1.5).
Guido van Rossum <guido@python.org>
parents: 5843
diff changeset
45 AC_SUBST(VERSION)
25923
834b0e0389c5 Patch #623771: Properly use autoconf 2.5x macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25921
diff changeset
46 VERSION=PYTHON_VERSION
5856
c4dd3329fd7d Set $VERSION here (fixed to 1.5).
Guido van Rossum <guido@python.org>
parents: 5843
diff changeset
47
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
48 AC_SUBST(SOVERSION)
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
49 SOVERSION=1.0
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
50
24342
2ae0145931f1 Define _XOPEN_SOURCE and _GNU_SOURCE in pyconfig.h, to have them
Martin v. Löwis <martin@v.loewis.de>
parents: 24327
diff changeset
51 # The later defininition of _XOPEN_SOURCE disables certain features
2ae0145931f1 Define _XOPEN_SOURCE and _GNU_SOURCE in pyconfig.h, to have them
Martin v. Löwis <martin@v.loewis.de>
parents: 24327
diff changeset
52 # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2ae0145931f1 Define _XOPEN_SOURCE and _GNU_SOURCE in pyconfig.h, to have them
Martin v. Löwis <martin@v.loewis.de>
parents: 24327
diff changeset
53 AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])
2ae0145931f1 Define _XOPEN_SOURCE and _GNU_SOURCE in pyconfig.h, to have them
Martin v. Löwis <martin@v.loewis.de>
parents: 24327
diff changeset
54
28954
9d5a75916971 Patch #730826: Enable extensions on NetBSD 2.0.
Martin v. Löwis <martin@v.loewis.de>
parents: 28953
diff changeset
55 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
9d5a75916971 Patch #730826: Enable extensions on NetBSD 2.0.
Martin v. Löwis <martin@v.loewis.de>
parents: 28953
diff changeset
56 # certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
9d5a75916971 Patch #730826: Enable extensions on NetBSD 2.0.
Martin v. Löwis <martin@v.loewis.de>
parents: 28953
diff changeset
57 # them.
9d5a75916971 Patch #730826: Enable extensions on NetBSD 2.0.
Martin v. Löwis <martin@v.loewis.de>
parents: 28953
diff changeset
58 AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
9d5a75916971 Patch #730826: Enable extensions on NetBSD 2.0.
Martin v. Löwis <martin@v.loewis.de>
parents: 28953
diff changeset
59
29737
a5e7336c008d FreeBSD 5.x has moved some library routines and typedefs outside the
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 29630
diff changeset
60 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
a5e7336c008d FreeBSD 5.x has moved some library routines and typedefs outside the
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 29630
diff changeset
61 # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
a5e7336c008d FreeBSD 5.x has moved some library routines and typedefs outside the
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 29630
diff changeset
62 # them.
a5e7336c008d FreeBSD 5.x has moved some library routines and typedefs outside the
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 29630
diff changeset
63 AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
a5e7336c008d FreeBSD 5.x has moved some library routines and typedefs outside the
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 29630
diff changeset
64
33097
c70c33f69a44 Define _BSD_TYPES. Fixes #1005308. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 33063
diff changeset
65 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
c70c33f69a44 Define _BSD_TYPES. Fixes #1005308. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 33063
diff changeset
66 # u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
c70c33f69a44 Define _BSD_TYPES. Fixes #1005308. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 33063
diff changeset
67 AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
c70c33f69a44 Define _BSD_TYPES. Fixes #1005308. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 33063
diff changeset
68
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
69 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
70 # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
71 # them.
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
72 AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
73
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
74
26146
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
75 define_xopen_source=yes
24342
2ae0145931f1 Define _XOPEN_SOURCE and _GNU_SOURCE in pyconfig.h, to have them
Martin v. Löwis <martin@v.loewis.de>
parents: 24327
diff changeset
76
17122
9e6e4f5e5604 Add CONFIG_ARGS Makefile variable (saves the arguments passed
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17103
diff changeset
77 # Arguments passed to configure.
9e6e4f5e5604 Add CONFIG_ARGS Makefile variable (saves the arguments passed
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17103
diff changeset
78 AC_SUBST(CONFIG_ARGS)
9e6e4f5e5604 Add CONFIG_ARGS Makefile variable (saves the arguments passed
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17103
diff changeset
79 CONFIG_ARGS="$ac_configure_args"
9e6e4f5e5604 Add CONFIG_ARGS Makefile variable (saves the arguments passed
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17103
diff changeset
80
58793
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
81 AC_MSG_CHECKING([for --enable-universalsdk])
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
82 AC_ARG_ENABLE(universalsdk,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
83 AS_HELP_STRING([--enable-universalsdk@<:@=SDKDIR@:>@], [Build against Mac OS X 10.4u SDK (ppc/i386)]),
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
84 [
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
85 case $enableval in
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
86 yes)
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
87 enableval=/Developer/SDKs/MacOSX10.4u.sdk
58793
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
88 if test ! -d "${enableval}"
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
89 then
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
90 enableval=/
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
91 fi
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
92 ;;
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
93 esac
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
94 case $enableval in
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
95 no)
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
96 UNIVERSALSDK=
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
97 enable_universalsdk=
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
98 ;;
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
99 *)
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
100 UNIVERSALSDK=$enableval
58793
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
101 if test ! -d "${UNIVERSALSDK}"
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
102 then
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
103 AC_MSG_ERROR([--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}])
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
104 fi
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
105 ;;
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
106 esac
58793
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
107
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
108 ],[
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
109 UNIVERSALSDK=
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
110 enable_universalsdk=
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
111 ])
58793
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
112 if test -n "${UNIVERSALSDK}"
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
113 then
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
114 AC_MSG_RESULT(${UNIVERSALSDK})
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
115 else
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
116 AC_MSG_RESULT(no)
10f19d1c3b77 Merged revisions 77587 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58789
diff changeset
117 fi
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
118 AC_SUBST(UNIVERSALSDK)
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
119
47986
ec85b58ad2ba fix framework install on Mac 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47843
diff changeset
120 AC_SUBST(ARCH_RUN_32BIT)
ec85b58ad2ba fix framework install on Mac 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47843
diff changeset
121
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
122 UNIVERSAL_ARCHS="32-bit"
59487
e2762f495393 Fix for issue8089: a framework build with --with-universal-archs=3-way|intel had no way to select
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59479
diff changeset
123 AC_SUBST(LIPO_32BIT_FLAGS)
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
124 AC_MSG_CHECKING(for --with-universal-archs)
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
125 AC_ARG_WITH(universal-archs,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
126 AS_HELP_STRING([--with-universal-archs=ARCH], [select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")]),
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
127 [
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
128 AC_MSG_RESULT($withval)
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
129 UNIVERSAL_ARCHS="$withval"
56283
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
130 if test "${enable_universalsdk}" ; then
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
131 :
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
132 else
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
133 AC_MSG_ERROR([--with-universal-archs without --enable-universalsdk. See Mac/README])
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
134 fi
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
135 ],
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
136 [
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
137 AC_MSG_RESULT(32-bit)
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
138 ])
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
139
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
140
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
141
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
142 AC_ARG_WITH(framework-name,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
143 AS_HELP_STRING([--with-framework-name=FRAMEWORK],
60924
f4fe53f86627 - Issue #8509: Fix quoting in help strings and code snippets in configure.in.
Matthias Klose <doko@ubuntu.com>
parents: 60694
diff changeset
144 [specify an alternate name of the framework built with --enable-framework]),
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
145 [
56283
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
146 if test "${enable_framework}"; then
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
147 :
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
148 else
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
149 AC_MSG_ERROR([--with-framework-name without --enable-framework. See Mac/README])
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
150 fi
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
151 PYTHONFRAMEWORK=${withval}
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
152 PYTHONFRAMEWORKDIR=${withval}.framework
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
153 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
154 ],[
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
155 PYTHONFRAMEWORK=Python
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
156 PYTHONFRAMEWORKDIR=Python.framework
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
157 PYTHONFRAMEWORKIDENTIFIER=org.python.python
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
158 ])
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
159 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
160 AC_ARG_ENABLE(framework,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
161 AS_HELP_STRING([--enable-framework@<:@=INSTALLDIR@:>@], [Build (MacOSX|Darwin) framework]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
162 [
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
163 case $enableval in
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
164 yes)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
165 enableval=/Library/Frameworks
19858
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
166 esac
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
167 case $enableval in
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
168 no)
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
169 PYTHONFRAMEWORK=
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
170 PYTHONFRAMEWORKDIR=no-framework
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
171 PYTHONFRAMEWORKPREFIX=
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
172 PYTHONFRAMEWORKINSTALLDIR=
38349
ad2e4de47d09 Integrate installing a framework in the 'make install'
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38219
diff changeset
173 FRAMEWORKINSTALLFIRST=
ad2e4de47d09 Integrate installing a framework in the 'make install'
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38219
diff changeset
174 FRAMEWORKINSTALLLAST=
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38548
diff changeset
175 FRAMEWORKALTINSTALLFIRST=
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38548
diff changeset
176 FRAMEWORKALTINSTALLLAST=
38647
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
177 if test "x${prefix}" = "xNONE"; then
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
178 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
179 else
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
180 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
181 fi
19858
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
182 enable_framework=
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
183 ;;
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
184 *)
61113
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
185 PYTHONFRAMEWORKPREFIX="${enableval}"
19858
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
186 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
38349
ad2e4de47d09 Integrate installing a framework in the 'make install'
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38219
diff changeset
187 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
188 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
57913
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 57711
diff changeset
189 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 57711
diff changeset
190 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
61113
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
192
38647
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
193 if test "x${prefix}" = "xNONE" ; then
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
194 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
61113
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
195
38647
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
196 else
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
197 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
198 fi
61113
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
199
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
200 case "${enableval}" in
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
201 /System*)
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
202 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
203 if test "${prefix}" = "NONE" ; then
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
204 # See below
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
205 FRAMEWORKUNIXTOOLSPREFIX="/usr"
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
206 fi
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
207 ;;
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
208
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
209 /Library*)
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
210 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
211 ;;
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
212
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
213 */Library/Frameworks)
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
214 MDIR="`dirname "${enableval}"`"
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
215 MDIR="`dirname "${MDIR}"`"
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
216 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
217
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
218 if test "${prefix}" = "NONE"; then
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
219 # User hasn't specified the
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
220 # --prefix option, but wants to install
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
221 # the framework in a non-default location,
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
222 # ensure that the compatibility links get
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
223 # installed relative to that prefix as well
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
224 # instead of in /usr/local.
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
225 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
226 fi
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
227 ;;
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
228
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
229 *)
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
230 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
231 ;;
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
232 esac
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
233
19858
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
234 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38151
diff changeset
235
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
236 # Add files for Mac specific code to the list of output
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38151
diff changeset
237 # files:
38647
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
238 AC_CONFIG_FILES(Mac/Makefile)
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
239 AC_CONFIG_FILES(Mac/PythonLauncher/Makefile)
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
240 AC_CONFIG_FILES(Mac/IDLE/Makefile)
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
241 AC_CONFIG_FILES(Mac/Resources/framework/Info.plist)
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
242 AC_CONFIG_FILES(Mac/Resources/app/Info.plist)
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
243 esac
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
244 ],[
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
245 PYTHONFRAMEWORK=
19858
873be8e3462b When frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19830
diff changeset
246 PYTHONFRAMEWORKDIR=no-framework
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
247 PYTHONFRAMEWORKPREFIX=
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
248 PYTHONFRAMEWORKINSTALLDIR=
38349
ad2e4de47d09 Integrate installing a framework in the 'make install'
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38219
diff changeset
249 FRAMEWORKINSTALLFIRST=
ad2e4de47d09 Integrate installing a framework in the 'make install'
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38219
diff changeset
250 FRAMEWORKINSTALLLAST=
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38548
diff changeset
251 FRAMEWORKALTINSTALLFIRST=
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38548
diff changeset
252 FRAMEWORKALTINSTALLLAST=
38647
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
253 if test "x${prefix}" = "xNONE" ; then
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
254 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
255 else
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
256 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
7704f37541f4 And the last bit: move IDLE one level up and adjust makefiles
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
257 fi
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
258 enable_framework=
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
259
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
260 ])
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
261 AC_SUBST(PYTHONFRAMEWORK)
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46560
diff changeset
262 AC_SUBST(PYTHONFRAMEWORKIDENTIFIER)
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
263 AC_SUBST(PYTHONFRAMEWORKDIR)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
264 AC_SUBST(PYTHONFRAMEWORKPREFIX)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
265 AC_SUBST(PYTHONFRAMEWORKINSTALLDIR)
38349
ad2e4de47d09 Integrate installing a framework in the 'make install'
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38219
diff changeset
266 AC_SUBST(FRAMEWORKINSTALLFIRST)
ad2e4de47d09 Integrate installing a framework in the 'make install'
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38219
diff changeset
267 AC_SUBST(FRAMEWORKINSTALLLAST)
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38548
diff changeset
268 AC_SUBST(FRAMEWORKALTINSTALLFIRST)
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38548
diff changeset
269 AC_SUBST(FRAMEWORKALTINSTALLLAST)
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38548
diff changeset
270 AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)
61113
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61047
diff changeset
271 AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX)
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
272
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
273 ##AC_ARG_WITH(dyld,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
274 ## AS_HELP_STRING([--with-dyld],
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
275 ## [Use (OpenStep|Rhapsody) dynamic linker]))
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
276 ##
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
277 # Set name for machine-dependent library files
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
278 AC_SUBST(MACHDEP)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
279 AC_MSG_CHECKING(MACHDEP)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
280 if test -z "$MACHDEP"
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
281 then
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
282 ac_sys_system=`uname -s`
55816
61dbc1d1b804 #5047: remove Monterey support from configure.
Georg Brandl <georg@python.org>
parents: 55317
diff changeset
283 if test "$ac_sys_system" = "AIX" \
25497
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
284 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
285 ac_sys_release=`uname -v`
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
286 else
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
287 ac_sys_release=`uname -r`
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
288 fi
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
289 ac_md_system=`echo $ac_sys_system |
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
290 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
291 ac_md_release=`echo $ac_sys_release |
20581
bf03b8e3ef93 Patch from SF bug #473150: configure weaknesses on HP-UX (Michael Piotrowski)
Guido van Rossum <guido@python.org>
parents: 20551
diff changeset
292 tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
6341
1ed914f8bf0a Remove plat- prefix from MACHDEP macro;
Guido van Rossum <guido@python.org>
parents: 6263
diff changeset
293 MACHDEP="$ac_md_system$ac_md_release"
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
294
5207
00ebfa33cc07 Fix typo (missing $ in )
Guido van Rossum <guido@python.org>
parents: 5034
diff changeset
295 case $MACHDEP in
71979
c816479f6aaf Issue #12326: sys.platform is now always 'linux2' on Linux
Victor Stinner <victor.stinner@haypocalc.com>
parents: 71493
diff changeset
296 linux*) MACHDEP="linux2";;
18782
98484ef225f9 Patch #429442 from Jason Tishler: Corrects sys.platform and
Andrew M. Kuchling <amk@amk.ca>
parents: 18735
diff changeset
297 cygwin*) MACHDEP="cygwin";;
21244
1289a0559e5a sys.platform on Mac OS X is now "darwin", without any version number appended.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21200
diff changeset
298 darwin*) MACHDEP="darwin";;
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
299 atheos*) MACHDEP="atheos";;
29838
fe79a5ab392b Treat irix64 like irix. Fixes #764560. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29804
diff changeset
300 irix646) MACHDEP="irix6";;
6341
1ed914f8bf0a Remove plat- prefix from MACHDEP macro;
Guido van Rossum <guido@python.org>
parents: 6263
diff changeset
301 '') MACHDEP="unknown";;
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
302 esac
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
303 fi
26888
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
304
26146
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
305 # Some systems cannot stand _XOPEN_SOURCE being defined at all; they
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
306 # disable features if it is defined, without any means to access these
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
307 # features as extensions. For these systems, we skip the definition of
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
308 # _XOPEN_SOURCE. Before adding a system to the list to gain access to
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
309 # some feature, make sure there is no alternative way to access this
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
310 # feature. Also, when using wildcards, make sure you have verified the
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
311 # need for not defining _XOPEN_SOURCE on all systems matching the
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
312 # wildcard, and that the wildcard does not include future systems
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
313 # (which may remove their limitations).
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
314 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
315 case $ac_sys_system/$ac_sys_release in
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
316 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
317 # even though select is a POSIX function. Reported by J. Ribbens.
30627
18e239f23029 Patch #814764: Undefine xopen_source on OpenBSD 3.4. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30540
diff changeset
318 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
58920
15b049fac191 Merged revisions 78202 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 58912
diff changeset
319 # In addition, Stefan Krah confirms that issue #1244610 exists through
15b049fac191 Merged revisions 78202 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 58912
diff changeset
320 # OpenBSD 4.6, but is fixed in 4.7.
71460
b24a2ccae56a Issue #12592: Make Python build on OpenBSD 5 (and future major releases).
Charles-François Natali <neologix@free.fr>
parents: 71447
diff changeset
321 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.@<:@0123456@:>@)
44386
7d2da1cd80a1 Bug #1699: Define _BSD_SOURCE only on OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents: 44338
diff changeset
322 define_xopen_source=no
7d2da1cd80a1 Bug #1699: Define _BSD_SOURCE only on OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents: 44338
diff changeset
323 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
7d2da1cd80a1 Bug #1699: Define _BSD_SOURCE only on OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents: 44338
diff changeset
324 # also defined. This can be overridden by defining _BSD_SOURCE
7d2da1cd80a1 Bug #1699: Define _BSD_SOURCE only on OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents: 44338
diff changeset
325 # As this has a different meaning on Linux, only define it on OpenBSD
7d2da1cd80a1 Bug #1699: Define _BSD_SOURCE only on OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents: 44338
diff changeset
326 AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features])
7d2da1cd80a1 Bug #1699: Define _BSD_SOURCE only on OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents: 44338
diff changeset
327 ;;
71460
b24a2ccae56a Issue #12592: Make Python build on OpenBSD 5 (and future major releases).
Charles-François Natali <neologix@free.fr>
parents: 71447
diff changeset
328 OpenBSD/*)
58912
1725fbabe73b Merged revisions 78194 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 58875
diff changeset
329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
1725fbabe73b Merged revisions 78194 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 58875
diff changeset
330 # also defined. This can be overridden by defining _BSD_SOURCE
1725fbabe73b Merged revisions 78194 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 58875
diff changeset
331 # As this has a different meaning on Linux, only define it on OpenBSD
1725fbabe73b Merged revisions 78194 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 58875
diff changeset
332 AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features])
1725fbabe73b Merged revisions 78194 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 58875
diff changeset
333 ;;
40396
20be431e7540 Disable _XOPEN_SOURCE on NetBSD 1.x.
Martin v. Löwis <martin@v.loewis.de>
parents: 40181
diff changeset
334 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
20be431e7540 Disable _XOPEN_SOURCE on NetBSD 1.x.
Martin v. Löwis <martin@v.loewis.de>
parents: 40181
diff changeset
335 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
20be431e7540 Disable _XOPEN_SOURCE on NetBSD 1.x.
Martin v. Löwis <martin@v.loewis.de>
parents: 40181
diff changeset
336 # Marc Recht
49728
dbe4b16f804b #4316: configure.in markup fix (backport from r67227).
Georg Brandl <georg@python.org>
parents: 49078
diff changeset
337 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
40396
20be431e7540 Disable _XOPEN_SOURCE on NetBSD 1.x.
Martin v. Löwis <martin@v.loewis.de>
parents: 40181
diff changeset
338 define_xopen_source=no;;
61964
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
339 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
340 # request to enable features supported by the standard as a request
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
341 # to disable features not supported by the standard. The best way
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
342 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
343 # entirely and define __EXTENSIONS__ instead.
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
344 SunOS/*)
28423
e5c008955381 Disable _XOPEN_SOURCE for Solaris 2.6. Fixes #690317.
Martin v. Löwis <martin@v.loewis.de>
parents: 28422
diff changeset
345 define_xopen_source=no;;
29072
cd48903e41be Update patch #732284: Correct versions of OpenUNIX, UnixWare, add OpenServer.
Martin v. Löwis <martin@v.loewis.de>
parents: 28983
diff changeset
346 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
cd48903e41be Update patch #732284: Correct versions of OpenUNIX, UnixWare, add OpenServer.
Martin v. Löwis <martin@v.loewis.de>
parents: 28983
diff changeset
347 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
32008
6e078f7613ad Record UnixWare 7.1.4 as broken. Fixes #929689.
Martin v. Löwis <martin@v.loewis.de>
parents: 31910
diff changeset
348 # Reconfirmed for 7.1.4 by Martin v. Loewis.
6e078f7613ad Record UnixWare 7.1.4 as broken. Fixes #929689.
Martin v. Löwis <martin@v.loewis.de>
parents: 31910
diff changeset
349 OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
29072
cd48903e41be Update patch #732284: Correct versions of OpenUNIX, UnixWare, add OpenServer.
Martin v. Löwis <martin@v.loewis.de>
parents: 28983
diff changeset
350 define_xopen_source=no;;
cd48903e41be Update patch #732284: Correct versions of OpenUNIX, UnixWare, add OpenServer.
Martin v. Löwis <martin@v.loewis.de>
parents: 28983
diff changeset
351 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
28976
4bf86518d9ae Patch #732284: Disable _XOPEN_SOURCE on UnixWare 7.
Martin v. Löwis <martin@v.loewis.de>
parents: 28975
diff changeset
352 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
29072
cd48903e41be Update patch #732284: Correct versions of OpenUNIX, UnixWare, add OpenServer.
Martin v. Löwis <martin@v.loewis.de>
parents: 28983
diff changeset
353 SCO_SV/3.2)
28976
4bf86518d9ae Patch #732284: Disable _XOPEN_SOURCE on UnixWare 7.
Martin v. Löwis <martin@v.loewis.de>
parents: 28975
diff changeset
354 define_xopen_source=no;;
49641
a529e3dc695a Merged revisions 67098 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
355 # On FreeBSD 4, the math functions C89 does not cover are never defined
a529e3dc695a Merged revisions 67098 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
356 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
a529e3dc695a Merged revisions 67098 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
357 FreeBSD/4.*)
a529e3dc695a Merged revisions 67098 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
358 define_xopen_source=no;;
a529e3dc695a Merged revisions 67098 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
359 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
a529e3dc695a Merged revisions 67098 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
360 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
a529e3dc695a Merged revisions 67098 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
361 # identifies itself as Darwin/7.*
50142
2e21cea43670 Issue #4368: Don't define _XOPEN_SOURCE on FreeBSD 4.*.
Martin v. Löwis <martin@v.loewis.de>
parents: 49728
diff changeset
362 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2e21cea43670 Issue #4368: Don't define _XOPEN_SOURCE on FreeBSD 4.*.
Martin v. Löwis <martin@v.loewis.de>
parents: 49728
diff changeset
363 # disables platform specific features beyond repair.
2e21cea43670 Issue #4368: Don't define _XOPEN_SOURCE on FreeBSD 4.*.
Martin v. Löwis <martin@v.loewis.de>
parents: 49728
diff changeset
364 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2e21cea43670 Issue #4368: Don't define _XOPEN_SOURCE on FreeBSD 4.*.
Martin v. Löwis <martin@v.loewis.de>
parents: 49728
diff changeset
365 # has no effect, don't bother defining them
49641
a529e3dc695a Merged revisions 67098 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents: 49074
diff changeset
366 Darwin/@<:@6789@:>@.*)
30644
205a293f3de0 FreeBSD 4.8 and MacOS X 10.2 have a broken ncurses.h - if you don't
Anthony Baxter <anthonybaxter@gmail.com>
parents: 30627
diff changeset
367 define_xopen_source=no;;
59479
59a1573b83ac I shall not rush commits....
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59455
diff changeset
368 Darwin/1@<:@0-9@:>@.*)
30644
205a293f3de0 FreeBSD 4.8 and MacOS X 10.2 have a broken ncurses.h - if you don't
Anthony Baxter <anthonybaxter@gmail.com>
parents: 30627
diff changeset
369 define_xopen_source=no;;
33275
a12d984bd962 Apply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick <trentm@activestate.com>
parents: 33145
diff changeset
370 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
a12d984bd962 Apply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick <trentm@activestate.com>
parents: 33145
diff changeset
371 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
a12d984bd962 Apply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick <trentm@activestate.com>
parents: 33145
diff changeset
372 # or has another value. By not (re)defining it, the defaults come in place.
30941
cb7d5e23dbc7 Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
Martin v. Löwis <martin@v.loewis.de>
parents: 30892
diff changeset
373 AIX/4)
cb7d5e23dbc7 Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
Martin v. Löwis <martin@v.loewis.de>
parents: 30892
diff changeset
374 define_xopen_source=no;;
33275
a12d984bd962 Apply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick <trentm@activestate.com>
parents: 33145
diff changeset
375 AIX/5)
a12d984bd962 Apply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick <trentm@activestate.com>
parents: 33145
diff changeset
376 if test `uname -r` -eq 1; then
a12d984bd962 Apply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick <trentm@activestate.com>
parents: 33145
diff changeset
377 define_xopen_source=no
a12d984bd962 Apply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick <trentm@activestate.com>
parents: 33145
diff changeset
378 fi
a12d984bd962 Apply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick <trentm@activestate.com>
parents: 33145
diff changeset
379 ;;
47227
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
380 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
381 # defining NI_NUMERICHOST.
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
382 QNX/6.3.2)
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
383 define_xopen_source=no
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
384 ;;
37456
2f57da921aef Revert 43615, fixing it properly through quadrigraphs.
Martin v. Löwis <martin@v.loewis.de>
parents: 37454
diff changeset
385
26146
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
386 esac
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
387
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
388 if test $define_xopen_source = yes
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
389 then
61964
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
390 AC_DEFINE(_XOPEN_SOURCE, 600,
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
391 Define to the level of X/Open that your system supports)
26152
ec3414c58872 Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE on FreeBSD 5.0. Fixes #636318.
Martin v. Löwis <martin@v.loewis.de>
parents: 26148
diff changeset
392
ec3414c58872 Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE on FreeBSD 5.0. Fixes #636318.
Martin v. Löwis <martin@v.loewis.de>
parents: 26148
diff changeset
393 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
ec3414c58872 Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE on FreeBSD 5.0. Fixes #636318.
Martin v. Löwis <martin@v.loewis.de>
parents: 26148
diff changeset
394 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
ec3414c58872 Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE on FreeBSD 5.0. Fixes #636318.
Martin v. Löwis <martin@v.loewis.de>
parents: 26148
diff changeset
395 # several APIs are not declared. Since this is also needed in some
ec3414c58872 Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE on FreeBSD 5.0. Fixes #636318.
Martin v. Löwis <martin@v.loewis.de>
parents: 26148
diff changeset
396 # cases for HP-UX, we define it globally.
61964
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
397 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
7c947768b435 Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
Martin v. Löwis <martin@v.loewis.de>
parents: 61892
diff changeset
398 Define to activate Unix95-and-earlier features)
34828
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
399
26152
ec3414c58872 Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE on FreeBSD 5.0. Fixes #636318.
Martin v. Löwis <martin@v.loewis.de>
parents: 26148
diff changeset
400 AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
34828
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
401
26146
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
402 fi
9bb4adfbfcc8 Do not define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Fixes #635034
Martin v. Löwis <martin@v.loewis.de>
parents: 26144
diff changeset
403
6470
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
404 #
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
405 # SGI compilers allow the specification of the both the ABI and the
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
406 # ISA on the command line. Depending on the values of these switches,
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
407 # different and often incompatable code will be generated.
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
408 #
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
409 # The SGI_ABI variable can be used to modify the CC and LDFLAGS and
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
410 # thus supply support for various ABI/ISA combinations. The MACHDEP
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
411 # variable is also adjusted.
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
412 #
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
413 AC_SUBST(SGI_ABI)
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
414 if test ! -z "$SGI_ABI"
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
415 then
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
416 CC="cc $SGI_ABI"
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
417 LDFLAGS="$SGI_ABI $LDFLAGS"
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
418 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
419 fi
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
420 AC_MSG_RESULT($MACHDEP)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
421
26888
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
422 # And add extra plat-mac for darwin
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
423 AC_SUBST(EXTRAPLATDIR)
28314
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
424 AC_SUBST(EXTRAMACHDEPPATH)
26888
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
425 AC_MSG_CHECKING(EXTRAPLATDIR)
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
426 if test -z "$EXTRAPLATDIR"
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
427 then
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
428 case $MACHDEP in
28314
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
429 darwin)
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
430 EXTRAPLATDIR="\$(PLATMACDIRS)"
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
431 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
432 ;;
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
433 *)
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
434 EXTRAPLATDIR=""
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
435 EXTRAMACHDEPPATH=""
9188cb8e191b Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
Jack Jansen <jack.jansen@cwi.nl>
parents: 28299
diff changeset
436 ;;
26888
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
437 esac
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
438 fi
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
439 AC_MSG_RESULT($EXTRAPLATDIR)
b9c1597d8102 Adapted for the move of Mac/Lib to Lib/plat-mac. Makefile.pre.in now
Jack Jansen <jack.jansen@cwi.nl>
parents: 26849
diff changeset
440
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
441 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
442 # it may influence the way we can build extensions, so distutils
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
443 # needs to check it
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
444 AC_SUBST(CONFIGURE_MACOSX_DEPLOYMENT_TARGET)
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
445 AC_SUBST(EXPORT_MACOSX_DEPLOYMENT_TARGET)
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
446 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
447 EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
448
46560
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
449 AC_MSG_CHECKING(machine type as reported by uname -m)
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
450 ac_sys_machine=`uname -m`
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
451 AC_MSG_RESULT($ac_sys_machine)
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
452
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
453 # checks for alternative programs
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
454
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
455 # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
456 # for debug/optimization stuff. BASECFLAGS is for flags that are required
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
457 # just to get things to compile and link. Users are free to override OPT
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
458 # when running configure or make. The build should not break if they do.
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
459 # BASECFLAGS should generally not be messed with, however.
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
460
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
461 # XXX shouldn't some/most/all of this code be merged with the stuff later
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
462 # on that fiddles with OPT and BASECFLAGS?
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
463 AC_MSG_CHECKING(for --without-gcc)
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
464 AC_ARG_WITH(gcc,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
465 AS_HELP_STRING([--without-gcc], [never use gcc]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
466 [
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
467 case $withval in
50786
2d453b221bec Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50612
diff changeset
468 no) CC=${CC:-cc}
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
469 without_gcc=yes;;
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
470 yes) CC=gcc
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
471 without_gcc=no;;
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
472 *) CC=$withval
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
473 without_gcc=$withval;;
3089
ef9ac6def71d on osf/1, never use gcc; added test for strftime()
Guido van Rossum <guido@python.org>
parents: 3007
diff changeset
474 esac], [
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
475 case $ac_sys_system in
64878
4ec121156ee9 Merged revisions 84946 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64618
diff changeset
476 AIX*) CC=${CC:-xlc_r}
16626
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
477 without_gcc=;;
9856
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
478 BeOS*)
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
479 case $BE_HOST_CPU in
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
480 ppc)
15107
d2c17adf2f0c Donn Cave <donn@oz.net>:
Fred Drake <fdrake@acm.org>
parents: 15089
diff changeset
481 CC=mwcc
9856
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
482 without_gcc=yes
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
483 BASECFLAGS="$BASECFLAGS -export pragma"
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
484 OPT="$OPT -O"
9856
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
485 LDFLAGS="$LDFLAGS -nodup"
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
486 ;;
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
487 x86)
15107
d2c17adf2f0c Donn Cave <donn@oz.net>:
Fred Drake <fdrake@acm.org>
parents: 15089
diff changeset
488 CC=gcc
9856
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
489 without_gcc=no
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
490 OPT="$OPT -O"
9856
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
491 ;;
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
492 *)
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
493 AC_MSG_ERROR([Unknown BeOS platform "$BE_HOST_CPU"])
9856
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
494 ;;
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
495 esac
16626
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
496 AR="\$(srcdir)/Modules/ar_beos"
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
497 RANLIB=:
9856
1e8ff8a8792e Chris Herborth's first pass at making config and install
Guido van Rossum <guido@python.org>
parents: 9808
diff changeset
498 ;;
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
499 *) without_gcc=no;;
3089
ef9ac6def71d on osf/1, never use gcc; added test for strftime()
Guido van Rossum <guido@python.org>
parents: 3007
diff changeset
500 esac])
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
501 AC_MSG_RESULT($without_gcc)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
502
2508
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
503 # If the user switches compilers, we can't believe the cache
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
504 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
505 then
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
506 AC_MSG_ERROR([cached CC is different -- throw away $cache_file
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
507 (it is also a good idea to do 'make clean' before compiling)])
2508
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
508 fi
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
509
61131
8fc987cac913 [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS
Marc-André Lemburg <mal@egenix.com>
parents: 61113
diff changeset
510 # If the user set CFLAGS, use this instead of the automatically
8fc987cac913 [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS
Marc-André Lemburg <mal@egenix.com>
parents: 61113
diff changeset
511 # determined setting
8fc987cac913 [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS
Marc-André Lemburg <mal@egenix.com>
parents: 61113
diff changeset
512 preset_cflags="$CFLAGS"
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
513 AC_PROG_CC
61131
8fc987cac913 [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS
Marc-André Lemburg <mal@egenix.com>
parents: 61113
diff changeset
514 if test ! -z "$preset_cflags"
8fc987cac913 [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS
Marc-André Lemburg <mal@egenix.com>
parents: 61113
diff changeset
515 then
8fc987cac913 [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS
Marc-André Lemburg <mal@egenix.com>
parents: 61113
diff changeset
516 CFLAGS=$preset_cflags
8fc987cac913 [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS
Marc-André Lemburg <mal@egenix.com>
parents: 61113
diff changeset
517 fi
19090
e411bfb9db57 Patch #433537: Cache ac_cv_bad_static_forward.
Martin v. Löwis <martin@v.loewis.de>
parents: 19067
diff changeset
518
37709
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
519 AC_SUBST(CXX)
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
520 AC_SUBST(MAINCC)
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
521 AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
522 AC_ARG_WITH(cxx_main,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
523 AS_HELP_STRING([--with-cxx-main=<compiler>],
37709
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
524 [compile main() and link python executable with C++ compiler]),
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
525 [
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
526
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
527 case $withval in
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
528 no) with_cxx_main=no
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
529 MAINCC='$(CC)';;
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
530 yes) with_cxx_main=yes
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
531 MAINCC='$(CXX)';;
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
532 *) with_cxx_main=yes
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
533 MAINCC=$withval
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
534 if test -z "$CXX"
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
535 then
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
536 CXX=$withval
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
537 fi;;
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
538 esac], [
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
539 with_cxx_main=no
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
540 MAINCC='$(CC)'
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
541 ])
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
542 AC_MSG_RESULT($with_cxx_main)
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
543
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
544 preset_cxx="$CXX"
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
545 if test -z "$CXX"
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
546 then
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
547 case "$CC" in
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
548 gcc) AC_PATH_PROG(CXX, [g++], [g++], [notfound]) ;;
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
549 cc) AC_PATH_PROG(CXX, [c++], [c++], [notfound]) ;;
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
550 esac
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
551 if test "$CXX" = "notfound"
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
552 then
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
553 CXX=""
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
554 fi
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
555 fi
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
556 if test -z "$CXX"
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
557 then
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
558 AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
559 if test "$CXX" = "notfound"
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
560 then
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
561 CXX=""
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
562 fi
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
563 fi
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
564 if test "$preset_cxx" != "$CXX"
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
565 then
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
566 AC_MSG_WARN([
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
567
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
568 By default, distutils will build C++ extension modules with "$CXX".
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
569 If this is not intended, then set CXX on the configure command line.
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
570 ])
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
571 fi
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
572
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
573
19090
e411bfb9db57 Patch #433537: Cache ac_cv_bad_static_forward.
Martin v. Löwis <martin@v.loewis.de>
parents: 19067
diff changeset
574 # checks for UNIX variants that set C preprocessor variables
61401
4a940d99ec84 configure.in: s/AC_AIX/AC_USE_SYSTEM_EXTENSIONS/
Matthias Klose <doko@ubuntu.com>
parents: 61400
diff changeset
575 AC_USE_SYSTEM_EXTENSIONS
19090
e411bfb9db57 Patch #433537: Cache ac_cv_bad_static_forward.
Martin v. Löwis <martin@v.loewis.de>
parents: 19067
diff changeset
576
26499
76f79bb36fc7 Add compile-time errors for unsupported systems.
Martin v. Löwis <martin@v.loewis.de>
parents: 26364
diff changeset
577 # Check for unsupported systems
76f79bb36fc7 Add compile-time errors for unsupported systems.
Martin v. Löwis <martin@v.loewis.de>
parents: 26364
diff changeset
578 case $ac_sys_system/$ac_sys_release in
41934
f9f6000327e2 Have configure raise an error when building on AtheOS. Code specific to AtheOS
Brett Cannon <bcannon@gmail.com>
parents: 41121
diff changeset
579 atheos*|Linux*/1*)
26499
76f79bb36fc7 Add compile-time errors for unsupported systems.
Martin v. Löwis <martin@v.loewis.de>
parents: 26364
diff changeset
580 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
76f79bb36fc7 Add compile-time errors for unsupported systems.
Martin v. Löwis <martin@v.loewis.de>
parents: 26364
diff changeset
581 echo See README for details.
76f79bb36fc7 Add compile-time errors for unsupported systems.
Martin v. Löwis <martin@v.loewis.de>
parents: 26364
diff changeset
582 exit 1;;
76f79bb36fc7 Add compile-time errors for unsupported systems.
Martin v. Löwis <martin@v.loewis.de>
parents: 26364
diff changeset
583 esac
76f79bb36fc7 Add compile-time errors for unsupported systems.
Martin v. Löwis <martin@v.loewis.de>
parents: 26364
diff changeset
584
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
585 AC_EXEEXT
16296
ab99bd39470c Restore --with-suffix option. AC_EXEEXT doesn't aways do what the user wants
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16290
diff changeset
586 AC_MSG_CHECKING(for --with-suffix)
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
587 AC_ARG_WITH(suffix,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
588 AS_HELP_STRING([--with-suffix=.exe], [set executable suffix]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
589 [
16296
ab99bd39470c Restore --with-suffix option. AC_EXEEXT doesn't aways do what the user wants
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16290
diff changeset
590 case $withval in
ab99bd39470c Restore --with-suffix option. AC_EXEEXT doesn't aways do what the user wants
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16290
diff changeset
591 no) EXEEXT=;;
ab99bd39470c Restore --with-suffix option. AC_EXEEXT doesn't aways do what the user wants
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16290
diff changeset
592 yes) EXEEXT=.exe;;
ab99bd39470c Restore --with-suffix option. AC_EXEEXT doesn't aways do what the user wants
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16290
diff changeset
593 *) EXEEXT=$withval;;
ab99bd39470c Restore --with-suffix option. AC_EXEEXT doesn't aways do what the user wants
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16290
diff changeset
594 esac])
ab99bd39470c Restore --with-suffix option. AC_EXEEXT doesn't aways do what the user wants
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16290
diff changeset
595 AC_MSG_RESULT($EXEEXT)
21272
d64dfbdc5f8c Test wether we are building on a case-insensitive filesystem (such
Jack Jansen <jack.jansen@cwi.nl>
parents: 21244
diff changeset
596
19067
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
597 # Test whether we're running on a non-case-sensitive system, in which
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
598 # case we give a warning if no ext is given
21272
d64dfbdc5f8c Test wether we are building on a case-insensitive filesystem (such
Jack Jansen <jack.jansen@cwi.nl>
parents: 21244
diff changeset
599 AC_SUBST(BUILDEXEEXT)
d64dfbdc5f8c Test wether we are building on a case-insensitive filesystem (such
Jack Jansen <jack.jansen@cwi.nl>
parents: 21244
diff changeset
600 AC_MSG_CHECKING(for case-insensitive build directory)
26073
7fa93b5ddfbd Fix for bug 631247: configure should test the build directory for
Jack Jansen <jack.jansen@cwi.nl>
parents: 25990
diff changeset
601 if test ! -d CaseSensitiveTestDir; then
7fa93b5ddfbd Fix for bug 631247: configure should test the build directory for
Jack Jansen <jack.jansen@cwi.nl>
parents: 25990
diff changeset
602 mkdir CaseSensitiveTestDir
7fa93b5ddfbd Fix for bug 631247: configure should test the build directory for
Jack Jansen <jack.jansen@cwi.nl>
parents: 25990
diff changeset
603 fi
7fa93b5ddfbd Fix for bug 631247: configure should test the build directory for
Jack Jansen <jack.jansen@cwi.nl>
parents: 25990
diff changeset
604
7fa93b5ddfbd Fix for bug 631247: configure should test the build directory for
Jack Jansen <jack.jansen@cwi.nl>
parents: 25990
diff changeset
605 if test -d casesensitivetestdir
19067
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
606 then
21272
d64dfbdc5f8c Test wether we are building on a case-insensitive filesystem (such
Jack Jansen <jack.jansen@cwi.nl>
parents: 21244
diff changeset
607 AC_MSG_RESULT(yes)
d64dfbdc5f8c Test wether we are building on a case-insensitive filesystem (such
Jack Jansen <jack.jansen@cwi.nl>
parents: 21244
diff changeset
608 BUILDEXEEXT=.exe
d64dfbdc5f8c Test wether we are building on a case-insensitive filesystem (such
Jack Jansen <jack.jansen@cwi.nl>
parents: 21244
diff changeset
609 else
d64dfbdc5f8c Test wether we are building on a case-insensitive filesystem (such
Jack Jansen <jack.jansen@cwi.nl>
parents: 21244
diff changeset
610 AC_MSG_RESULT(no)
21275
b01323bfcf6c Silly mistake in build directory extension fix.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21272
diff changeset
611 BUILDEXEEXT=$EXEEXT
19067
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
612 fi
26073
7fa93b5ddfbd Fix for bug 631247: configure should test the build directory for
Jack Jansen <jack.jansen@cwi.nl>
parents: 25990
diff changeset
613 rmdir CaseSensitiveTestDir
5952
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
614
9296
d64b4cc81ba6 Add test for BSDI -- by Nigel Head and otto@mail.olympus.net.
Guido van Rossum <guido@python.org>
parents: 9218
diff changeset
615 case $MACHDEP in
d64b4cc81ba6 Add test for BSDI -- by Nigel Head and otto@mail.olympus.net.
Guido van Rossum <guido@python.org>
parents: 9218
diff changeset
616 bsdos*)
d64b4cc81ba6 Add test for BSDI -- by Nigel Head and otto@mail.olympus.net.
Guido van Rossum <guido@python.org>
parents: 9218
diff changeset
617 case $CC in
d64b4cc81ba6 Add test for BSDI -- by Nigel Head and otto@mail.olympus.net.
Guido van Rossum <guido@python.org>
parents: 9218
diff changeset
618 gcc) CC="$CC -D_HAVE_BSDI";;
d64b4cc81ba6 Add test for BSDI -- by Nigel Head and otto@mail.olympus.net.
Guido van Rossum <guido@python.org>
parents: 9218
diff changeset
619 esac;;
d64b4cc81ba6 Add test for BSDI -- by Nigel Head and otto@mail.olympus.net.
Guido van Rossum <guido@python.org>
parents: 9218
diff changeset
620 esac
d64b4cc81ba6 Add test for BSDI -- by Nigel Head and otto@mail.olympus.net.
Guido van Rossum <guido@python.org>
parents: 9218
diff changeset
621
6123
748fb5a009a7 Richard Jones: I think we can be confident in using 'CC="-Aa
Guido van Rossum <guido@python.org>
parents: 6098
diff changeset
622 case $ac_sys_system in
748fb5a009a7 Richard Jones: I think we can be confident in using 'CC="-Aa
Guido van Rossum <guido@python.org>
parents: 6098
diff changeset
623 hp*|HP*)
748fb5a009a7 Richard Jones: I think we can be confident in using 'CC="-Aa
Guido van Rossum <guido@python.org>
parents: 6098
diff changeset
624 case $CC in
14763
d27058404981 Change HP=UX compiler options from -Aa to -Ae, which implies
Guido van Rossum <guido@python.org>
parents: 14760
diff changeset
625 cc|*/cc) CC="$CC -Ae";;
6123
748fb5a009a7 Richard Jones: I think we can be confident in using 'CC="-Aa
Guido van Rossum <guido@python.org>
parents: 6098
diff changeset
626 esac;;
16995
9104ed38ac05 Define __EXTENSIONS__ on Solaris. Fixes posixmodule error in bug #232787.
Martin v. Löwis <martin@v.loewis.de>
parents: 16985
diff changeset
627 SunOS*)
9104ed38ac05 Define __EXTENSIONS__ on Solaris. Fixes posixmodule error in bug #232787.
Martin v. Löwis <martin@v.loewis.de>
parents: 16985
diff changeset
628 # Some functions have a prototype only with that define, e.g. confstr
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
629 AC_DEFINE(__EXTENSIONS__, 1, [Defined on Solaris to see additional function prototypes.])
16995
9104ed38ac05 Define __EXTENSIONS__ on Solaris. Fixes posixmodule error in bug #232787.
Martin v. Löwis <martin@v.loewis.de>
parents: 16985
diff changeset
630 ;;
6123
748fb5a009a7 Richard Jones: I think we can be confident in using 'CC="-Aa
Guido van Rossum <guido@python.org>
parents: 6098
diff changeset
631 esac
748fb5a009a7 Richard Jones: I think we can be confident in using 'CC="-Aa
Guido van Rossum <guido@python.org>
parents: 6098
diff changeset
632
16995
9104ed38ac05 Define __EXTENSIONS__ on Solaris. Fixes posixmodule error in bug #232787.
Martin v. Löwis <martin@v.loewis.de>
parents: 16985
diff changeset
633
16276
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
634 AC_SUBST(LIBRARY)
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
635 AC_MSG_CHECKING(LIBRARY)
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
636 if test -z "$LIBRARY"
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
637 then
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
638 LIBRARY='libpython$(VERSION).a'
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
639 fi
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
640 AC_MSG_RESULT($LIBRARY)
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
641
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
642 # LDLIBRARY is the name of the library to link against (as opposed to the
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
643 # name of the library into which to insert object files). BLDLIBRARY is also
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
644 # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
645 # is blank as the main program is not linked directly against LDLIBRARY.
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
646 # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
647 # systems without shared libraries, LDLIBRARY is the same as LIBRARY
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
648 # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
649 # DLLLIBRARY is the shared (i.e., DLL) library.
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
650 #
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
651 # RUNSHARED is used to run shared python without installed libraries
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
652 #
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
653 # INSTSONAME is the name of the shared library that will be use to install
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
654 # on the system - some systems like version suffix, others don't
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
655 AC_SUBST(LDLIBRARY)
16142
49f94a2b1dd4 Fix some make errors during "make clobber" or "make distclean", caused
Guido van Rossum <guido@python.org>
parents: 15968
diff changeset
656 AC_SUBST(DLLLIBRARY)
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
657 AC_SUBST(BLDLIBRARY)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
658 AC_SUBST(LDLIBRARYDIR)
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
659 AC_SUBST(INSTSONAME)
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
660 AC_SUBST(RUNSHARED)
16276
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
661 LDLIBRARY="$LIBRARY"
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
662 BLDLIBRARY='$(LDLIBRARY)'
23399
a868baebe956 Patch #553403: Fix typo.
Martin v. Löwis <martin@v.loewis.de>
parents: 23376
diff changeset
663 INSTSONAME='$(LDLIBRARY)'
16142
49f94a2b1dd4 Fix some make errors during "make clobber" or "make distclean", caused
Guido van Rossum <guido@python.org>
parents: 15968
diff changeset
664 DLLLIBRARY=''
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
665 LDLIBRARYDIR=''
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
666 RUNSHARED=''
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
667
5952
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
668 # LINKCC is the command that links the python executable -- default is $(CC).
20515
06f1254d2280 Use CXX in LINKCC if CXX is used to build main() and the system requires
Martin v. Löwis <martin@v.loewis.de>
parents: 20508
diff changeset
669 # If CXX is set, and if it is needed to link a main function that was
06f1254d2280 Use CXX in LINKCC if CXX is used to build main() and the system requires
Martin v. Löwis <martin@v.loewis.de>
parents: 20508
diff changeset
670 # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
06f1254d2280 Use CXX in LINKCC if CXX is used to build main() and the system requires
Martin v. Löwis <martin@v.loewis.de>
parents: 20508
diff changeset
671 # python might then depend on the C++ runtime
15107
d2c17adf2f0c Donn Cave <donn@oz.net>:
Fred Drake <fdrake@acm.org>
parents: 15089
diff changeset
672 # This is altered for AIX in order to build the export list before
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
673 # linking.
5952
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
674 AC_SUBST(LINKCC)
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
675 AC_MSG_CHECKING(LINKCC)
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
676 if test -z "$LINKCC"
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
677 then
37709
37a8eb74c504 Patch #1324762: Change --with-cxx to --with-cxx-main.
Martin v. Löwis <martin@v.loewis.de>
parents: 37653
diff changeset
678 LINKCC='$(PURIFY) $(MAINCC)'
5952
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
679 case $ac_sys_system in
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
680 AIX*)
28473
0f558eede6c5 SF patch #712367, get build working on AIX
Neal Norwitz <nnorwitz@gmail.com>
parents: 28454
diff changeset
681 exp_extra="\"\""
0f558eede6c5 SF patch #712367, get build working on AIX
Neal Norwitz <nnorwitz@gmail.com>
parents: 28454
diff changeset
682 if test $ac_sys_release -ge 5 -o \
0f558eede6c5 SF patch #712367, get build working on AIX
Neal Norwitz <nnorwitz@gmail.com>
parents: 28454
diff changeset
683 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
0f558eede6c5 SF patch #712367, get build working on AIX
Neal Norwitz <nnorwitz@gmail.com>
parents: 28454
diff changeset
684 exp_extra="."
0f558eede6c5 SF patch #712367, get build working on AIX
Neal Norwitz <nnorwitz@gmail.com>
parents: 28454
diff changeset
685 fi
0f558eede6c5 SF patch #712367, get build working on AIX
Neal Norwitz <nnorwitz@gmail.com>
parents: 28454
diff changeset
686 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
47227
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
687 QNX*)
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
688 # qcc must be used because the other compilers do not
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
689 # support -N.
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
690 LINKCC=qcc;;
5952
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
691 esac
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
692 fi
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
693 AC_MSG_RESULT($LINKCC)
b2e018fb2ba9 New version of Vladimir Marangozov's AIX hacks -- simpler etc.
Guido van Rossum <guido@python.org>
parents: 5950
diff changeset
694
53937
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
695 # GNULD is set to "yes" if the GNU linker is used. If this goes wrong
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
696 # make sure we default having it set to "no": this is used by
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
697 # distutils.unixccompiler to know if it should add --enable-new-dtags
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
698 # to linker command lines, and failing to detect GNU ld simply results
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
699 # in the same bahaviour as before.
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
700 AC_SUBST(GNULD)
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
701 AC_MSG_CHECKING(for GNU ld)
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
702 ac_prog=ld
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
703 if test "$GCC" = yes; then
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
704 ac_prog=`$CC -print-prog-name=ld`
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
705 fi
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
706 case `"$ac_prog" -V 2>&1 < /dev/null` in
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
707 *GNU*)
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
708 GNULD=yes;;
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
709 *)
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
710 GNULD=no;;
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
711 esac
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
712 AC_MSG_RESULT($GNULD)
ccfda14d1554 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53888
diff changeset
713
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
714 AC_MSG_CHECKING(for --enable-shared)
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
715 AC_ARG_ENABLE(shared,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
716 AS_HELP_STRING([--enable-shared], [disable/enable building shared python library]))
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
717
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
718 if test -z "$enable_shared"
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
719 then
23376
cbbe289e7c2e Patch #551093: Let cygwin default to --enable-shared.
Martin v. Löwis <martin@v.loewis.de>
parents: 23193
diff changeset
720 case $ac_sys_system in
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
721 CYGWIN* | atheos*)
23376
cbbe289e7c2e Patch #551093: Let cygwin default to --enable-shared.
Martin v. Löwis <martin@v.loewis.de>
parents: 23193
diff changeset
722 enable_shared="yes";;
cbbe289e7c2e Patch #551093: Let cygwin default to --enable-shared.
Martin v. Löwis <martin@v.loewis.de>
parents: 23193
diff changeset
723 *)
cbbe289e7c2e Patch #551093: Let cygwin default to --enable-shared.
Martin v. Löwis <martin@v.loewis.de>
parents: 23193
diff changeset
724 enable_shared="no";;
cbbe289e7c2e Patch #551093: Let cygwin default to --enable-shared.
Martin v. Löwis <martin@v.loewis.de>
parents: 23193
diff changeset
725 esac
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
726 fi
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
727 AC_MSG_RESULT($enable_shared)
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
728
32370
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
729 AC_MSG_CHECKING(for --enable-profiling)
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
730 AC_ARG_ENABLE(profiling,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
731 AS_HELP_STRING([--enable-profiling], [enable C-level code profiling]),
32370
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
732 [ac_save_cc="$CC"
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
733 CC="$CC -pg"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
734 AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
735 [ac_enable_profiling="yes"],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
736 [ac_enable_profiling="no"],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
737 [ac_enable_profiling="no"])
32370
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
738 CC="$ac_save_cc"])
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
739 AC_MSG_RESULT($ac_enable_profiling)
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
740
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
741 case "$ac_enable_profiling" in
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
742 "yes")
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
743 BASECFLAGS="-pg $BASECFLAGS"
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
744 LDFLAGS="-pg $LDFLAGS"
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
745 ;;
963d23557020 allow developers to more easily build a profiling version of the interpreter
Skip Montanaro <skip@pobox.com>
parents: 32301
diff changeset
746 esac
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
747
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
748 AC_MSG_CHECKING(LDLIBRARY)
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
749
19732
b7dc5159448f Changes to automatically enable large file support on some systems.
Guido van Rossum <guido@python.org>
parents: 19728
diff changeset
750 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
b7dc5159448f Changes to automatically enable large file support on some systems.
Guido van Rossum <guido@python.org>
parents: 19728
diff changeset
751 # library that we build, but we do not want to link against it (we
b7dc5159448f Changes to automatically enable large file support on some systems.
Guido van Rossum <guido@python.org>
parents: 19728
diff changeset
752 # will find it with a -framework option). For this reason there is an
b7dc5159448f Changes to automatically enable large file support on some systems.
Guido van Rossum <guido@python.org>
parents: 19728
diff changeset
753 # extra variable BLDLIBRARY against which Python and the extension
b7dc5159448f Changes to automatically enable large file support on some systems.
Guido van Rossum <guido@python.org>
parents: 19728
diff changeset
754 # modules are linked, BLDLIBRARY. This is normally the same as
b7dc5159448f Changes to automatically enable large file support on some systems.
Guido van Rossum <guido@python.org>
parents: 19728
diff changeset
755 # LDLIBRARY, but empty for MacOSX framework builds.
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
756 if test "$enable_framework"
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
757 then
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
758 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
29759
4ec880c53e2a Fixed two bugs in MacOSX framework handling spotted by Edward Moy:
Jack Jansen <jack.jansen@cwi.nl>
parents: 29737
diff changeset
759 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
760 BLDLIBRARY=''
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
761 else
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
762 BLDLIBRARY='$(LDLIBRARY)'
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
763 fi
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
764
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
765 # Other platforms follow
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
766 if test $enable_shared = "yes"; then
24315
a8df0c0be242 Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.
Mark Hammond <mhammond@skippinet.com.au>
parents: 24314
diff changeset
767 AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.])
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
768 case $ac_sys_system in
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
769 BeOS*)
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
770 LDLIBRARY='libpython$(VERSION).so'
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
771 ;;
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
772 CYGWIN*)
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
773 LDLIBRARY='libpython$(VERSION).dll.a'
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
774 DLLLIBRARY='libpython$(VERSION).dll'
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
775 ;;
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
776 SunOS*)
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
777 LDLIBRARY='libpython$(VERSION).so'
29469
0cf1ec58e220 Use -R instead of -rpath on Solaris. Fixes #749911.
Martin v. Löwis <martin@v.loewis.de>
parents: 29466
diff changeset
778 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
30106
265079883668 Patch #771998: Put braces around variables. Will backport to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30024
diff changeset
779 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
30828
e59ab708bbb0 Patch #833710: Set INSTSONAME on Solaris. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30644
diff changeset
780 INSTSONAME="$LDLIBRARY".$SOVERSION
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
781 ;;
71493
33be4896003a Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling.
Charles-François Natali <neologix@free.fr>
parents: 71460
diff changeset
782 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
783 LDLIBRARY='libpython$(VERSION).so'
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
784 BLDLIBRARY='-L. -lpython$(VERSION)'
30106
265079883668 Patch #771998: Put braces around variables. Will backport to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30024
diff changeset
785 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
33840
6fc10306bf31 Patch #1044395: Allow configure option --enable-shared in FreeBSD.
Hye-Shik Chang <hyeshik@gmail.com>
parents: 33749
diff changeset
786 case $ac_sys_system in
6fc10306bf31 Patch #1044395: Allow configure option --enable-shared in FreeBSD.
Hye-Shik Chang <hyeshik@gmail.com>
parents: 33749
diff changeset
787 FreeBSD*)
6fc10306bf31 Patch #1044395: Allow configure option --enable-shared in FreeBSD.
Hye-Shik Chang <hyeshik@gmail.com>
parents: 33749
diff changeset
788 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
6fc10306bf31 Patch #1044395: Allow configure option --enable-shared in FreeBSD.
Hye-Shik Chang <hyeshik@gmail.com>
parents: 33749
diff changeset
789 ;;
6fc10306bf31 Patch #1044395: Allow configure option --enable-shared in FreeBSD.
Hye-Shik Chang <hyeshik@gmail.com>
parents: 33749
diff changeset
790 esac
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
791 INSTSONAME="$LDLIBRARY".$SOVERSION
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
792 ;;
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
793 hp*|HP*)
38219
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
794 case `uname -m` in
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
795 ia64)
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
796 LDLIBRARY='libpython$(VERSION).so'
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
797 ;;
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
798 *)
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
799 LDLIBRARY='libpython$(VERSION).sl'
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
800 ;;
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
801 esac
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
802 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
30106
265079883668 Patch #771998: Put braces around variables. Will backport to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30024
diff changeset
803 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
804 ;;
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
805 OSF*)
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
806 LDLIBRARY='libpython$(VERSION).so'
36253
27bdc1e27eed Fix bugs #1244610, #1392915, fix build problem on OpenBSD 3.7 and 3.8.
Neal Norwitz <nnorwitz@gmail.com>
parents: 36245
diff changeset
807 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
30106
265079883668 Patch #771998: Put braces around variables. Will backport to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30024
diff changeset
808 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
809 ;;
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
810 atheos*)
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
811 LDLIBRARY='libpython$(VERSION).so'
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
812 BLDLIBRARY='-L. -lpython$(VERSION)'
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
813 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
814 ;;
50436
cb3479ca81ac Backport of r68146
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 50004
diff changeset
815 Darwin*)
cb3479ca81ac Backport of r68146
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 50004
diff changeset
816 LDLIBRARY='libpython$(VERSION).dylib'
cb3479ca81ac Backport of r68146
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 50004
diff changeset
817 BLDLIBRARY='-L. -lpython$(VERSION)'
cb3479ca81ac Backport of r68146
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 50004
diff changeset
818 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
cb3479ca81ac Backport of r68146
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 50004
diff changeset
819 ;;
64618
e27030e0cced Merged revisions 84680 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64611
diff changeset
820 AIX*)
e27030e0cced Merged revisions 84680 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64611
diff changeset
821 LDLIBRARY='libpython$(VERSION).so'
e27030e0cced Merged revisions 84680 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64611
diff changeset
822 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
e27030e0cced Merged revisions 84680 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64611
diff changeset
823 ;;
50436
cb3479ca81ac Backport of r68146
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 50004
diff changeset
824
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
825 esac
30310
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
826 else # shared is disabled
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
827 case $ac_sys_system in
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
828 CYGWIN*)
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
829 BLDLIBRARY='$(LIBRARY)'
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
830 LDLIBRARY='libpython$(VERSION).dll.a'
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
831 ;;
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
832 esac
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
833 fi
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
834
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
835 AC_MSG_RESULT($LDLIBRARY)
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
836
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
837 AC_PROG_RANLIB
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
838 AC_SUBST(AR)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
839 AC_CHECK_PROGS(AR, ar aal, ar)
17269
093e9a24ee76 "install -d" does not work on BSDI systems even though autoconf thinks
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17122
diff changeset
840
53888
9143d20d8b26 Fixed #5941: added ARFLAGS for the archiver command.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53606
diff changeset
841 # tweak ARFLAGS only if the user didn't set it on the command line
9143d20d8b26 Fixed #5941: added ARFLAGS for the archiver command.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53606
diff changeset
842 AC_SUBST(ARFLAGS)
9143d20d8b26 Fixed #5941: added ARFLAGS for the archiver command.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53606
diff changeset
843 if test -z "$ARFLAGS"
9143d20d8b26 Fixed #5941: added ARFLAGS for the archiver command.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53606
diff changeset
844 then
9143d20d8b26 Fixed #5941: added ARFLAGS for the archiver command.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53606
diff changeset
845 ARFLAGS="rc"
9143d20d8b26 Fixed #5941: added ARFLAGS for the archiver command.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53606
diff changeset
846 fi
9143d20d8b26 Fixed #5941: added ARFLAGS for the archiver command.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 53606
diff changeset
847
36203
44cfca6136c6 Stop maintaining the buildno file.
Martin v. Löwis <martin@v.loewis.de>
parents: 36158
diff changeset
848 AC_SUBST(SVNVERSION)
37444
1049e9aeb385 Set "not found" value for svnversion to not-found. Fixes #1463559.
Martin v. Löwis <martin@v.loewis.de>
parents: 37384
diff changeset
849 AC_CHECK_PROG(SVNVERSION, svnversion, found, not-found)
36204
032924e75c24 Always set SVNVERSION to "exported" if it otherwise fails.
Martin v. Löwis <martin@v.loewis.de>
parents: 36203
diff changeset
850 if test $SVNVERSION = found
032924e75c24 Always set SVNVERSION to "exported" if it otherwise fails.
Martin v. Löwis <martin@v.loewis.de>
parents: 36203
diff changeset
851 then
032924e75c24 Always set SVNVERSION to "exported" if it otherwise fails.
Martin v. Löwis <martin@v.loewis.de>
parents: 36203
diff changeset
852 SVNVERSION="svnversion \$(srcdir)"
032924e75c24 Always set SVNVERSION to "exported" if it otherwise fails.
Martin v. Löwis <martin@v.loewis.de>
parents: 36203
diff changeset
853 else
54291
e17c18a6caec Merged revisions 72871-72872 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 53732
diff changeset
854 SVNVERSION="echo Unversioned directory"
36204
032924e75c24 Always set SVNVERSION to "exported" if it otherwise fails.
Martin v. Löwis <martin@v.loewis.de>
parents: 36203
diff changeset
855 fi
36203
44cfca6136c6 Stop maintaining the buildno file.
Martin v. Löwis <martin@v.loewis.de>
parents: 36158
diff changeset
856
68281
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
857 AC_SUBST(HGVERSION)
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
858 AC_SUBST(HGTAG)
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
859 AC_SUBST(HGBRANCH)
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
860 AC_CHECK_PROG(HAS_HG, hg, found, not-found)
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
861 if test $HAS_HG = found
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
862 then
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
863 HGVERSION="hg id -i \$(srcdir)"
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
864 HGTAG="hg id -t \$(srcdir)"
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
865 HGBRANCH="hg id -b \$(srcdir)"
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
866 else
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
867 HGVERSION=""
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
868 HGTAG=""
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
869 HGBRANCH=""
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
870 fi
ce93b75add15 Port build identification from default branch.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
871
17269
093e9a24ee76 "install -d" does not work on BSDI systems even though autoconf thinks
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17122
diff changeset
872 case $MACHDEP in
20596
ca5f2ff83979 install on HP-UX does not support the -d option. Using the install-sh instead.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 20581
diff changeset
873 bsdos*|hp*|HP*)
ca5f2ff83979 install on HP-UX does not support the -d option. Using the install-sh instead.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 20581
diff changeset
874 # install -d does not work on BSDI or HP-UX
17269
093e9a24ee76 "install -d" does not work on BSDI systems even though autoconf thinks
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17122
diff changeset
875 if test -z "$INSTALL"
093e9a24ee76 "install -d" does not work on BSDI systems even though autoconf thinks
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17122
diff changeset
876 then
093e9a24ee76 "install -d" does not work on BSDI systems even though autoconf thinks
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17122
diff changeset
877 INSTALL="${srcdir}/install-sh -c"
093e9a24ee76 "install -d" does not work on BSDI systems even though autoconf thinks
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17122
diff changeset
878 fi
093e9a24ee76 "install -d" does not work on BSDI systems even though autoconf thinks
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17122
diff changeset
879 esac
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
880 AC_PROG_INSTALL
78812
2dde5a7439fd Issue #15819: Fix out-of-tree builds from a readonly source.
Trent Nelson <trent@trent.me>
parents: 77072
diff changeset
881 AC_PROG_MKDIR_P
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
882
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
883 # Not every filesystem supports hard links
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
884 AC_SUBST(LN)
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
885 if test -z "$LN" ; then
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
886 case $ac_sys_system in
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
887 BeOS*) LN="ln -s";;
15804
37819a777fc0 Part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15802
diff changeset
888 CYGWIN*) LN="ln -s";;
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
889 atheos*) LN="ln -s";;
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
890 *) LN=ln;;
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
891 esac
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
892 fi
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
893
18467
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
894 # Check for --with-pydebug
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
895 AC_MSG_CHECKING(for --with-pydebug)
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
896 AC_ARG_WITH(pydebug,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
897 AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
898 [
18467
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
899 if test "$withval" != no
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
900 then
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
901 AC_DEFINE(Py_DEBUG, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
902 [Define if you want to build an interpreter with many run-time checks.])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
903 AC_MSG_RESULT(yes);
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
904 Py_DEBUG='true'
18467
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
905 else AC_MSG_RESULT(no); Py_DEBUG='false'
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
906 fi],
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
907 [AC_MSG_RESULT(no)])
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
908
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
909 # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
910 # merged with this chunk of code?
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
911
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
912 # Optimizer/debugger flags
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
913 # ------------------------
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
914 # (The following bit of code is complicated enough - please keep things
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
915 # indented properly. Just pretend you're editing Python code. ;-)
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
916
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
917 # There are two parallel sets of case statements below, one that checks to
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
918 # see if OPT was set and one that does BASECFLAGS setting based upon
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
919 # compiler and platform. BASECFLAGS tweaks need to be made even if the
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
920 # user set OPT.
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
921
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
922 # tweak OPT based on compiler and platform, only if the user didn't set
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
923 # it on the command line
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
924 AC_SUBST(OPT)
59964
d60bfb1b9c05 Merged revisions 79351 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 59494
diff changeset
925 if test "${OPT-unset}" = "unset"
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
926 then
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
927 case $GCC in
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
928 yes)
37653
12567189ef25 If compiling with g++ don't use -Wstrict-prototpes.
Skip Montanaro <skip@pobox.com>
parents: 37605
diff changeset
929 if test "$CC" != 'g++' ; then
12567189ef25 If compiling with g++ don't use -Wstrict-prototpes.
Skip Montanaro <skip@pobox.com>
parents: 37605
diff changeset
930 STRICT_PROTO="-Wstrict-prototypes"
12567189ef25 If compiling with g++ don't use -Wstrict-prototpes.
Skip Montanaro <skip@pobox.com>
parents: 37605
diff changeset
931 fi
44286
d8e06543cdd8 Bug #1608: use -fwrapv when GCC supports it. This is important, newer
Guido van Rossum <guido@python.org>
parents: 44188
diff changeset
932 # For gcc 4.x we need to use -fwrapv so lets check if its supported
d8e06543cdd8 Bug #1608: use -fwrapv when GCC supports it. This is important, newer
Guido van Rossum <guido@python.org>
parents: 44188
diff changeset
933 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
d8e06543cdd8 Bug #1608: use -fwrapv when GCC supports it. This is important, newer
Guido van Rossum <guido@python.org>
parents: 44188
diff changeset
934 WRAP="-fwrapv"
d8e06543cdd8 Bug #1608: use -fwrapv when GCC supports it. This is important, newer
Guido van Rossum <guido@python.org>
parents: 44188
diff changeset
935 fi
72379
feed6d2097b1 Backport fix for issue #11149.
Stefan Krah <skrah@bytereef.org>
parents: 71979
diff changeset
936
feed6d2097b1 Backport fix for issue #11149.
Stefan Krah <skrah@bytereef.org>
parents: 71979
diff changeset
937 # Clang also needs -fwrapv
73892
9d329adbbb01 Backport second fix for issue #11149.
Stefan Krah <skrah@bytereef.org>
parents: 73770
diff changeset
938 case $CC in
9d329adbbb01 Backport second fix for issue #11149.
Stefan Krah <skrah@bytereef.org>
parents: 73770
diff changeset
939 *clang*) WRAP="-fwrapv"
9d329adbbb01 Backport second fix for issue #11149.
Stefan Krah <skrah@bytereef.org>
parents: 73770
diff changeset
940 ;;
9d329adbbb01 Backport second fix for issue #11149.
Stefan Krah <skrah@bytereef.org>
parents: 73770
diff changeset
941 esac
72379
feed6d2097b1 Backport fix for issue #11149.
Stefan Krah <skrah@bytereef.org>
parents: 71979
diff changeset
942
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
943 case $ac_cv_prog_cc_g in
17419
3fadc37cfa92 Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents: 17269
diff changeset
944 yes)
18467
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
945 if test "$Py_DEBUG" = 'true' ; then
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
946 # Optimization messes up debuggers, so turn it off for
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
947 # debug builds.
61286
9bea37a85088 Issue #8625: Turn off gcc optimization in debug builds.
Mark Dickinson <dickinsm@gmail.com>
parents: 61131
diff changeset
948 OPT="-g -O0 -Wall $STRICT_PROTO"
18467
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
949 else
44286
d8e06543cdd8 Bug #1608: use -fwrapv when GCC supports it. This is important, newer
Guido van Rossum <guido@python.org>
parents: 44188
diff changeset
950 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
951 fi
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
952 ;;
17419
3fadc37cfa92 Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents: 17269
diff changeset
953 *)
37653
12567189ef25 If compiling with g++ don't use -Wstrict-prototpes.
Skip Montanaro <skip@pobox.com>
parents: 37605
diff changeset
954 OPT="-O3 -Wall $STRICT_PROTO"
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
955 ;;
18467
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
956 esac
25497
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
957 case $ac_sys_system in
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
958 SCO_SV*) OPT="$OPT -m486 -DSCO5"
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
959 ;;
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
960 esac
18467
9f74965e0f35 Check for --with-pydebug earlier, and record the result.
Fred Drake <fdrake@acm.org>
parents: 18452
diff changeset
961 ;;
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
962
17419
3fadc37cfa92 Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents: 17269
diff changeset
963 *)
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
964 OPT="-O"
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
965 ;;
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
966 esac
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
967 fi
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
968
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
969 AC_SUBST(BASECFLAGS)
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
970
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
971 # The -arch flags for universal builds on OSX
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
972 UNIVERSAL_ARCH_FLAGS=
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
973 AC_SUBST(UNIVERSAL_ARCH_FLAGS)
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
974
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
975 # tweak BASECFLAGS based on compiler and platform
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
976 case $GCC in
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
977 yes)
29774
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
978 # Python violates C99 rules, by casting between incompatible
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
979 # pointer types. GCC may generate bad code as a result of that,
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
980 # so use -fno-strict-aliasing if supported.
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
981 AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
982 ac_save_cc="$CC"
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
983 CC="$CC -fno-strict-aliasing"
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
984 AC_CACHE_VAL(ac_cv_no_strict_aliasing_ok,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
985 AC_COMPILE_IFELSE(
61503
f15d6f1a2fa3 Issue #8510: Remove nested 'main' functions (causing failure) in 3 configure tests;
Mark Dickinson <dickinsm@gmail.com>
parents: 61438
diff changeset
986 [AC_LANG_PROGRAM([[]], [[]])],
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
987 [ac_cv_no_strict_aliasing_ok=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
988 [ac_cv_no_strict_aliasing_ok=no]))
29774
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
989 CC="$ac_save_cc"
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
990 AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
991 if test $ac_cv_no_strict_aliasing_ok = yes
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
992 then
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
993 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
9396134684cf Use -fno-strict-aliasing if available. Fixes #766696. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 29764
diff changeset
994 fi
46560
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
995
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
996 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
997 # support. Without this, treatment of subnormals doesn't follow
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
998 # the standard.
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
999 case $ac_sys_machine in
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
1000 alpha*)
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
1001 BASECFLAGS="$BASECFLAGS -mieee"
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
1002 ;;
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
1003 esac
ce620cc9a6a8 Issue #1496032. Add -mieee to BASECFLAGS on alpha, when gcc is
Mark Dickinson <dickinsm@gmail.com>
parents: 46528
diff changeset
1004
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1005 case $ac_sys_system in
25497
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
1006 SCO_SV*)
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1007 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1008 ;;
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1009 # is there any other compiler on Darwin besides gcc?
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1010 Darwin*)
45787
c4402ec60c3a Allow Gnu gcc's to build python on OSX by removing -Wno-long-double,
Jeffrey Yasskin <jyasskin@gmail.com>
parents: 45655
diff changeset
1011 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
c4402ec60c3a Allow Gnu gcc's to build python on OSX by removing -Wno-long-double,
Jeffrey Yasskin <jyasskin@gmail.com>
parents: 45655
diff changeset
1012 # used to be here, but non-Apple gcc doesn't accept them.
60695
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1013 if test "${CC}" = gcc
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1014 then
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1015 AC_MSG_CHECKING(which compiler should be used)
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1016 case "${UNIVERSALSDK}" in
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1017 */MacOSX10.4u.sdk)
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1018 # Build using 10.4 SDK, force usage of gcc when the
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1019 # compiler is gcc, otherwise the user will get very
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1020 # confusing error messages when building on OSX 10.6
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1021 CC=gcc-4.0
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1022 CPP=cpp-4.0
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1023 ;;
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1024 esac
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1025 AC_MSG_RESULT($CC)
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1026 fi
bca574376127 Merged revisions 80187 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 59964
diff changeset
1027
48000
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1028 # Calculate the right deployment target for this build.
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1029 #
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1030 cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1031 if test ${cur_target} '>' 10.2; then
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1032 cur_target=10.3
55853
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1033 if test ${enable_universalsdk}; then
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1034 if test "${UNIVERSAL_ARCHS}" = "all"; then
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1035 # Ensure that the default platform for a
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1036 # 4-way universal build is OSX 10.5,
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1037 # that's the first OS release where
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1038 # 4-way builds make sense.
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1039 cur_target='10.5'
55881
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1040
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1041 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1042 cur_target='10.5'
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1043
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1044 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1045 cur_target='10.5'
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1046
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1047 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1048 cur_target='10.5'
55853
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1049 fi
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1050 else
58875
33452d95301f Merged revisions 78154 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58871
diff changeset
1051 if test `/usr/bin/arch` = "i386"; then
55853
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1052 # On Intel macs default to a deployment
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1053 # target of 10.4, that's the first OSX
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1054 # release with Intel support.
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1055 cur_target="10.4"
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1056 fi
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1057 fi
48000
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1058 fi
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1059 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1060
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1061 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1062 # environment with a value that is the same as what we'll use
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1063 # in the Makefile to ensure that we'll get the same compiler
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1064 # environment during configure and build time.
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1065 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1066 export MACOSX_DEPLOYMENT_TARGET
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1067 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
1068
58397
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1069 if test "${enable_universalsdk}"; then
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1070 UNIVERSAL_ARCH_FLAGS=""
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1071 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1072 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1073 ARCH_RUN_32BIT=""
60456
7660c53d5719 This check-in fixes two problems:
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60216
diff changeset
1074 LIPO_32BIT_FLAGS=""
58397
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1075
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1076 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1077 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1078 LIPO_32BIT_FLAGS=""
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1079 ARCH_RUN_32BIT="true"
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1080
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1081 elif test "$UNIVERSAL_ARCHS" = "all" ; then
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1082 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1083 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
58400
3b49ef6b09ff Explicitly use /usr/bin/arch on OSX, fixes issue 7715
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58399
diff changeset
1084 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
58397
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1085
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1086 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1087 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1088 LIPO_32BIT_FLAGS="-extract i386"
58400
3b49ef6b09ff Explicitly use /usr/bin/arch on OSX, fixes issue 7715
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58399
diff changeset
1089 ARCH_RUN_32BIT="/usr/bin/arch -i386"
58397
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1090
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1091 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1092 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1093 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
58870
3bd65b346bfc Fix copy&paste error in the definition of ARCH_RUN_32BIT for a 3-way universal
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58400
diff changeset
1094 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
58397
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1095
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1096 else
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1097 AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way])
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1098
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1099 fi
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1100
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1101
60694
a96fd0e874b4 Add the OSX universal binary related options
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60456
diff changeset
1102 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
a96fd0e874b4 Add the OSX universal binary related options
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60456
diff changeset
1103 if test "${UNIVERSALSDK}" != "/"
a96fd0e874b4 Add the OSX universal binary related options
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60456
diff changeset
1104 then
a96fd0e874b4 Add the OSX universal binary related options
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60456
diff changeset
1105 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
a96fd0e874b4 Add the OSX universal binary related options
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60456
diff changeset
1106 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
a96fd0e874b4 Add the OSX universal binary related options
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60456
diff changeset
1107 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
58397
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1108 fi
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1109
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1110 fi
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1111
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1112
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1113 ;;
37320
d1993ee8ac41 Get gcc to do strict IEEE math. This flag was already used for cc, just not
Neal Norwitz <nnorwitz@gmail.com>
parents: 37099
diff changeset
1114 OSF*)
d1993ee8ac41 Get gcc to do strict IEEE math. This flag was already used for cc, just not
Neal Norwitz <nnorwitz@gmail.com>
parents: 37099
diff changeset
1115 BASECFLAGS="$BASECFLAGS -mieee"
d1993ee8ac41 Get gcc to do strict IEEE math. This flag was already used for cc, just not
Neal Norwitz <nnorwitz@gmail.com>
parents: 37099
diff changeset
1116 ;;
17419
3fadc37cfa92 Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents: 17269
diff changeset
1117 esac
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1118 ;;
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1119
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1120 *)
18976
471a9018129c - On OSX add -no-cpp-precomp to OPT. The user still has to manually specify
Jack Jansen <jack.jansen@cwi.nl>
parents: 18835
diff changeset
1121 case $ac_sys_system in
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1122 OpenUNIX*|UnixWare*)
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1123 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1124 ;;
29268
7887fe3a9a8f SF patch #719359, fix test_long failure on OSF/1 with vendor cc
Neal Norwitz <nnorwitz@gmail.com>
parents: 29265
diff changeset
1125 OSF*)
7887fe3a9a8f SF patch #719359, fix test_long failure on OSF/1 with vendor cc
Neal Norwitz <nnorwitz@gmail.com>
parents: 29265
diff changeset
1126 BASECFLAGS="$BASECFLAGS -ieee -std"
7887fe3a9a8f SF patch #719359, fix test_long failure on OSF/1 with vendor cc
Neal Norwitz <nnorwitz@gmail.com>
parents: 29265
diff changeset
1127 ;;
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1128 SCO_SV*)
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1129 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1130 ;;
18976
471a9018129c - On OSX add -no-cpp-precomp to OPT. The user still has to manually specify
Jack Jansen <jack.jansen@cwi.nl>
parents: 18835
diff changeset
1131 esac
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1132 ;;
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1133 esac
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
1134
21200
947931392694 Define NDEBUG when compiling a release build on Unix.
Fred Drake <fdrake@acm.org>
parents: 21134
diff changeset
1135 if test "$Py_DEBUG" = 'true'; then
947931392694 Define NDEBUG when compiling a release build on Unix.
Fred Drake <fdrake@acm.org>
parents: 21134
diff changeset
1136 :
947931392694 Define NDEBUG when compiling a release build on Unix.
Fred Drake <fdrake@acm.org>
parents: 21134
diff changeset
1137 else
947931392694 Define NDEBUG when compiling a release build on Unix.
Fred Drake <fdrake@acm.org>
parents: 21134
diff changeset
1138 OPT="-DNDEBUG $OPT"
947931392694 Define NDEBUG when compiling a release build on Unix.
Fred Drake <fdrake@acm.org>
parents: 21134
diff changeset
1139 fi
947931392694 Define NDEBUG when compiling a release build on Unix.
Fred Drake <fdrake@acm.org>
parents: 21134
diff changeset
1140
4252
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
1141 if test "$ac_arch_flags"
3891
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
1142 then
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1143 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
3891
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
1144 fi
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
1145
36228
e7c96c1d144b icc accepts -OPT... but generates a warning, so just disable the check
Neal Norwitz <nnorwitz@gmail.com>
parents: 36220
diff changeset
1146 # disable check for icc since it seems to pass, but generates a warning
e7c96c1d144b icc accepts -OPT... but generates a warning, so just disable the check
Neal Norwitz <nnorwitz@gmail.com>
parents: 36220
diff changeset
1147 if test "$CC" = icc
e7c96c1d144b icc accepts -OPT... but generates a warning, so just disable the check
Neal Norwitz <nnorwitz@gmail.com>
parents: 36220
diff changeset
1148 then
e7c96c1d144b icc accepts -OPT... but generates a warning, so just disable the check
Neal Norwitz <nnorwitz@gmail.com>
parents: 36220
diff changeset
1149 ac_cv_opt_olimit_ok=no
e7c96c1d144b icc accepts -OPT... but generates a warning, so just disable the check
Neal Norwitz <nnorwitz@gmail.com>
parents: 36220
diff changeset
1150 fi
e7c96c1d144b icc accepts -OPT... but generates a warning, so just disable the check
Neal Norwitz <nnorwitz@gmail.com>
parents: 36220
diff changeset
1151
6470
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
1152 AC_MSG_CHECKING(whether $CC accepts -OPT:Olimit=0)
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
1153 AC_CACHE_VAL(ac_cv_opt_olimit_ok,
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
1154 [ac_save_cc="$CC"
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
1155 CC="$CC -OPT:Olimit=0"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1156 AC_COMPILE_IFELSE(
61503
f15d6f1a2fa3 Issue #8510: Remove nested 'main' functions (causing failure) in 3 configure tests;
Mark Dickinson <dickinsm@gmail.com>
parents: 61438
diff changeset
1157 [AC_LANG_PROGRAM([[]], [[]])],
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1158 [ac_cv_opt_olimit_ok=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1159 [ac_cv_opt_olimit_ok=no]
57043
c785afa6f95c issue1115: convert some AC_TRY_RUNs into AC_TRY_COMPILEs.
Gregory P. Smith <greg@mad-scientist.com>
parents: 56760
diff changeset
1160 )
6470
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
1161 CC="$ac_save_cc"])
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
1162 AC_MSG_RESULT($ac_cv_opt_olimit_ok)
6520
f1b1728452c1 Daniel Larsson discovered another cut-n-paste bug in the Olimit story...
Guido van Rossum <guido@python.org>
parents: 6495
diff changeset
1163 if test $ac_cv_opt_olimit_ok = yes; then
15119
a358ba707e4d Checking in three Darwin-specific patches.
Guido van Rossum <guido@python.org>
parents: 15107
diff changeset
1164 case $ac_sys_system in
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1165 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1166 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1167 # environment?
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1168 Darwin*)
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1169 ;;
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1170 *)
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1171 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1172 ;;
15119
a358ba707e4d Checking in three Darwin-specific patches.
Guido van Rossum <guido@python.org>
parents: 15107
diff changeset
1173 esac
8632
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1174 else
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1175 AC_MSG_CHECKING(whether $CC accepts -Olimit 1500)
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1176 AC_CACHE_VAL(ac_cv_olimit_ok,
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1177 [ac_save_cc="$CC"
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1178 CC="$CC -Olimit 1500"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1179 AC_COMPILE_IFELSE(
61503
f15d6f1a2fa3 Issue #8510: Remove nested 'main' functions (causing failure) in 3 configure tests;
Mark Dickinson <dickinsm@gmail.com>
parents: 61438
diff changeset
1180 [AC_LANG_PROGRAM([[]], [[]])],
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1181 [ac_cv_olimit_ok=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1182 [ac_cv_olimit_ok=no]
57043
c785afa6f95c issue1115: convert some AC_TRY_RUNs into AC_TRY_COMPILEs.
Gregory P. Smith <greg@mad-scientist.com>
parents: 56760
diff changeset
1183 )
8632
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1184 CC="$ac_save_cc"])
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1185 AC_MSG_RESULT($ac_cv_olimit_ok)
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1186 if test $ac_cv_olimit_ok = yes; then
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1187 BASECFLAGS="$BASECFLAGS -Olimit 1500"
8632
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1188 fi
5521
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
1189 fi
8632
6d75a44347a2 Fix two unrelated problems in the same area:
Guido van Rossum <guido@python.org>
parents: 8487
diff changeset
1190
40151
410c1c78ed51 Add check for the PyArg_ParseTuple format, and declare
Martin v. Löwis <martin@v.loewis.de>
parents: 40140
diff changeset
1191 # Check whether GCC supports PyArg_ParseTuple format
410c1c78ed51 Add check for the PyArg_ParseTuple format, and declare
Martin v. Löwis <martin@v.loewis.de>
parents: 40140
diff changeset
1192 if test "$GCC" = "yes"
410c1c78ed51 Add check for the PyArg_ParseTuple format, and declare
Martin v. Löwis <martin@v.loewis.de>
parents: 40140
diff changeset
1193 then
410c1c78ed51 Add check for the PyArg_ParseTuple format, and declare
Martin v. Löwis <martin@v.loewis.de>
parents: 40140
diff changeset
1194 AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
410c1c78ed51 Add check for the PyArg_ParseTuple format, and declare
Martin v. Löwis <martin@v.loewis.de>
parents: 40140
diff changeset
1195 save_CFLAGS=$CFLAGS
410c1c78ed51 Add check for the PyArg_ParseTuple format, and declare
Martin v. Löwis <martin@v.loewis.de>
parents: 40140
diff changeset
1196 CFLAGS="$CFLAGS -Werror"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1197 AC_COMPILE_IFELSE([
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1198 AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1199 ],[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1200 AC_DEFINE(HAVE_ATTRIBUTE_FORMAT_PARSETUPLE, 1,
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1201 [Define if GCC supports __attribute__((format(PyArg_ParseTuple, 2, 3)))])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1202 AC_MSG_RESULT(yes)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1203 ],[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1204 AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1205 ])
40153
0509ab14b2d9 Restore CFLAGS after checking for __attribute__
Martin v. Löwis <martin@v.loewis.de>
parents: 40151
diff changeset
1206 CFLAGS=$save_CFLAGS
40151
410c1c78ed51 Add check for the PyArg_ParseTuple format, and declare
Martin v. Löwis <martin@v.loewis.de>
parents: 40140
diff changeset
1207 fi
410c1c78ed51 Add check for the PyArg_ParseTuple format, and declare
Martin v. Löwis <martin@v.loewis.de>
parents: 40140
diff changeset
1208
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1209 # On some compilers, pthreads are available without further options
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1210 # (e.g. MacOS X). On some of these systems, the compiler will not
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1211 # complain if unaccepted options are passed (e.g. gcc on Mac OS X).
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1212 # So we have to see first whether pthreads are available without
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1213 # options before we can check whether -Kpthread improves anything.
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1214 AC_MSG_CHECKING(whether pthreads are available without options)
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1215 AC_CACHE_VAL(ac_cv_pthread_is_default,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1216 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1217 #include <pthread.h>
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1218
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1219 void* routine(void* p){return NULL;}
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1220
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1221 int main(){
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1222 pthread_t p;
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1223 if(pthread_create(&p,NULL,routine,NULL)!=0)
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1224 return 1;
22183
534e79059be1 When testing for availability of pthreads without special compiler options
Jack Jansen <jack.jansen@cwi.nl>
parents: 22159
diff changeset
1225 (void)pthread_detach(p);
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1226 return 0;
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1227 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1228 ]])],[
29804
0df11b2bfca5 avoid testing for -Kthread or -pthread if the default build environment
Skip Montanaro <skip@pobox.com>
parents: 29774
diff changeset
1229 ac_cv_pthread_is_default=yes
0df11b2bfca5 avoid testing for -Kthread or -pthread if the default build environment
Skip Montanaro <skip@pobox.com>
parents: 29774
diff changeset
1230 ac_cv_kthread=no
0df11b2bfca5 avoid testing for -Kthread or -pthread if the default build environment
Skip Montanaro <skip@pobox.com>
parents: 29774
diff changeset
1231 ac_cv_pthread=no
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1232 ],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no])
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1233 ])
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1234 AC_MSG_RESULT($ac_cv_pthread_is_default)
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1235
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1236
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1237 if test $ac_cv_pthread_is_default = yes
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1238 then
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1239 ac_cv_kpthread=no
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1240 else
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1241 # -Kpthread, if available, provides the right #defines
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1242 # and linker options to make pthread_create available
20299
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1243 # Some compilers won't report that they do not support -Kpthread,
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1244 # so we need to run a program to see whether it really made the
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1245 # function available.
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1246 AC_MSG_CHECKING(whether $CC accepts -Kpthread)
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1247 AC_CACHE_VAL(ac_cv_kpthread,
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1248 [ac_save_cc="$CC"
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1249 CC="$CC -Kpthread"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1250 AC_RUN_IFELSE([AC_LANG_SOURCE([[
20299
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1251 #include <pthread.h>
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1252
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1253 void* routine(void* p){return NULL;}
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1254
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1255 int main(){
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1256 pthread_t p;
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1257 if(pthread_create(&p,NULL,routine,NULL)!=0)
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1258 return 1;
22183
534e79059be1 When testing for availability of pthreads without special compiler options
Jack Jansen <jack.jansen@cwi.nl>
parents: 22159
diff changeset
1259 (void)pthread_detach(p);
20299
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1260 return 0;
42b52793740c Use AC_TRY_RUN for checking for -Kpthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 20264
diff changeset
1261 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1262 ]])],[ac_cv_kpthread=yes],[ac_cv_kpthread=no],[ac_cv_kpthread=no])
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1263 CC="$ac_save_cc"])
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1264 AC_MSG_RESULT($ac_cv_kpthread)
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
1265 fi
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1266
29804
0df11b2bfca5 avoid testing for -Kthread or -pthread if the default build environment
Skip Montanaro <skip@pobox.com>
parents: 29774
diff changeset
1267 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
28975
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1268 then
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1269 # -Kthread, if available, provides the right #defines
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1270 # and linker options to make pthread_create available
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1271 # Some compilers won't report that they do not support -Kthread,
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1272 # so we need to run a program to see whether it really made the
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1273 # function available.
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1274 AC_MSG_CHECKING(whether $CC accepts -Kthread)
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1275 AC_CACHE_VAL(ac_cv_kthread,
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1276 [ac_save_cc="$CC"
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1277 CC="$CC -Kthread"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1278 AC_RUN_IFELSE([AC_LANG_SOURCE([[
28975
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1279 #include <pthread.h>
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1280
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1281 void* routine(void* p){return NULL;}
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1282
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1283 int main(){
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1284 pthread_t p;
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1285 if(pthread_create(&p,NULL,routine,NULL)!=0)
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1286 return 1;
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1287 (void)pthread_detach(p);
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1288 return 0;
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1289 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1290 ]])],[ac_cv_kthread=yes],[ac_cv_kthread=no],[ac_cv_kthread=no])
28975
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1291 CC="$ac_save_cc"])
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1292 AC_MSG_RESULT($ac_cv_kthread)
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1293 fi
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1294
29804
0df11b2bfca5 avoid testing for -Kthread or -pthread if the default build environment
Skip Montanaro <skip@pobox.com>
parents: 29774
diff changeset
1295 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1296 then
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1297 # -pthread, if available, provides the right #defines
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1298 # and linker options to make pthread_create available
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1299 # Some compilers won't report that they do not support -pthread,
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1300 # so we need to run a program to see whether it really made the
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1301 # function available.
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1302 AC_MSG_CHECKING(whether $CC accepts -pthread)
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1303 AC_CACHE_VAL(ac_cv_thread,
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1304 [ac_save_cc="$CC"
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1305 CC="$CC -pthread"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1306 AC_RUN_IFELSE([AC_LANG_SOURCE([[
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1307 #include <pthread.h>
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1308
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1309 void* routine(void* p){return NULL;}
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1310
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1311 int main(){
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1312 pthread_t p;
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1313 if(pthread_create(&p,NULL,routine,NULL)!=0)
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1314 return 1;
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1315 (void)pthread_detach(p);
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1316 return 0;
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1317 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1318 ]])],[ac_cv_pthread=yes],[ac_cv_pthread=no],[ac_cv_pthread=no])
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1319 CC="$ac_save_cc"])
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1320 AC_MSG_RESULT($ac_cv_pthread)
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1321 fi
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1322
29630
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1323 # If we have set a CC compiler flag for thread support then
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1324 # check if it works for CXX, too.
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1325 ac_cv_cxx_thread=no
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1326 if test ! -z "$CXX"
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1327 then
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1328 AC_MSG_CHECKING(whether $CXX also accepts flags for thread support)
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1329 ac_save_cxx="$CXX"
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1330
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1331 if test "$ac_cv_kpthread" = "yes"
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1332 then
30455
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
1333 CXX="$CXX -Kpthread"
29630
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1334 ac_cv_cxx_thread=yes
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1335 elif test "$ac_cv_kthread" = "yes"
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1336 then
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1337 CXX="$CXX -Kthread"
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1338 ac_cv_cxx_thread=yes
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1339 elif test "$ac_cv_pthread" = "yes"
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1340 then
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1341 CXX="$CXX -pthread"
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1342 ac_cv_cxx_thread=yes
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1343 fi
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1344
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1345 if test $ac_cv_cxx_thread = yes
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1346 then
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1347 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1348 $CXX -c conftest.$ac_ext 2>&5
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1349 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1350 && test -s conftest$ac_exeext && ./conftest$ac_exeext
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1351 then
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1352 ac_cv_cxx_thread=yes
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1353 else
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1354 ac_cv_cxx_thread=no
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1355 fi
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1356 rm -fr conftest*
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1357 fi
33919
8698653e05fc Move the AC_MSG_RESULT function call for checking for pthread options up into
Brett Cannon <bcannon@gmail.com>
parents: 33908
diff changeset
1358 AC_MSG_RESULT($ac_cv_cxx_thread)
29630
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1359 fi
30455
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
1360 CXX="$ac_save_cxx"
29630
410b3c222211 Patch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis <martin@v.loewis.de>
parents: 29471
diff changeset
1361
13467
6690374a1dc1 Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources.
Fred Drake <fdrake@acm.org>
parents: 13357
diff changeset
1362 dnl # check for ANSI or K&R ("traditional") preprocessor
6690374a1dc1 Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources.
Fred Drake <fdrake@acm.org>
parents: 13357
diff changeset
1363 dnl AC_MSG_CHECKING(for C preprocessor type)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1364 dnl AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
13467
6690374a1dc1 Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources.
Fred Drake <fdrake@acm.org>
parents: 13357
diff changeset
1365 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
6690374a1dc1 Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources.
Fred Drake <fdrake@acm.org>
parents: 13357
diff changeset
1366 dnl int foo;
6690374a1dc1 Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources.
Fred Drake <fdrake@acm.org>
parents: 13357
diff changeset
1367 dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1368 dnl ]], [[;]])],[cpp_type=ansi],[AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional])
13467
6690374a1dc1 Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources.
Fred Drake <fdrake@acm.org>
parents: 13357
diff changeset
1369 dnl AC_MSG_RESULT($cpp_type)
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
1370
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
1371 # checks for header files
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1372 AC_HEADER_STDC
38716
42808526511c Patch #1495999: Part two of Windows CE changes.
Martin v. Löwis <martin@v.loewis.de>
parents: 38647
diff changeset
1373 AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
42808526511c Patch #1495999: Part two of Windows CE changes.
Martin v. Löwis <martin@v.loewis.de>
parents: 38647
diff changeset
1374 fcntl.h grp.h \
46154
1e10b30f7498 Fix compiler warning about finite() missing on Solaris.
Neal Norwitz <nnorwitz@gmail.com>
parents: 46053
diff changeset
1375 ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
39951
5c36ec5fd3c2 Guard uintptr_t test with HAVE_STDINT_H, test for
Martin v. Löwis <martin@v.loewis.de>
parents: 39948
diff changeset
1376 shadow.h signal.h stdint.h stropts.h termios.h thread.h \
26998
6ca1c0d3ef19 Expose I_ constants. Auto-detect stropts.h. Properly configure the slave terminal.
Martin v. Löwis <martin@v.loewis.de>
parents: 26945
diff changeset
1377 unistd.h utime.h \
45991
728dc13327b2 Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents: 45824
diff changeset
1378 sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
728dc13327b2 Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents: 45824
diff changeset
1379 sys/lock.h sys/mkdev.h sys/modem.h \
38716
42808526511c Patch #1495999: Part two of Windows CE changes.
Martin v. Löwis <martin@v.loewis.de>
parents: 38647
diff changeset
1380 sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
47227
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
1381 sys/termio.h sys/time.h \
38716
42808526511c Patch #1495999: Part two of Windows CE changes.
Martin v. Löwis <martin@v.loewis.de>
parents: 38647
diff changeset
1382 sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
40181
34dcbc746243 Get DBL_MAX from float.h not values.h.
Martin v. Löwis <martin@v.loewis.de>
parents: 40179
diff changeset
1383 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
58397
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58064
diff changeset
1384 bluetooth/bluetooth.h linux/tipc.h spawn.h util.h)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1385 AC_HEADER_DIRENT
25694
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
1386 AC_HEADER_MAJOR
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
1387
33508
94f500ebf60a Patch #1012280: Include curses.h for term.h check. Fixes #933795.
Martin v. Löwis <martin@v.loewis.de>
parents: 33494
diff changeset
1388 # On Solaris, term.h requires curses.h
34054
7026d0385081 Bump version number to 2.5.
Martin v. Löwis <martin@v.loewis.de>
parents: 33919
diff changeset
1389 AC_CHECK_HEADERS(term.h,,,[
33511
03edb63ae071 Make curses.h inclusion conditional as in the original patch #1012280.
Martin v. Löwis <martin@v.loewis.de>
parents: 33508
diff changeset
1390 #ifdef HAVE_CURSES_H
03edb63ae071 Make curses.h inclusion conditional as in the original patch #1012280.
Martin v. Löwis <martin@v.loewis.de>
parents: 33508
diff changeset
1391 #include <curses.h>
03edb63ae071 Make curses.h inclusion conditional as in the original patch #1012280.
Martin v. Löwis <martin@v.loewis.de>
parents: 33508
diff changeset
1392 #endif
03edb63ae071 Make curses.h inclusion conditional as in the original patch #1012280.
Martin v. Löwis <martin@v.loewis.de>
parents: 33508
diff changeset
1393 ])
33508
94f500ebf60a Patch #1012280: Include curses.h for term.h check. Fixes #933795.
Martin v. Löwis <martin@v.loewis.de>
parents: 33494
diff changeset
1394
36286
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1395 # On Linux, netlink.h requires asm/types.h
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1396 AC_CHECK_HEADERS(linux/netlink.h,,,[
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1397 #ifdef HAVE_ASM_TYPES_H
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1398 #include <asm/types.h>
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1399 #endif
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1400 #ifdef HAVE_SYS_SOCKET_H
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1401 #include <sys/socket.h>
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1402 #endif
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1403 ])
ae4480935016 Patch #1103116: AF_NETLINK sockets basic support.
Martin v. Löwis <martin@v.loewis.de>
parents: 36253
diff changeset
1404
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
1405 # checks for typedefs
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
1406 was_it_defined=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
1407 AC_MSG_CHECKING(for clock_t in time.h)
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1408 AC_EGREP_HEADER(clock_t, time.h, was_it_defined=yes, [
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1409 AC_DEFINE(clock_t, long, [Define to 'long' if <time.h> doesn't define.])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1410 ])
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
1411 AC_MSG_RESULT($was_it_defined)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
1412
24429
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1413 # Check whether using makedev requires defining _OSF_SOURCE
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1414 AC_MSG_CHECKING(for makedev)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1415 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
61048
ec7715ea2c75 Merged revisions 80574 via svnmerge from
Jesus Cea <jcea@jcea.es>
parents: 60700
diff changeset
1416 #if defined(MAJOR_IN_MKDEV)
ec7715ea2c75 Merged revisions 80574 via svnmerge from
Jesus Cea <jcea@jcea.es>
parents: 60700
diff changeset
1417 #include <sys/mkdev.h>
ec7715ea2c75 Merged revisions 80574 via svnmerge from
Jesus Cea <jcea@jcea.es>
parents: 60700
diff changeset
1418 #elif defined(MAJOR_IN_SYSMACROS)
ec7715ea2c75 Merged revisions 80574 via svnmerge from
Jesus Cea <jcea@jcea.es>
parents: 60700
diff changeset
1419 #include <sys/sysmacros.h>
ec7715ea2c75 Merged revisions 80574 via svnmerge from
Jesus Cea <jcea@jcea.es>
parents: 60700
diff changeset
1420 #else
ec7715ea2c75 Merged revisions 80574 via svnmerge from
Jesus Cea <jcea@jcea.es>
parents: 60700
diff changeset
1421 #include <sys/types.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1422 #endif ]], [[ makedev(0, 0) ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1423 [ac_cv_has_makedev=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1424 [ac_cv_has_makedev=no])
24429
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1425 if test "$ac_cv_has_makedev" = "no"; then
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1426 # we didn't link, try if _OSF_SOURCE will allow us to link
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1427 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
28035
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
1428 #define _OSF_SOURCE 1
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
1429 #include <sys/types.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1430 ]], [[ makedev(0, 0) ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1431 [ac_cv_has_makedev=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1432 [ac_cv_has_makedev=no])
24429
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1433 if test "$ac_cv_has_makedev" = "yes"; then
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1434 AC_DEFINE(_OSF_SOURCE, 1, [Define _OSF_SOURCE to get the makedev macro.])
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1435 fi
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1436 fi
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1437 AC_MSG_RESULT($ac_cv_has_makedev)
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1438 if test "$ac_cv_has_makedev" = "yes"; then
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1439 AC_DEFINE(HAVE_MAKEDEV, 1, [Define this if you have the makedev macro.])
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1440 fi
f55d58ee4ea3 SF patch #584245, get python to link on OSF1 (Dec Unix)
Neal Norwitz <nnorwitz@gmail.com>
parents: 24413
diff changeset
1441
25548
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1442 # Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1443 # the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1444 # defined, but the compiler does not support pragma redefine_extname,
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1445 # and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1446 # structures (such as rlimit64) without declaring them. As a
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1447 # work-around, disable LFS on such configurations
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1448
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1449 use_lfs=yes
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1450 AC_MSG_CHECKING(Solaris LFS bug)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1451 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
25548
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1452 #define _LARGEFILE_SOURCE 1
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1453 #define _FILE_OFFSET_BITS 64
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1454 #include <sys/resource.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1455 ]], [[struct rlimit foo;]])],[sol_lfs_bug=no],[sol_lfs_bug=yes])
25548
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1456 AC_MSG_RESULT($sol_lfs_bug)
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1457 if test "$sol_lfs_bug" = "yes"; then
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1458 use_lfs=no
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1459 fi
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1460
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1461 if test "$use_lfs" = "yes"; then
19818
6b1be14d7650 This time (I hope) I've fixed largefile
Guido van Rossum <guido@python.org>
parents: 19796
diff changeset
1462 # Two defines needed to enable largefile support on various platforms
6b1be14d7650 This time (I hope) I've fixed largefile
Guido van Rossum <guido@python.org>
parents: 19796
diff changeset
1463 # These may affect some typedefs
68018
34ae316318ef Merged revisions 88430,88438,88440 via svnmerge from
Georg Brandl <georg@python.org>
parents: 68017
diff changeset
1464 case $ac_sys_system/$ac_sys_release in
34ae316318ef Merged revisions 88430,88438,88440 via svnmerge from
Georg Brandl <georg@python.org>
parents: 68017
diff changeset
1465 AIX*)
34ae316318ef Merged revisions 88430,88438,88440 via svnmerge from
Georg Brandl <georg@python.org>
parents: 68017
diff changeset
1466 AC_DEFINE(_LARGE_FILES, 1,
34ae316318ef Merged revisions 88430,88438,88440 via svnmerge from
Georg Brandl <georg@python.org>
parents: 68017
diff changeset
1467 [This must be defined on AIX systems to enable large file support.])
34ae316318ef Merged revisions 88430,88438,88440 via svnmerge from
Georg Brandl <georg@python.org>
parents: 68017
diff changeset
1468 ;;
34ae316318ef Merged revisions 88430,88438,88440 via svnmerge from
Georg Brandl <georg@python.org>
parents: 68017
diff changeset
1469 esac
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1470 AC_DEFINE(_LARGEFILE_SOURCE, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1471 [This must be defined on some systems to enable large file support.])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1472 AC_DEFINE(_FILE_OFFSET_BITS, 64,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1473 [This must be set to 64 on some systems to enable large file support.])
25548
0ed829475717 Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Martin v. Löwis <martin@v.loewis.de>
parents: 25545
diff changeset
1474 fi
19818
6b1be14d7650 This time (I hope) I've fixed largefile
Guido van Rossum <guido@python.org>
parents: 19796
diff changeset
1475
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
1476 # Add some code to confdefs.h so that the test for off_t works on SCO
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
1477 cat >> confdefs.h <<\EOF
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
1478 #if defined(SCO_DS)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
1479 #undef _OFF_T
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
1480 #endif
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
1481 EOF
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
1482
11960
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
1483 # Type availability checks
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1484 AC_TYPE_MODE_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1485 AC_TYPE_OFF_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1486 AC_TYPE_PID_T
61405
f614dbec2f4f configure.in: Avoid autoconf warning: Assume C89 semantics that
Matthias Klose <doko@ubuntu.com>
parents: 61404
diff changeset
1487 AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void])
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1488 AC_TYPE_SIZE_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1489 AC_TYPE_UID_T
52233
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
1490 AC_TYPE_UINT32_T
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
1491 AC_TYPE_UINT64_T
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
1492 AC_TYPE_INT32_T
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
1493 AC_TYPE_INT64_T
45077
f0e6bb9b24f6 Fixed bug #1983: Return from fork() is pid_t, not int
Christian Heimes <christian@cheimes.de>
parents: 45063
diff changeset
1494 AC_CHECK_TYPE(ssize_t,
60924
f4fe53f86627 - Issue #8509: Fix quoting in help strings and code snippets in configure.in.
Matthias Klose <doko@ubuntu.com>
parents: 60694
diff changeset
1495 AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
1496
11960
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
1497 # Sizes of various common basic types
31378
64ae832131e1 Remove support for minix.
Skip Montanaro <skip@pobox.com>
parents: 31156
diff changeset
1498 # ANSI C requires sizeof(char) == 1, so no need to check it
19933
b6cf2f27e44f Add cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum <guido@python.org>
parents: 19858
diff changeset
1499 AC_CHECK_SIZEOF(int, 4)
b6cf2f27e44f Add cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum <guido@python.org>
parents: 19858
diff changeset
1500 AC_CHECK_SIZEOF(long, 4)
b6cf2f27e44f Add cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum <guido@python.org>
parents: 19858
diff changeset
1501 AC_CHECK_SIZEOF(void *, 4)
b6cf2f27e44f Add cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum <guido@python.org>
parents: 19858
diff changeset
1502 AC_CHECK_SIZEOF(short, 2)
b6cf2f27e44f Add cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum <guido@python.org>
parents: 19858
diff changeset
1503 AC_CHECK_SIZEOF(float, 4)
b6cf2f27e44f Add cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum <guido@python.org>
parents: 19858
diff changeset
1504 AC_CHECK_SIZEOF(double, 8)
b6cf2f27e44f Add cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum <guido@python.org>
parents: 19858
diff changeset
1505 AC_CHECK_SIZEOF(fpos_t, 4)
36501
7fdc639bc5b4 Merge ssize_t branch.
Martin v. Löwis <martin@v.loewis.de>
parents: 36473
diff changeset
1506 AC_CHECK_SIZEOF(size_t, 4)
45077
f0e6bb9b24f6 Fixed bug #1983: Return from fork() is pid_t, not int
Christian Heimes <christian@cheimes.de>
parents: 45063
diff changeset
1507 AC_CHECK_SIZEOF(pid_t, 4)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1508
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
1509 AC_MSG_CHECKING(for long long support)
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
1510 have_long_long=no
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1511 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1512 AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1513 have_long_long=yes
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1514 ],[])
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
1515 AC_MSG_RESULT($have_long_long)
10563
f6fc67d705de Quote a bunch of shell variables used in test, related to long-long.
Guido van Rossum <guido@python.org>
parents: 10522
diff changeset
1516 if test "$have_long_long" = yes ; then
19933
b6cf2f27e44f Add cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum <guido@python.org>
parents: 19858
diff changeset
1517 AC_CHECK_SIZEOF(long long, 8)
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
1518 fi
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
1519
47503
3aebac7f2725 Add long double check support to configure test.
Travis E. Oliphant <oliphant@enthought.com>
parents: 47501
diff changeset
1520 AC_MSG_CHECKING(for long double support)
3aebac7f2725 Add long double check support to configure test.
Travis E. Oliphant <oliphant@enthought.com>
parents: 47501
diff changeset
1521 have_long_double=no
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1522 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long double x; x = (long double)0;]])],[
47503
3aebac7f2725 Add long double check support to configure test.
Travis E. Oliphant <oliphant@enthought.com>
parents: 47501
diff changeset
1523 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
3aebac7f2725 Add long double check support to configure test.
Travis E. Oliphant <oliphant@enthought.com>
parents: 47501
diff changeset
1524 have_long_double=yes
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1525 ],[])
47503
3aebac7f2725 Add long double check support to configure test.
Travis E. Oliphant <oliphant@enthought.com>
parents: 47501
diff changeset
1526 AC_MSG_RESULT($have_long_double)
47843
841ae1767b4c Fix typo in configure.in, and propagate configure.in changes from r64002
Mark Dickinson <dickinsm@gmail.com>
parents: 47503
diff changeset
1527 if test "$have_long_double" = yes ; then
47503
3aebac7f2725 Add long double check support to configure test.
Travis E. Oliphant <oliphant@enthought.com>
parents: 47501
diff changeset
1528 AC_CHECK_SIZEOF(long double, 12)
3aebac7f2725 Add long double check support to configure test.
Travis E. Oliphant <oliphant@enthought.com>
parents: 47501
diff changeset
1529 fi
3aebac7f2725 Add long double check support to configure test.
Travis E. Oliphant <oliphant@enthought.com>
parents: 47501
diff changeset
1530
40681
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1531 AC_MSG_CHECKING(for _Bool support)
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1532 have_c99_bool=no
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1533 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Bool x; x = (_Bool)0;]])],[
40681
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1534 AC_DEFINE(HAVE_C99_BOOL, 1, [Define this if you have the type _Bool.])
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1535 have_c99_bool=yes
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1536 ],[])
40681
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1537 AC_MSG_RESULT($have_c99_bool)
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1538 if test "$have_c99_bool" = yes ; then
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1539 AC_CHECK_SIZEOF(_Bool, 1)
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1540 fi
0bffca64ccc4 Patch #1610575: Add support for _Bool to struct.
Martin v. Löwis <martin@v.loewis.de>
parents: 40395
diff changeset
1541
39948
1da04c8ee8ff Fix test for uintptr_t. Fixes #1568842.
Martin v. Löwis <martin@v.loewis.de>
parents: 39886
diff changeset
1542 AC_CHECK_TYPES(uintptr_t,
1da04c8ee8ff Fix test for uintptr_t. Fixes #1568842.
Martin v. Löwis <martin@v.loewis.de>
parents: 39886
diff changeset
1543 [AC_CHECK_SIZEOF(uintptr_t, 4)],
39951
5c36ec5fd3c2 Guard uintptr_t test with HAVE_STDINT_H, test for
Martin v. Löwis <martin@v.loewis.de>
parents: 39948
diff changeset
1544 [], [#ifdef HAVE_STDINT_H
5c36ec5fd3c2 Guard uintptr_t test with HAVE_STDINT_H, test for
Martin v. Löwis <martin@v.loewis.de>
parents: 39948
diff changeset
1545 #include <stdint.h>
65203
a9a45624cedf Merged revisions 85349 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64878
diff changeset
1546 #endif
a9a45624cedf Merged revisions 85349 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64878
diff changeset
1547 #ifdef HAVE_INTTYPES_H
a9a45624cedf Merged revisions 85349 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64878
diff changeset
1548 #include <inttypes.h>
39951
5c36ec5fd3c2 Guard uintptr_t test with HAVE_STDINT_H, test for
Martin v. Löwis <martin@v.loewis.de>
parents: 39948
diff changeset
1549 #endif])
39948
1da04c8ee8ff Fix test for uintptr_t. Fixes #1568842.
Martin v. Löwis <martin@v.loewis.de>
parents: 39886
diff changeset
1550
55278
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1551 AC_CHECK_SIZEOF(off_t, [], [
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1552 #ifdef HAVE_SYS_TYPES_H
9790
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1553 #include <sys/types.h>
55278
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1554 #endif
9790
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1555 ])
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1556
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1557 AC_MSG_CHECKING(whether to enable large file support)
58049
babfc061212c Merged revisions 77193 via svnmerge from
Mark Dickinson <dickinsm@gmail.com>
parents: 57355
diff changeset
1558 if test "$have_long_long" = yes
babfc061212c Merged revisions 77193 via svnmerge from
Mark Dickinson <dickinsm@gmail.com>
parents: 57355
diff changeset
1559 then
babfc061212c Merged revisions 77193 via svnmerge from
Mark Dickinson <dickinsm@gmail.com>
parents: 57355
diff changeset
1560 if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10563
f6fc67d705de Quote a bunch of shell variables used in test, related to long-long.
Guido van Rossum <guido@python.org>
parents: 10522
diff changeset
1561 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1562 AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1563 [Defined to enable large file support when an off_t is bigger than a long
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1564 and long long is available and at least as big as an off_t. You may need
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1565 to add some flags for configuration and compilation to enable this mode.
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1566 (For Solaris and Linux, the necessary defines are already defined.)])
9790
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1567 AC_MSG_RESULT(yes)
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1568 else
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1569 AC_MSG_RESULT(no)
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1570 fi
58049
babfc061212c Merged revisions 77193 via svnmerge from
Mark Dickinson <dickinsm@gmail.com>
parents: 57355
diff changeset
1571 else
babfc061212c Merged revisions 77193 via svnmerge from
Mark Dickinson <dickinsm@gmail.com>
parents: 57355
diff changeset
1572 AC_MSG_RESULT(no)
babfc061212c Merged revisions 77193 via svnmerge from
Mark Dickinson <dickinsm@gmail.com>
parents: 57355
diff changeset
1573 fi
9790
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1574
55278
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1575 AC_CHECK_SIZEOF(time_t, [], [
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1576 #ifdef HAVE_SYS_TYPES_H
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1577 #include <sys/types.h>
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1578 #endif
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1579 #ifdef HAVE_TIME_H
13151
3f8073c63033 This patch extends PC/config.h and configure.in as appropriate for
Fred Drake <fdrake@acm.org>
parents: 13130
diff changeset
1580 #include <time.h>
55278
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1581 #endif
13151
3f8073c63033 This patch extends PC/config.h and configure.in as appropriate for
Fred Drake <fdrake@acm.org>
parents: 13130
diff changeset
1582 ])
9790
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
1583
14144
31cda87e9ff4 This patch partly (some stuff went in already) ports Python to Monterey.
Trent Mick <trentm@activestate.com>
parents: 14048
diff changeset
1584 # if have pthread_t then define SIZEOF_PTHREAD_T
18735
59d14c88651c Use -Kpthread when trying to find out the size of pthread_t.
Martin v. Löwis <martin@v.loewis.de>
parents: 18730
diff changeset
1585 ac_save_cc="$CC"
59d14c88651c Use -Kpthread when trying to find out the size of pthread_t.
Martin v. Löwis <martin@v.loewis.de>
parents: 18730
diff changeset
1586 if test "$ac_cv_kpthread" = "yes"
59d14c88651c Use -Kpthread when trying to find out the size of pthread_t.
Martin v. Löwis <martin@v.loewis.de>
parents: 18730
diff changeset
1587 then CC="$CC -Kpthread"
28975
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1588 elif test "$ac_cv_kthread" = "yes"
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
1589 then CC="$CC -Kthread"
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1590 elif test "$ac_cv_pthread" = "yes"
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
1591 then CC="$CC -pthread"
18735
59d14c88651c Use -Kpthread when trying to find out the size of pthread_t.
Martin v. Löwis <martin@v.loewis.de>
parents: 18730
diff changeset
1592 fi
14144
31cda87e9ff4 This patch partly (some stuff went in already) ports Python to Monterey.
Trent Mick <trentm@activestate.com>
parents: 14048
diff changeset
1593 AC_MSG_CHECKING(for pthread_t)
31cda87e9ff4 This patch partly (some stuff went in already) ports Python to Monterey.
Trent Mick <trentm@activestate.com>
parents: 14048
diff changeset
1594 have_pthread_t=no
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1595 AC_COMPILE_IFELSE([
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1596 AC_LANG_PROGRAM([[#include <pthread.h>]], [[pthread_t x; x = *(pthread_t*)0;]])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1597 ],[have_pthread_t=yes],[])
14144
31cda87e9ff4 This patch partly (some stuff went in already) ports Python to Monterey.
Trent Mick <trentm@activestate.com>
parents: 14048
diff changeset
1598 AC_MSG_RESULT($have_pthread_t)
31cda87e9ff4 This patch partly (some stuff went in already) ports Python to Monterey.
Trent Mick <trentm@activestate.com>
parents: 14048
diff changeset
1599 if test "$have_pthread_t" = yes ; then
55278
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1600 AC_CHECK_SIZEOF(pthread_t, [], [
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1601 #ifdef HAVE_PTHREAD_H
28035
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
1602 #include <pthread.h>
55278
0ca80a2c77ff Rename the useless AC_INCLUDES_DEFAULT and protect the includes.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55277
diff changeset
1603 #endif
14144
31cda87e9ff4 This patch partly (some stuff went in already) ports Python to Monterey.
Trent Mick <trentm@activestate.com>
parents: 14048
diff changeset
1604 ])
31cda87e9ff4 This patch partly (some stuff went in already) ports Python to Monterey.
Trent Mick <trentm@activestate.com>
parents: 14048
diff changeset
1605 fi
18735
59d14c88651c Use -Kpthread when trying to find out the size of pthread_t.
Martin v. Löwis <martin@v.loewis.de>
parents: 18730
diff changeset
1606 CC="$ac_save_cc"
14144
31cda87e9ff4 This patch partly (some stuff went in already) ports Python to Monterey.
Trent Mick <trentm@activestate.com>
parents: 14048
diff changeset
1607
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1608 AC_MSG_CHECKING(for --enable-toolbox-glue)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1609 AC_ARG_ENABLE(toolbox-glue,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
1610 AS_HELP_STRING([--enable-toolbox-glue], [disable/enable MacOSX glue code for extensions]))
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1611
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1612 if test -z "$enable_toolbox_glue"
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1613 then
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1614 case $ac_sys_system/$ac_sys_release in
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1615 Darwin/*)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1616 enable_toolbox_glue="yes";;
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1617 *)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1618 enable_toolbox_glue="no";;
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1619 esac
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1620 fi
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1621 case "$enable_toolbox_glue" in
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1622 yes)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1623 extra_machdep_objs="Python/mactoolboxglue.o"
33908
7ed899b61182 SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core
Raymond Hettinger <python@rcn.com>
parents: 33840
diff changeset
1624 extra_undefs="-u _PyMac_Error"
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1625 AC_DEFINE(USE_TOOLBOX_OBJECT_GLUE, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1626 [Define if you want to use MacPython modules on MacOSX in unix-Python.])
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1627 ;;
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1628 *)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1629 extra_machdep_objs=""
19270
b65312238c0b MacOSX: if we're building without --enable-toolbox-glue don't attempt to
Jack Jansen <jack.jansen@cwi.nl>
parents: 19262
diff changeset
1630 extra_undefs=""
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1631 ;;
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1632 esac
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1633 AC_MSG_RESULT($enable_toolbox_glue)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1634
47501
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47486
diff changeset
1635
34828
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1636 AC_SUBST(OTHER_LIBTOOL_OPT)
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1637 case $ac_sys_system/$ac_sys_release in
37553
3959810bc549 Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
Anthony Baxter <anthonybaxter@gmail.com>
parents: 37456
diff changeset
1638 Darwin/@<:@01567@:>@\..*)
34828
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1639 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1640 ;;
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1641 Darwin/*)
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1642 OTHER_LIBTOOL_OPT=""
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1643 ;;
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1644 esac
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1645
55853
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1646
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1647 ARCH_RUN_32BIT=""
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1648 AC_SUBST(LIBTOOL_CRUFT)
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1649 case $ac_sys_system/$ac_sys_release in
37553
3959810bc549 Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
Anthony Baxter <anthonybaxter@gmail.com>
parents: 37456
diff changeset
1650 Darwin/@<:@01567@:>@\..*)
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
1651 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
1652 if test "${enable_universalsdk}"; then
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
1653 :
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
1654 else
58875
33452d95301f Merged revisions 78154 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58871
diff changeset
1655 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
1656 fi
32709
846ace57389c Don't hardcode "Python" as the framework name, we have a variable for it:
Jack Jansen <jack.jansen@cwi.nl>
parents: 32526
diff changeset
1657 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
19796
700fefdc03d2 (Slightly modified) patch by Steve Spicklemire to make Python build
Jack Jansen <jack.jansen@cwi.nl>
parents: 19741
diff changeset
1658 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
15119
a358ba707e4d Checking in three Darwin-specific patches.
Guido van Rossum <guido@python.org>
parents: 15107
diff changeset
1659 Darwin/*)
58789
de53baa5ac7d Fix for issue 7714 (backport from trunk)
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58601
diff changeset
1660 gcc_version=`gcc -dumpversion`
34828
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1661 if test ${gcc_version} '<' 4.0
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1662 then
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1663 LIBTOOL_CRUFT="-lcc_dynamic"
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1664 else
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1665 LIBTOOL_CRUFT=""
4f0838b68bbb patch [1171735] - Darwin 8's headers disable functionality when
Bob Ippolito <bob@redivi.com>
parents: 34754
diff changeset
1666 fi
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1667 AC_RUN_IFELSE([AC_LANG_SOURCE([[
55853
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1668 #include <unistd.h>
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1669 int main(int argc, char*argv[])
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1670 {
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1671 if (sizeof(long) == 4) {
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1672 return 0;
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1673 } else {
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1674 return 1;
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1675 }
55881
6fe9dfb139c3 Merged revisions 74701 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 55853
diff changeset
1676 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
1677 ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
55853
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1678
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1679 if test "${ac_osx_32bit}" = "yes"; then
58875
33452d95301f Merged revisions 78154 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58871
diff changeset
1680 case `/usr/bin/arch` in
55853
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1681 i386)
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1682 MACOSX_DEFAULT_ARCH="i386"
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1683 ;;
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1684 ppc)
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1685 MACOSX_DEFAULT_ARCH="ppc"
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1686 ;;
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1687 *)
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1688 AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1689 ;;
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1690 esac
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1691 else
58875
33452d95301f Merged revisions 78154 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58871
diff changeset
1692 case `/usr/bin/arch` in
55853
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1693 i386)
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1694 MACOSX_DEFAULT_ARCH="x86_64"
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1695 ;;
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1696 ppc)
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1697 MACOSX_DEFAULT_ARCH="ppc64"
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1698 ;;
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1699 *)
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1700 AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1701 ;;
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1702 esac
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1703
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1704 #ARCH_RUN_32BIT="true"
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1705 fi
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1706
899bbcbaf9a6 Merged revisions 74672 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54636
diff changeset
1707 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
32709
846ace57389c Don't hardcode "Python" as the framework name, we have a variable for it:
Jack Jansen <jack.jansen@cwi.nl>
parents: 32526
diff changeset
1708 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1709 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1710 esac
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1711
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1712 AC_MSG_CHECKING(for --enable-framework)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1713 if test "$enable_framework"
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1714 then
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
1715 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1716 # -F. is needed to allow linking to the framework while
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1717 # in the build location.
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1718 AC_DEFINE(WITH_NEXT_FRAMEWORK, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1719 [Define if you want to produce an OpenStep/Rhapsody framework
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1720 (shared library plus accessory files).])
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1721 AC_MSG_RESULT(yes)
54636
35c5c1e07a44 Merged revisions 73305 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54291
diff changeset
1722 if test $enable_shared = "yes"
35c5c1e07a44 Merged revisions 73305 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54291
diff changeset
1723 then
56283
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 56146
diff changeset
1724 AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README.])
54636
35c5c1e07a44 Merged revisions 73305 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54291
diff changeset
1725 fi
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1726 else
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1727 AC_MSG_RESULT(no)
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1728 fi
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1729
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1730 AC_MSG_CHECKING(for dyld)
19067
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
1731 case $ac_sys_system/$ac_sys_release in
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
1732 Darwin/*)
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1733 AC_DEFINE(WITH_DYLD, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1734 [Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1735 dynamic linker (dyld) instead of the old-style (NextStep) dynamic
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
1736 linker (rld). Dyld is necessary to support frameworks.])
19067
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
1737 AC_MSG_RESULT(always on for Darwin)
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
1738 ;;
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
1739 *)
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1740 AC_MSG_RESULT(no)
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1741 ;;
19067
d79865c0f804 Various fixes to streamline build process on Mac OS X:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19062
diff changeset
1742 esac
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1743
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1744 # Set info about shared libraries.
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1745 AC_SUBST(SO)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1746 AC_SUBST(LDSHARED)
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1747 AC_SUBST(LDCXXSHARED)
16626
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
1748 AC_SUBST(BLDSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1749 AC_SUBST(CCSHARED)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1750 AC_SUBST(LINKFORSHARED)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1751 # SO is the extension of shared libraries `(including the dot!)
15804
37819a777fc0 Part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15802
diff changeset
1752 # -- usually .so, .sl on HP-UX, .dll on Cygwin
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1753 AC_MSG_CHECKING(SO)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1754 if test -z "$SO"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1755 then
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1756 case $ac_sys_system in
38219
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
1757 hp*|HP*)
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
1758 case `uname -m` in
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
1759 ia64) SO=.so;;
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
1760 *) SO=.sl;;
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
1761 esac
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
1762 ;;
15804
37819a777fc0 Part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15802
diff changeset
1763 CYGWIN*) SO=.dll;;
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
1764 *) SO=.so;;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1765 esac
29466
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1766 else
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1767 # this might also be a termcap variable, see #610332
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1768 echo
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1769 echo '====================================================================='
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1770 echo '+ +'
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1771 echo '+ WARNING: You have set SO in your environment. +'
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1772 echo '+ Do you really mean to change the extension for shared libraries? +'
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1773 echo '+ Continuing in 10 seconds to let you to ponder. +'
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1774 echo '+ +'
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1775 echo '====================================================================='
3523ba92450c Give a warning if SO is set. Fixes #610332.
Martin v. Löwis <martin@v.loewis.de>
parents: 29460
diff changeset
1776 sleep 10
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1777 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1778 AC_MSG_RESULT($SO)
50436
cb3479ca81ac Backport of r68146
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 50004
diff changeset
1779
38219
cbf2d562e322 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
Neal Norwitz <nnorwitz@gmail.com>
parents: 38188
diff changeset
1780 AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libraries (including the dot!).])
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1781 # LDSHARED is the ld *command* used to create shared library
31384
5bbec8f1bf6d Remove support for SunOS 4.
Skip Montanaro <skip@pobox.com>
parents: 31381
diff changeset
1782 # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1783 # (Shared libraries in this instance are shared modules to be loaded into
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1784 # Python, as opposed to building Python itself as a shared library.)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1785 AC_MSG_CHECKING(LDSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1786 if test -z "$LDSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1787 then
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1788 case $ac_sys_system/$ac_sys_release in
16626
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
1789 AIX*)
68017
226f001a701f Merged revisions 88426 via svnmerge from
Georg Brandl <georg@python.org>
parents: 67315
diff changeset
1790 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
20143
b94bc7ec7be8 Fix SF bug 419062: building pbs on AIX 4.3.2
Guido van Rossum <guido@python.org>
parents: 19933
diff changeset
1791 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
16626
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
1792 ;;
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
1793 BeOS*)
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
1794 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
20143
b94bc7ec7be8 Fix SF bug 419062: building pbs on AIX 4.3.2
Guido van Rossum <guido@python.org>
parents: 19933
diff changeset
1795 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
16626
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
1796 ;;
5382
3f558a32c498 Added test for pthread.h.
Guido van Rossum <guido@python.org>
parents: 5207
diff changeset
1797 IRIX/5*) LDSHARED="ld -shared";;
6470
ee4f2b1ceeda Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Guido van Rossum <guido@python.org>
parents: 6466
diff changeset
1798 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
12767
9cbcad2e8723 When building on Solaris and the compiler is GCC, use '$(CC) -G' to
Greg Ward <gward@python.net>
parents: 12725
diff changeset
1799 SunOS/5*)
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1800 if test "$GCC" = "yes" ; then
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1801 LDSHARED='$(CC) -shared'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1802 LDCXXSHARED='$(CXX) -shared'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1803 else
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1804 LDSHARED='$(CC) -G'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1805 LDCXXSHARED='$(CXX) -G'
12767
9cbcad2e8723 When building on Solaris and the compiler is GCC, use '$(CC) -G' to
Greg Ward <gward@python.net>
parents: 12725
diff changeset
1806 fi ;;
46288
b28a2d25fd92 Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when gcc
Thomas Heller <theller@ctypes.org>
parents: 46154
diff changeset
1807 hp*|HP*)
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1808 if test "$GCC" = "yes" ; then
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1809 LDSHARED='$(CC) -shared'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1810 LDCXXSHARED='$(CXX) -shared'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1811 else
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1812 LDSHARED='ld -b'
46288
b28a2d25fd92 Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when gcc
Thomas Heller <theller@ctypes.org>
parents: 46154
diff changeset
1813 fi ;;
2245
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
1814 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
20972
ce69d4ee2fa0 OSX tests used specific version numbers to test for new features and
Jack Jansen <jack.jansen@cwi.nl>
parents: 20934
diff changeset
1815 Darwin/1.3*)
66527
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1816 LDSHARED='$(CC) -bundle'
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1817 LDCXXSHARED='$(CXX) -bundle'
19796
700fefdc03d2 (Slightly modified) patch by Steve Spicklemire to make Python build
Jack Jansen <jack.jansen@cwi.nl>
parents: 19741
diff changeset
1818 if test "$enable_framework" ; then
700fefdc03d2 (Slightly modified) patch by Steve Spicklemire to make Python build
Jack Jansen <jack.jansen@cwi.nl>
parents: 19741
diff changeset
1819 # Link against the framework. All externals should be defined.
34348
a8ecd4a96825 Patch #1097739 by Bob Ippolito:
Jack Jansen <jack.jansen@cwi.nl>
parents: 34343
diff changeset
1820 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
a8ecd4a96825 Patch #1097739 by Bob Ippolito:
Jack Jansen <jack.jansen@cwi.nl>
parents: 34343
diff changeset
1821 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1822 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
19796
700fefdc03d2 (Slightly modified) patch by Steve Spicklemire to make Python build
Jack Jansen <jack.jansen@cwi.nl>
parents: 19741
diff changeset
1823 else
700fefdc03d2 (Slightly modified) patch by Steve Spicklemire to make Python build
Jack Jansen <jack.jansen@cwi.nl>
parents: 19741
diff changeset
1824 # No framework. Ignore undefined symbols, assuming they come from Python
20972
ce69d4ee2fa0 OSX tests used specific version numbers to test for new features and
Jack Jansen <jack.jansen@cwi.nl>
parents: 20934
diff changeset
1825 LDSHARED="$LDSHARED -undefined suppress"
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1826 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
19796
700fefdc03d2 (Slightly modified) patch by Steve Spicklemire to make Python build
Jack Jansen <jack.jansen@cwi.nl>
parents: 19741
diff changeset
1827 fi ;;
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1828 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
66527
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1829 LDSHARED='$(CC) -bundle'
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1830 LDCXXSHARED='$(CXX) -bundle'
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1831 if test "$enable_framework" ; then
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1832 # Link against the framework. All externals should be defined.
34348
a8ecd4a96825 Patch #1097739 by Bob Ippolito:
Jack Jansen <jack.jansen@cwi.nl>
parents: 34343
diff changeset
1833 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
a8ecd4a96825 Patch #1097739 by Bob Ippolito:
Jack Jansen <jack.jansen@cwi.nl>
parents: 34343
diff changeset
1834 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1835 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1836 else
22159
71902e1cfbef Apply Jack's patch attached to
Michael W. Hudson <mwh@python.net>
parents: 22015
diff changeset
1837 # No framework, use the Python app as bundle-loader
71902e1cfbef Apply Jack's patch attached to
Michael W. Hudson <mwh@python.net>
parents: 22015
diff changeset
1838 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
28057
1a0c231c6b0c Refer to the Mac OS X bundle_loader by the altbininstall name, so that
Jack Jansen <jack.jansen@cwi.nl>
parents: 28035
diff changeset
1839 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1840 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1841 fi ;;
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1842 Darwin/*)
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1843 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1844 # This allows an extension to be used in any Python
48000
a29c86ce7668 #3381 fix framework builds on 10.4
Benjamin Peterson <benjamin@python.org>
parents: 47986
diff changeset
1845
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
1846 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1847 then
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
1848 if test "${enable_universalsdk}"; then
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47309
diff changeset
1849 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
38040
36c7a4422e30 Patch 1471883: --enable-universalsdk on Mac OS X
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 37714
diff changeset
1850 fi
66527
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1851 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1852 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1853 BLDSHARED="$LDSHARED"
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1854 else
66527
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1855 LDSHARED='$(CC) -bundle'
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1856 LDCXXSHARED='$(CXX) -bundle'
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1857 if test "$enable_framework" ; then
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1858 # Link against the framework. All externals should be defined.
34348
a8ecd4a96825 Patch #1097739 by Bob Ippolito:
Jack Jansen <jack.jansen@cwi.nl>
parents: 34343
diff changeset
1859 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
a8ecd4a96825 Patch #1097739 by Bob Ippolito:
Jack Jansen <jack.jansen@cwi.nl>
parents: 34343
diff changeset
1860 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1861 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1862 else
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1863 # No framework, use the Python app as bundle-loader
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1864 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1865 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1866 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
32218
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1867 fi
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1868 fi
fdf75eef6a5c Partial fix for #887242 (link extensions with dynamic_lookup in stead
Jack Jansen <jack.jansen@cwi.nl>
parents: 32008
diff changeset
1869 ;;
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1870 Linux*|GNU*|QNX*)
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1871 LDSHARED='$(CC) -shared'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1872 LDCXXSHARED='$(CXX) -shared';;
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1873 BSD/OS*/4*)
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1874 LDSHARED="gcc -shared"
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1875 LDCXXSHARED="g++ -shared";;
38548
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1876 FreeBSD*)
14305
e3779ee942d0 patch #101733: fix glitch in FreeBSD conf
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 14302
diff changeset
1877 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
14245
5994bb619163 Some cleanup for FreeBSD. This gets rid of version numbers and
Guido van Rossum <guido@python.org>
parents: 14222
diff changeset
1878 then
66527
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1879 LDSHARED='$(CC) -shared'
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1880 LDCXXSHARED='$(CXX) -shared'
14245
5994bb619163 Some cleanup for FreeBSD. This gets rid of version numbers and
Guido van Rossum <guido@python.org>
parents: 14222
diff changeset
1881 else
66527
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1882 LDSHARED="ld -Bshareable"
14245
5994bb619163 Some cleanup for FreeBSD. This gets rid of version numbers and
Guido van Rossum <guido@python.org>
parents: 14222
diff changeset
1883 fi;;
38548
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1884 OpenBSD*)
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1885 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1886 then
66527
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1887 LDSHARED='$(CC) -shared $(CCSHARED)'
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1888 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
38548
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1889 else
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1890 case `uname -r` in
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1891 [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1892 LDSHARED="ld -Bshareable ${LDFLAGS}"
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1893 ;;
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1894 *)
66527
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1895 LDSHARED='$(CC) -shared $(CCSHARED)'
c4aac8e69888 Merged revisions 85422 via svnmerge from
Stefan Krah <stefan@bytereef.org>
parents: 65853
diff changeset
1896 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
38548
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1897 ;;
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1898 esac
383cd94c2a67 Port to OpenBSD 3.9. Patch from Aldo Cortesi.
Martin v. Löwis <martin@v.loewis.de>
parents: 38349
diff changeset
1899 fi;;
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1900 NetBSD*|DragonFly*)
67269
eb954c765521 Merged revisions 87646 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 67260
diff changeset
1901 LDSHARED='$(CC) -shared'
eb954c765521 Merged revisions 87646 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 67260
diff changeset
1902 LDCXXSHARED='$(CXX) -shared';;
20301
3b3ee97633c1 Support OpenUNIX like UnixWare.
Martin v. Löwis <martin@v.loewis.de>
parents: 20299
diff changeset
1903 OpenUNIX*|UnixWare*)
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1904 if test "$GCC" = "yes" ; then
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1905 LDSHARED='$(CC) -shared'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1906 LDCXXSHARED='$(CXX) -shared'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1907 else
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1908 LDSHARED='$(CC) -G'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1909 LDCXXSHARED='$(CXX) -G'
17103
a38cce3f41b4 Use proper compiler flags on UnixWare.
Martin v. Löwis <martin@v.loewis.de>
parents: 17081
diff changeset
1910 fi;;
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1911 SCO_SV*)
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1912 LDSHARED='$(CC) -Wl,-G,-Bexport'
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1913 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1914 CYGWIN*)
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1915 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1916 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1917 atheos*)
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1918 LDSHARED="gcc -shared"
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1919 LDCXXSHARED="g++ -shared";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1920 *) LDSHARED="ld";;
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1921 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1922 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1923 AC_MSG_RESULT($LDSHARED)
60216
50b2c0fe5e27 Issue #1222585: Added LDCXXSHARED for C++ support
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 59993
diff changeset
1924 LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
16626
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
1925 BLDSHARED=${BLDSHARED-$LDSHARED}
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1926 # CCSHARED are the C *flags* used to create objects to go into a shared
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1927 # library (module) -- this is only needed for a few systems
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1928 AC_MSG_CHECKING(CCSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1929 if test -z "$CCSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1930 then
5382
3f558a32c498 Added test for pthread.h.
Guido van Rossum <guido@python.org>
parents: 5207
diff changeset
1931 case $ac_sys_system/$ac_sys_release in
16669
990fa25cde1c Use -G option for linking shared libraries on Solaris (SF patch #103656).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16627
diff changeset
1932 SunOS*) if test "$GCC" = yes;
41122
a7daa0218cf0 Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
Martin v. Löwis <martin@v.loewis.de>
parents: 40396
diff changeset
1933 then CCSHARED="-fPIC";
a7daa0218cf0 Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
Martin v. Löwis <martin@v.loewis.de>
parents: 40396
diff changeset
1934 elif test `uname -p` = sparc;
a7daa0218cf0 Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
Martin v. Löwis <martin@v.loewis.de>
parents: 40396
diff changeset
1935 then CCSHARED="-xcode=pic32";
a7daa0218cf0 Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
Martin v. Löwis <martin@v.loewis.de>
parents: 40396
diff changeset
1936 else CCSHARED="-Kpic";
a7daa0218cf0 Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
Martin v. Löwis <martin@v.loewis.de>
parents: 40396
diff changeset
1937 fi;;
2329
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
1938 hp*|HP*) if test "$GCC" = yes;
19721
7766ea724320 Use -fPIC instead of -fpic for gcc on HP/UX. Fixes bug #433234.
Martin v. Löwis <martin@v.loewis.de>
parents: 19720
diff changeset
1939 then CCSHARED="-fPIC";
2329
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
1940 else CCSHARED="+z";
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
1941 fi;;
21606
67da11293406 Patch #497098: build support for GNU/Hurd.
Martin v. Löwis <martin@v.loewis.de>
parents: 21285
diff changeset
1942 Linux*|GNU*) CCSHARED="-fPIC";;
11372
d919cf9fdd89 Dynamic linking support for BSD/OS 4.x as suggested by Vivek Khera
Guido van Rossum <guido@python.org>
parents: 11293
diff changeset
1943 BSD/OS*/4*) CCSHARED="-fpic";;
36543
36325caeff9c Patch #1432345: Make python compile on DragonFly.
Martin v. Löwis <martin@v.loewis.de>
parents: 36501
diff changeset
1944 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
20301
3b3ee97633c1 Support OpenUNIX like UnixWare.
Martin v. Löwis <martin@v.loewis.de>
parents: 20299
diff changeset
1945 OpenUNIX*|UnixWare*)
17103
a38cce3f41b4 Use proper compiler flags on UnixWare.
Martin v. Löwis <martin@v.loewis.de>
parents: 17081
diff changeset
1946 if test "$GCC" = "yes"
a38cce3f41b4 Use proper compiler flags on UnixWare.
Martin v. Löwis <martin@v.loewis.de>
parents: 17081
diff changeset
1947 then CCSHARED="-fPIC"
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
1948 else CCSHARED="-KPIC"
17103
a38cce3f41b4 Use proper compiler flags on UnixWare.
Martin v. Löwis <martin@v.loewis.de>
parents: 17081
diff changeset
1949 fi;;
25497
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
1950 SCO_SV*)
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
1951 if test "$GCC" = "yes"
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
1952 then CCSHARED="-fPIC"
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
1953 else CCSHARED="-Kpic -belf"
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
1954 fi;;
7558
22de5116832f Some changes because gcc on SGI doesn't support '-all'
Guido van Rossum <guido@python.org>
parents: 7524
diff changeset
1955 IRIX*/6*) case $CC in
22de5116832f Some changes because gcc on SGI doesn't support '-all'
Guido van Rossum <guido@python.org>
parents: 7524
diff changeset
1956 *gcc*) CCSHARED="-shared";;
8097
a6ce2dff2735 Remove bogus CCSHARED for cc on IRIX 6.x.
Guido van Rossum <guido@python.org>
parents: 8032
diff changeset
1957 *) CCSHARED="";;
7558
22de5116832f Some changes because gcc on SGI doesn't support '-all'
Guido van Rossum <guido@python.org>
parents: 7524
diff changeset
1958 esac;;
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
1959 atheos*) CCSHARED="-fPIC";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1960 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1961 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1962 AC_MSG_RESULT($CCSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1963 # LINKFORSHARED are the flags passed to the $(CC) command that links
2731
9f82a6bb0010 linux elf shlib; sys/wait.h; don't add -posix for NeXT
Guido van Rossum <guido@python.org>
parents: 2508
diff changeset
1964 # the python executable -- this is only needed for a few systems
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1965 AC_MSG_CHECKING(LINKFORSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1966 if test -z "$LINKFORSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
1967 then
5382
3f558a32c498 Added test for pthread.h.
Guido van Rossum <guido@python.org>
parents: 5207
diff changeset
1968 case $ac_sys_system/$ac_sys_release in
16626
611768349dd9 Simplify linking on AIX and BeOS (SF patch #103679).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16502
diff changeset
1969 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
4608
3ee87d082147 Test for sys/file.h.
Guido van Rossum <guido@python.org>
parents: 4268
diff changeset
1970 hp*|HP*)
22662
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
1971 LINKFORSHARED="-Wl,-E -Wl,+s";;
1aea7af09260 Patch #527027: Allow building python as shared library.
Martin v. Löwis <martin@v.loewis.de>
parents: 22611
diff changeset
1972 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
11372
d919cf9fdd89 Dynamic linking support for BSD/OS 4.x as suggested by Vivek Khera
Guido van Rossum <guido@python.org>
parents: 11293
diff changeset
1973 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
21606
67da11293406 Patch #497098: build support for GNU/Hurd.
Martin v. Löwis <martin@v.loewis.de>
parents: 21285
diff changeset
1974 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
9970
8efa37a770c6 Patches by William Lewis for Nextstep descendants.
Guido van Rossum <guido@python.org>
parents: 9856
diff changeset
1975 # -u libsys_s pulls in all symbols in libsys
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1976 Darwin/*)
33908
7ed899b61182 SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core
Raymond Hettinger <python@rcn.com>
parents: 33840
diff changeset
1977 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7ed899b61182 SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core
Raymond Hettinger <python@rcn.com>
parents: 33840
diff changeset
1978 # which is
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1979 # not used by the core itself but which needs to be in the core so
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1980 # that dynamically loaded extension modules have access to it.
28031
904a8b822daf Disabled -prebind again when linking the interpreter on MacOSX. It caused
Jack Jansen <jack.jansen@cwi.nl>
parents: 27977
diff changeset
1981 # -prebind is no longer used, because it actually seems to give a
904a8b822daf Disabled -prebind again when linking the interpreter on MacOSX. It caused
Jack Jansen <jack.jansen@cwi.nl>
parents: 27977
diff changeset
1982 # slowdown in stead of a speedup, maybe due to the large number of
904a8b822daf Disabled -prebind again when linking the interpreter on MacOSX. It caused
Jack Jansen <jack.jansen@cwi.nl>
parents: 27977
diff changeset
1983 # dynamic loads Python does.
33908
7ed899b61182 SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core
Raymond Hettinger <python@rcn.com>
parents: 33840
diff changeset
1984
7ed899b61182 SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core
Raymond Hettinger <python@rcn.com>
parents: 33840
diff changeset
1985 LINKFORSHARED="$extra_undefs"
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1986 if test "$enable_framework"
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1987 then
34348
a8ecd4a96825 Patch #1097739 by Bob Ippolito:
Jack Jansen <jack.jansen@cwi.nl>
parents: 34343
diff changeset
1988 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
1989 fi
33908
7ed899b61182 SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core
Raymond Hettinger <python@rcn.com>
parents: 33840
diff changeset
1990 LINKFORSHARED="$LINKFORSHARED";;
20301
3b3ee97633c1 Support OpenUNIX like UnixWare.
Martin v. Löwis <martin@v.loewis.de>
parents: 20299
diff changeset
1991 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
25497
b526e12b941b Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents: 25486
diff changeset
1992 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
14843
94c246e6399d Properly set LINKFORSHARED on Reliant UNIX. Problem and required linker
Fred Drake <fdrake@acm.org>
parents: 14807
diff changeset
1993 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
36543
36325caeff9c Patch #1432345: Make python compile on DragonFly.
Martin v. Löwis <martin@v.loewis.de>
parents: 36501
diff changeset
1994 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
9808
0bfaff11c573 Ty Sarna writes:
Guido van Rossum <guido@python.org>
parents: 9790
diff changeset
1995 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
0bfaff11c573 Ty Sarna writes:
Guido van Rossum <guido@python.org>
parents: 9790
diff changeset
1996 then
0bfaff11c573 Ty Sarna writes:
Guido van Rossum <guido@python.org>
parents: 9790
diff changeset
1997 LINKFORSHARED="-Wl,--export-dynamic"
0bfaff11c573 Ty Sarna writes:
Guido van Rossum <guido@python.org>
parents: 9790
diff changeset
1998 fi;;
7558
22de5116832f Some changes because gcc on SGI doesn't support '-all'
Guido van Rossum <guido@python.org>
parents: 7524
diff changeset
1999 SunOS/5*) case $CC in
22de5116832f Some changes because gcc on SGI doesn't support '-all'
Guido van Rossum <guido@python.org>
parents: 7524
diff changeset
2000 *gcc*)
23151
f769b4958e66 Test for --export-dynamic directly to avoid problems with binutils 2.12.
Martin v. Löwis <martin@v.loewis.de>
parents: 23084
diff changeset
2001 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
6920
afb1e8af7e4f Two unrelated changes:
Guido van Rossum <guido@python.org>
parents: 6739
diff changeset
2002 then
afb1e8af7e4f Two unrelated changes:
Guido van Rossum <guido@python.org>
parents: 6739
diff changeset
2003 LINKFORSHARED="-Xlinker --export-dynamic"
7558
22de5116832f Some changes because gcc on SGI doesn't support '-all'
Guido van Rossum <guido@python.org>
parents: 7524
diff changeset
2004 fi;;
22de5116832f Some changes because gcc on SGI doesn't support '-all'
Guido van Rossum <guido@python.org>
parents: 7524
diff changeset
2005 esac;;
30310
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
2006 CYGWIN*)
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
2007 if test $enable_shared = "no"
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
2008 then
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
2009 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
74bc3493ce03 This patch enables the building of Cygwin Python with a static core
Jason Tishler <jason@tishler.net>
parents: 30106
diff changeset
2010 fi;;
47227
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
2011 QNX*)
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
2012 # -Wl,-E causes the symbols to be added to the dynamic
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
2013 # symbol table so that they can be found when a module
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
2014 # is loaded. -N 2048K causes the stack size to be set
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
2015 # to 2048 kilobytes so that the stack doesn't overflow
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
2016 # when running test_compile.py.
5ec9528c93de Patch #1722225: Support QNX 6.
Martin v. Löwis <martin@v.loewis.de>
parents: 47219
diff changeset
2017 LINKFORSHARED='-Wl,-E -N 2048K';;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
2018 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
2019 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
2020 AC_MSG_RESULT($LINKFORSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
2021
47501
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47486
diff changeset
2022
16276
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
2023 AC_SUBST(CFLAGSFORSHARED)
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
2024 AC_MSG_CHECKING(CFLAGSFORSHARED)
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
2025 if test ! "$LIBRARY" = "$LDLIBRARY"
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
2026 then
16307
f84f8d81e32c - Remove Guido's LINKCC=CXX experiment.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16296
diff changeset
2027 case $ac_sys_system in
f84f8d81e32c - Remove Guido's LINKCC=CXX experiment.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16296
diff changeset
2028 CYGWIN*)
f84f8d81e32c - Remove Guido's LINKCC=CXX experiment.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16296
diff changeset
2029 # Cygwin needs CCSHARED when building extension DLLs
f84f8d81e32c - Remove Guido's LINKCC=CXX experiment.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16296
diff changeset
2030 # but not when building the interpreter DLL.
f84f8d81e32c - Remove Guido's LINKCC=CXX experiment.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16296
diff changeset
2031 CFLAGSFORSHARED='';;
f84f8d81e32c - Remove Guido's LINKCC=CXX experiment.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16296
diff changeset
2032 *)
f84f8d81e32c - Remove Guido's LINKCC=CXX experiment.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16296
diff changeset
2033 CFLAGSFORSHARED='$(CCSHARED)'
f84f8d81e32c - Remove Guido's LINKCC=CXX experiment.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16296
diff changeset
2034 esac
16276
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
2035 fi
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
2036 AC_MSG_RESULT($CFLAGSFORSHARED)
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
2037
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2038 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2039 # library (with --enable-shared).
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2040 # For platforms on which shared libraries are not allowed to have unresolved
24535
41895609d084 Always link libpython.so with LIBS. Fixes #589422.
Martin v. Löwis <martin@v.loewis.de>
parents: 24469
diff changeset
2041 # symbols, this must be set to $(LIBS) (expanded by make). We do this even
41895609d084 Always link libpython.so with LIBS. Fixes #589422.
Martin v. Löwis <martin@v.loewis.de>
parents: 24469
diff changeset
2042 # if it is not required, since it creates a dependency of the shared library
41895609d084 Always link libpython.so with LIBS. Fixes #589422.
Martin v. Löwis <martin@v.loewis.de>
parents: 24469
diff changeset
2043 # to LIBS. This, in turn, means that applications linking the shared libpython
41895609d084 Always link libpython.so with LIBS. Fixes #589422.
Martin v. Löwis <martin@v.loewis.de>
parents: 24469
diff changeset
2044 # don't need to link LIBS explicitly. The default should be only changed
41895609d084 Always link libpython.so with LIBS. Fixes #589422.
Martin v. Löwis <martin@v.loewis.de>
parents: 24469
diff changeset
2045 # on systems where this approach causes problems.
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2046 AC_SUBST(SHLIBS)
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2047 AC_MSG_CHECKING(SHLIBS)
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2048 case "$ac_sys_system" in
24535
41895609d084 Always link libpython.so with LIBS. Fixes #589422.
Martin v. Löwis <martin@v.loewis.de>
parents: 24469
diff changeset
2049 *)
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2050 SHLIBS='$(LIBS)';;
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2051 esac
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2052 AC_MSG_RESULT($SHLIBS)
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2053
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2054
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
2055 # checks for libraries
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
2056 AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
2057 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
30455
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2058
50004
3c7eef187bea Merged revisions 67398,67423-67424,67432,67440-67441,67444-67445,67454,67457,67463 via svnmerge from
Georg Brandl <georg@python.org>
parents: 49729
diff changeset
2059 # only check for sem_init if thread support is requested
30455
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2060 if test "$with_threads" = "yes" -o -z "$with_threads"; then
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2061 AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2062 # posix4 on Solaris 2.6
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2063 # pthread (first!) on Linux
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2064 fi
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2065
29471
4f076fc0195a Patch #752671: NetBSD needs to link libintl to _locale.so.
Martin v. Löwis <martin@v.loewis.de>
parents: 29469
diff changeset
2066 # check if we need libintl for locale functions
4f076fc0195a Patch #752671: NetBSD needs to link libintl to _locale.so.
Martin v. Löwis <martin@v.loewis.de>
parents: 29469
diff changeset
2067 AC_CHECK_LIB(intl, textdomain,
4f076fc0195a Patch #752671: NetBSD needs to link libintl to _locale.so.
Martin v. Löwis <martin@v.loewis.de>
parents: 29469
diff changeset
2068 AC_DEFINE(WITH_LIBINTL, 1,
4f076fc0195a Patch #752671: NetBSD needs to link libintl to _locale.so.
Martin v. Löwis <martin@v.loewis.de>
parents: 29469
diff changeset
2069 [Define to 1 if libintl is needed for locale functions.]))
11472
09d351882c51 Patch by Vladimir Marangozov, inspired by a bug report from Gary
Guido van Rossum <guido@python.org>
parents: 11372
diff changeset
2070
09d351882c51 Patch by Vladimir Marangozov, inspired by a bug report from Gary
Guido van Rossum <guido@python.org>
parents: 11372
diff changeset
2071 # checks for system dependent C++ extensions support
09d351882c51 Patch by Vladimir Marangozov, inspired by a bug report from Gary
Guido van Rossum <guido@python.org>
parents: 11372
diff changeset
2072 case "$ac_sys_system" in
09d351882c51 Patch by Vladimir Marangozov, inspired by a bug report from Gary
Guido van Rossum <guido@python.org>
parents: 11372
diff changeset
2073 AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2074 AC_LINK_IFELSE([
68018
34ae316318ef Merged revisions 88430,88438,88440 via svnmerge from
Georg Brandl <georg@python.org>
parents: 68017
diff changeset
2075 AC_LANG_PROGRAM([[#include <load.h>]],
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2076 [[loadAndInit("", 0, "")]])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2077 ],[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2078 AC_DEFINE(AIX_GENUINE_CPLUSPLUS, 1,
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2079 [Define for AIX if your compiler is a genuine IBM xlC/xlC_r
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2080 and you want support for AIX C++ shared extension modules.])
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2081 AC_MSG_RESULT(yes)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2082 ],[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2083 AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2084 ]);;
11472
09d351882c51 Patch by Vladimir Marangozov, inspired by a bug report from Gary
Guido van Rossum <guido@python.org>
parents: 11372
diff changeset
2085 *) ;;
09d351882c51 Patch by Vladimir Marangozov, inspired by a bug report from Gary
Guido van Rossum <guido@python.org>
parents: 11372
diff changeset
2086 esac
09d351882c51 Patch by Vladimir Marangozov, inspired by a bug report from Gary
Guido van Rossum <guido@python.org>
parents: 11372
diff changeset
2087
7744
c498451c5f56 Get rid of the check for -linet -- recent Sequent Dynix systems don't
Guido van Rossum <guido@python.org>
parents: 7573
diff changeset
2088 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
2089 # BeOS' sockets are stashed in libnet.
2161
f06222e07ca7 hopefully final changes for Sequent -linet
Guido van Rossum <guido@python.org>
parents: 2130
diff changeset
2090 AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
f06222e07ca7 hopefully final changes for Sequent -linet
Guido van Rossum <guido@python.org>
parents: 2130
diff changeset
2091 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
31381
e20fc1b80205 Remove support for DYNIX, IRIX 4, --with-sgi-dl, --with-dl-dld
Skip Montanaro <skip@pobox.com>
parents: 31380
diff changeset
2092
13733
ba36a9c3f477 Gregor Hoffleit: don't link with libnet on non-BeOS systems
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 13731
diff changeset
2093 case "$ac_sys_system" in
ba36a9c3f477 Gregor Hoffleit: don't link with libnet on non-BeOS systems
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 13731
diff changeset
2094 BeOS*)
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
2095 AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
2096 ;;
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
2097 esac
7744
c498451c5f56 Get rid of the check for -linet -- recent Sequent Dynix systems don't
Guido van Rossum <guido@python.org>
parents: 7573
diff changeset
2098
3891
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
2099 AC_MSG_CHECKING(for --with-libs)
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2100 AC_ARG_WITH(libs,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2101 AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2102 [
3891
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
2103 AC_MSG_RESULT($withval)
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
2104 LIBS="$withval $LIBS"
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2105 ],
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2106 [AC_MSG_RESULT(no)])
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
2107
59493
6d9be1a97c17 fix ugly configure output (follow up to #6943)
Benjamin Peterson <benjamin@python.org>
parents: 59491
diff changeset
2108 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6d9be1a97c17 fix ugly configure output (follow up to #6943)
Benjamin Peterson <benjamin@python.org>
parents: 59491
diff changeset
2109
58024
8fee2ab53e71 add a --with-system-expat option to build pyexpat against the system's lib #7609
Benjamin Peterson <benjamin@python.org>
parents: 57913
diff changeset
2110 # Check for use of the system expat library
8fee2ab53e71 add a --with-system-expat option to build pyexpat against the system's lib #7609
Benjamin Peterson <benjamin@python.org>
parents: 57913
diff changeset
2111 AC_MSG_CHECKING(for --with-system-expat)
8fee2ab53e71 add a --with-system-expat option to build pyexpat against the system's lib #7609
Benjamin Peterson <benjamin@python.org>
parents: 57913
diff changeset
2112 AC_ARG_WITH(system_expat,
65825
5c5b7a9bac05 Merged revisions 86042 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65386
diff changeset
2113 AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]),
5c5b7a9bac05 Merged revisions 86042 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65386
diff changeset
2114 [],
5c5b7a9bac05 Merged revisions 86042 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65386
diff changeset
2115 [with_system_expat="no"])
58024
8fee2ab53e71 add a --with-system-expat option to build pyexpat against the system's lib #7609
Benjamin Peterson <benjamin@python.org>
parents: 57913
diff changeset
2116
8fee2ab53e71 add a --with-system-expat option to build pyexpat against the system's lib #7609
Benjamin Peterson <benjamin@python.org>
parents: 57913
diff changeset
2117 AC_MSG_RESULT($with_system_expat)
8fee2ab53e71 add a --with-system-expat option to build pyexpat against the system's lib #7609
Benjamin Peterson <benjamin@python.org>
parents: 57913
diff changeset
2118
37605
e070c316eb45 Patch #1464444: Add --with-system-ffi.
Martin v. Löwis <martin@v.loewis.de>
parents: 37592
diff changeset
2119 # Check for use of the system libffi library
e070c316eb45 Patch #1464444: Add --with-system-ffi.
Martin v. Löwis <martin@v.loewis.de>
parents: 37592
diff changeset
2120 AC_MSG_CHECKING(for --with-system-ffi)
e070c316eb45 Patch #1464444: Add --with-system-ffi.
Martin v. Löwis <martin@v.loewis.de>
parents: 37592
diff changeset
2121 AC_ARG_WITH(system_ffi,
65825
5c5b7a9bac05 Merged revisions 86042 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65386
diff changeset
2122 AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library]),
5c5b7a9bac05 Merged revisions 86042 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65386
diff changeset
2123 [],
5c5b7a9bac05 Merged revisions 86042 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65386
diff changeset
2124 [with_system_ffi="no"])
37605
e070c316eb45 Patch #1464444: Add --with-system-ffi.
Martin v. Löwis <martin@v.loewis.de>
parents: 37592
diff changeset
2125
59493
6d9be1a97c17 fix ugly configure output (follow up to #6943)
Benjamin Peterson <benjamin@python.org>
parents: 59491
diff changeset
2126 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
58064
f02881332342 use pkg-config to find the libffi headers when --with-system-ffi is used #6943
Benjamin Peterson <benjamin@python.org>
parents: 58047
diff changeset
2127 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
f02881332342 use pkg-config to find the libffi headers when --with-system-ffi is used #6943
Benjamin Peterson <benjamin@python.org>
parents: 58047
diff changeset
2128 else
f02881332342 use pkg-config to find the libffi headers when --with-system-ffi is used #6943
Benjamin Peterson <benjamin@python.org>
parents: 58047
diff changeset
2129 LIBFFI_INCLUDEDIR=""
f02881332342 use pkg-config to find the libffi headers when --with-system-ffi is used #6943
Benjamin Peterson <benjamin@python.org>
parents: 58047
diff changeset
2130 fi
f02881332342 use pkg-config to find the libffi headers when --with-system-ffi is used #6943
Benjamin Peterson <benjamin@python.org>
parents: 58047
diff changeset
2131 AC_SUBST(LIBFFI_INCLUDEDIR)
37605
e070c316eb45 Patch #1464444: Add --with-system-ffi.
Martin v. Löwis <martin@v.loewis.de>
parents: 37592
diff changeset
2132
e070c316eb45 Patch #1464444: Add --with-system-ffi.
Martin v. Löwis <martin@v.loewis.de>
parents: 37592
diff changeset
2133 AC_MSG_RESULT($with_system_ffi)
e070c316eb45 Patch #1464444: Add --with-system-ffi.
Martin v. Löwis <martin@v.loewis.de>
parents: 37592
diff changeset
2134
53602
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2135 # Check for --with-dbmliborder
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2136 AC_MSG_CHECKING(for --with-dbmliborder)
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2137 AC_ARG_WITH(dbmliborder,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2138 AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [order to check db backends for dbm. Valid value is a colon separated string with the backend names `ndbm', `gdbm' and `bdb'.]),
53602
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2139 [
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2140 if test x$with_dbmliborder = xyes
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2141 then
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2142 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2143 else
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2144 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2145 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2146 then
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2147 AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2148 fi
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2149 done
53606
a3814dc99b80 - configure.in: Don't error, when no --with-dbmliborder option is present
Matthias Klose <doko@ubuntu.com>
parents: 53605
diff changeset
2150 fi])
a3814dc99b80 - configure.in: Don't error, when no --with-dbmliborder option is present
Matthias Klose <doko@ubuntu.com>
parents: 53605
diff changeset
2151 AC_MSG_RESULT($with_dbmliborder)
53602
2ef2cb5773fe - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
Matthias Klose <doko@ubuntu.com>
parents: 53227
diff changeset
2152
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2153 # Determine if signalmodule should be used.
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2154 AC_SUBST(USE_SIGNAL_MODULE)
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2155 AC_SUBST(SIGNAL_OBJS)
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2156 AC_MSG_CHECKING(for --with-signal-module)
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2157 AC_ARG_WITH(signal-module,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2158 AS_HELP_STRING([--with-signal-module], [disable/enable signal module]))
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2159
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2160 if test -z "$with_signal_module"
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2161 then with_signal_module="yes"
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2162 fi
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2163 AC_MSG_RESULT($with_signal_module)
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2164
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2165 if test "${with_signal_module}" = "yes"; then
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2166 USE_SIGNAL_MODULE=""
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2167 SIGNAL_OBJS=""
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2168 else
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2169 USE_SIGNAL_MODULE="#"
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2170 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2171 fi
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
2172
15798
d027e85e209f Adapted version of Eric Raymond's patches to automatically configure
Guido van Rossum <guido@python.org>
parents: 15766
diff changeset
2173 # This is used to generate Setup.config
6739
1d4175ed6a9c When --with-thread(s) is specified, the thread module is now automatically
Guido van Rossum <guido@python.org>
parents: 6709
diff changeset
2174 AC_SUBST(USE_THREAD_MODULE)
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2175 USE_THREAD_MODULE=""
6739
1d4175ed6a9c When --with-thread(s) is specified, the thread module is now automatically
Guido van Rossum <guido@python.org>
parents: 6709
diff changeset
2176
5034
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2177 AC_MSG_CHECKING(for --with-dec-threads)
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2178 AC_SUBST(LDLAST)
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2179 AC_ARG_WITH(dec-threads,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2180 AS_HELP_STRING([--with-dec-threads], [use DEC Alpha/OSF1 thread-safe libraries]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2181 [
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2182 AC_MSG_RESULT($withval)
5034
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2183 LDLAST=-threads
5024
7e5190999633 Let --with-threads be an alias for --with-thread.
Guido van Rossum <guido@python.org>
parents: 4850
diff changeset
2184 if test "${with_thread+set}" != set; then
5034
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2185 with_thread="$withval";
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2186 fi],
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2187 [AC_MSG_RESULT(no)])
5034
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2188
22989
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2189 # Templates for things AC_DEFINEd more than once.
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2190 # For a single AC_DEFINE, no template is needed.
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2191 AH_TEMPLATE(C_THREADS,[Define if you have the Mach cthreads package])
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2192 AH_TEMPLATE(_REENTRANT,
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2193 [Define to force use of thread-safe errno, h_errno, and other functions])
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2194 AH_TEMPLATE(WITH_THREAD,
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2195 [Define if you want to compile in rudimentary thread support])
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2196
5034
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2197 AC_MSG_CHECKING(for --with-threads)
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2198 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2199 AC_ARG_WITH(threads,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2200 AS_HELP_STRING([--with(out)-threads@<:@=DIRECTORY@:>@], [disable/enable thread support]))
5034
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
2201
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2202 # --with-thread is deprecated, but check for it anyway
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2203 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
13231
209eb44cdbf7 Document --with-thread as deprecated. This gets rid of the annoying
Barry Warsaw <barry@python.org>
parents: 13228
diff changeset
2204 AC_ARG_WITH(thread,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2205 AS_HELP_STRING([--with(out)-thread@<:@=DIRECTORY@:>@], [deprecated; use --with(out)-threads]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2206 [with_threads=$with_thread])
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2207
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2208 if test -z "$with_threads"
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2209 then with_threads="yes"
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
2210 fi
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2211 AC_MSG_RESULT($with_threads)
5596
2e2bbe985620 DG/UX specific test for threads.
Guido van Rossum <guido@python.org>
parents: 5590
diff changeset
2212
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2213 AC_SUBST(THREADOBJ)
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2214 if test "$with_threads" = "no"
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2215 then
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2216 USE_THREAD_MODULE="#"
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2217 elif test "$ac_cv_pthread_is_default" = yes
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2218 then
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2219 AC_DEFINE(WITH_THREAD)
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2220 # Defining _REENTRANT on system with POSIX threads should not hurt.
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2221 AC_DEFINE(_REENTRANT)
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2222 posix_threads=yes
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2223 THREADOBJ="Python/thread.o"
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2224 elif test "$ac_cv_kpthread" = "yes"
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2225 then
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2226 CC="$CC -Kpthread"
30455
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2227 if test "$ac_cv_cxx_thread" = "yes"; then
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2228 CXX="$CXX -Kpthread"
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2229 fi
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2230 AC_DEFINE(WITH_THREAD)
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2231 posix_threads=yes
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2232 THREADOBJ="Python/thread.o"
28975
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
2233 elif test "$ac_cv_kthread" = "yes"
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
2234 then
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
2235 CC="$CC -Kthread"
30455
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2236 if test "$ac_cv_cxx_thread" = "yes"; then
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2237 CXX="$CXX -Kthread"
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2238 fi
28975
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
2239 AC_DEFINE(WITH_THREAD)
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
2240 posix_threads=yes
3e88cff05822 Patch #732234: Check for -Kthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 28960
diff changeset
2241 THREADOBJ="Python/thread.o"
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2242 elif test "$ac_cv_pthread" = "yes"
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2243 then
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2244 CC="$CC -pthread"
30455
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2245 if test "$ac_cv_cxx_thread" = "yes"; then
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2246 CXX="$CXX -pthread"
bba7e1e0f1c7 Patch #805604: Do not check for sem_init, do not use -Kthread,
Martin v. Löwis <martin@v.loewis.de>
parents: 30451
diff changeset
2247 fi
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2248 AC_DEFINE(WITH_THREAD)
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2249 posix_threads=yes
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2250 THREADOBJ="Python/thread.o"
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2251 else
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2252 if test ! -z "$with_threads" -a -d "$with_threads"
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2253 then LDFLAGS="$LDFLAGS -L$with_threads"
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2254 fi
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2255 if test ! -z "$withval" -a -d "$withval"
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2256 then LDFLAGS="$LDFLAGS -L$withval"
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2257 fi
20431
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2258
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2259 # According to the POSIX spec, a pthreads implementation must
33145
28a205ecb4dd The attached patch fixes FTBFS on GNU/k*BSD. The problem happens on GNU/k*BSD
Matthias Klose <doko@ubuntu.com>
parents: 33135
diff changeset
2260 # define _POSIX_THREADS in unistd.h. Some apparently don't
28a205ecb4dd The attached patch fixes FTBFS on GNU/k*BSD. The problem happens on GNU/k*BSD
Matthias Klose <doko@ubuntu.com>
parents: 33135
diff changeset
2261 # (e.g. gnu pth with pthread emulation)
20431
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2262 AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h)
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2263 AC_EGREP_CPP(yes,
28035
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
2264 [
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
2265 #include <unistd.h>
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
2266 #ifdef _POSIX_THREADS
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
2267 yes
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
2268 #endif
20431
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2269 ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2270 AC_MSG_RESULT($unistd_defines_pthreads)
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2271
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2272 AC_DEFINE(_REENTRANT)
21606
67da11293406 Patch #497098: build support for GNU/Hurd.
Martin v. Löwis <martin@v.loewis.de>
parents: 21285
diff changeset
2273 AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
67da11293406 Patch #497098: build support for GNU/Hurd.
Martin v. Löwis <martin@v.loewis.de>
parents: 21285
diff changeset
2274 AC_DEFINE(C_THREADS)
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2275 AC_DEFINE(HURD_C_THREADS, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2276 [Define if you are using Mach cthreads directly under /include])
21606
67da11293406 Patch #497098: build support for GNU/Hurd.
Martin v. Löwis <martin@v.loewis.de>
parents: 21285
diff changeset
2277 LIBS="$LIBS -lthreads"
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2278 THREADOBJ="Python/thread.o"],[
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2279 AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2280 AC_DEFINE(C_THREADS)
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2281 AC_DEFINE(MACH_C_THREADS, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2282 [Define if you are using Mach cthreads under mach /])
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2283 THREADOBJ="Python/thread.o"],[
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2284 AC_MSG_CHECKING(for --with-pth)
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2285 AC_ARG_WITH([pth],
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2286 AS_HELP_STRING([--with-pth], [use GNU pth threading libraries]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2287 [AC_MSG_RESULT($withval)
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2288 AC_DEFINE([WITH_THREAD])
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2289 AC_DEFINE([HAVE_PTH], 1,
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2290 [Define if you have GNU PTH threads.])
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2291 LIBS="-lpth $LIBS"
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2292 THREADOBJ="Python/thread.o"],
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2293 [AC_MSG_RESULT(no)
20312
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2294
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2295 # Just looking for pthread_create in libpthread is not enough:
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2296 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2297 # So we really have to include pthread.h, and then link.
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2298 _libs=$LIBS
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2299 LIBS="$LIBS -lpthread"
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2300 AC_MSG_CHECKING([for pthread_create in -lpthread])
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2301 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2302
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2303 void * start_routine (void *arg) { exit (0); }]], [[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2304 pthread_create (NULL, NULL, start_routine, NULL)]])],[
20312
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2305 AC_MSG_RESULT(yes)
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2306 AC_DEFINE(WITH_THREAD)
20431
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2307 posix_threads=yes
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2308 THREADOBJ="Python/thread.o"],[
20312
3393d6f807f5 Provide explicit program when trying to link pthread_create.
Martin v. Löwis <martin@v.loewis.de>
parents: 20301
diff changeset
2309 LIBS=$_libs
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2310 AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
20431
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2311 posix_threads=yes
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2312 THREADOBJ="Python/thread.o"],[
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2313 AC_CHECK_HEADER(atheos/threads.h, [AC_DEFINE(WITH_THREAD)
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2314 AC_DEFINE(ATHEOS_THREADS, 1,
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2315 [Define this if you have AtheOS threads.])
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2316 THREADOBJ="Python/thread.o"],[
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2317 AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD)
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2318 AC_DEFINE(BEOS_THREADS, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2319 [Define this if you have BeOS threads.])
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2320 THREADOBJ="Python/thread.o"],[
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2321 AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2322 posix_threads=yes
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2323 LIBS="$LIBS -lpthreads"
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2324 THREADOBJ="Python/thread.o"], [
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2325 AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD)
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2326 posix_threads=yes
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2327 LIBS="$LIBS -lc_r"
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2328 THREADOBJ="Python/thread.o"], [
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2329 AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2330 posix_threads=yes
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2331 LIBS="$LIBS -lpthread"
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2332 THREADOBJ="Python/thread.o"], [
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2333 AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2334 posix_threads=yes
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2335 LIBS="$LIBS -lcma"
22847
f6093bac9fb6 Eliminate use of LIBOBJS which is an error in autoconf 2.53.
Martin v. Löwis <martin@v.loewis.de>
parents: 22662
diff changeset
2336 THREADOBJ="Python/thread.o"],[
18730
335e75bcb51a Patch #418659: Fixes for UnixWare and ReliantUnix.
Martin v. Löwis <martin@v.loewis.de>
parents: 18690
diff changeset
2337 USE_THREAD_MODULE="#"])
31380
67a1eead72ba Remove support for systems defining __d6_pthread_create.
Skip Montanaro <skip@pobox.com>
parents: 31379
diff changeset
2338 ])])])])])])])])])])
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
2339
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2340 AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2341 LIBS="$LIBS -lmpc"
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2342 THREADOBJ="Python/thread.o"
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2343 USE_THREAD_MODULE=""])
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2344
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2345 if test "$posix_threads" != "yes"; then
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2346 AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2347 LIBS="$LIBS -lthread"
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2348 THREADOBJ="Python/thread.o"
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2349 USE_THREAD_MODULE=""])
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2350 fi
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2351
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2352 if test "$USE_THREAD_MODULE" != "#"
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2353 then
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2354 # If the above checks didn't disable threads, (at least) OSF1
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2355 # needs this '-threads' argument during linking.
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2356 case $ac_sys_system in
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2357 OSF1) LDLAST=-threads;;
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2358 esac
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2359 fi
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2360 fi
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2361
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2362 if test "$posix_threads" = "yes"; then
20431
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2363 if test "$unistd_defines_pthreads" = "no"; then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2364 AC_DEFINE(_POSIX_THREADS, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2365 [Define if you have POSIX threads,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2366 and your system does not define that.])
20431
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2367 fi
cee0fe5fce11 Do not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis <martin@v.loewis.de>
parents: 20428
diff changeset
2368
27320
1562c1e10b49 Don't use Posix semaphores on Solaris 8. Fixes #662787.
Martin v. Löwis <martin@v.loewis.de>
parents: 27313
diff changeset
2369 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
1562c1e10b49 Don't use Posix semaphores on Solaris 8. Fixes #662787.
Martin v. Löwis <martin@v.loewis.de>
parents: 27313
diff changeset
2370 case $ac_sys_system/$ac_sys_release in
71447
f5a7d413638d Issue #12372: POSIX semaphores are broken on AIX: don't use them.
Charles-François Natali <neologix@free.fr>
parents: 71030
diff changeset
2371 SunOS/5.6) AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1,
60924
f4fe53f86627 - Issue #8509: Fix quoting in help strings and code snippets in configure.in.
Matthias Klose <doko@ubuntu.com>
parents: 60694
diff changeset
2372 [Defined for Solaris 2.6 bug in pthread header.])
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2373 ;;
27320
1562c1e10b49 Don't use Posix semaphores on Solaris 8. Fixes #662787.
Martin v. Löwis <martin@v.loewis.de>
parents: 27313
diff changeset
2374 SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
60924
f4fe53f86627 - Issue #8509: Fix quoting in help strings and code snippets in configure.in.
Matthias Klose <doko@ubuntu.com>
parents: 60694
diff changeset
2375 [Define if the Posix semaphores do not work on your system])
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2376 ;;
71447
f5a7d413638d Issue #12372: POSIX semaphores are broken on AIX: don't use them.
Charles-François Natali <neologix@free.fr>
parents: 71030
diff changeset
2377 AIX/*) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
60924
f4fe53f86627 - Issue #8509: Fix quoting in help strings and code snippets in configure.in.
Matthias Klose <doko@ubuntu.com>
parents: 60694
diff changeset
2378 [Define if the Posix semaphores do not work on your system])
45064
e8476aef857c Bug #1234: Fixed semaphore errors on AIX 5.2
Christian Heimes <christian@cheimes.de>
parents: 44386
diff changeset
2379 ;;
27320
1562c1e10b49 Don't use Posix semaphores on Solaris 8. Fixes #662787.
Martin v. Löwis <martin@v.loewis.de>
parents: 27313
diff changeset
2380 esac
1562c1e10b49 Don't use Posix semaphores on Solaris 8. Fixes #662787.
Martin v. Löwis <martin@v.loewis.de>
parents: 27313
diff changeset
2381
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2382 AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2383 AC_CACHE_VAL(ac_cv_pthread_system_supported,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2384 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h>
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2385 void *foo(void *parm) {
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2386 return NULL;
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2387 }
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2388 main() {
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2389 pthread_attr_t attr;
22015
4eb81869f619 Patch #510825: PTHREAD_SCOPE_SYSTEM support for HP-UX
Martin v. Löwis <martin@v.loewis.de>
parents: 21966
diff changeset
2390 pthread_t id;
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2391 if (pthread_attr_init(&attr)) exit(-1);
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2392 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
22015
4eb81869f619 Patch #510825: PTHREAD_SCOPE_SYSTEM support for HP-UX
Martin v. Löwis <martin@v.loewis.de>
parents: 21966
diff changeset
2393 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2394 exit(0);
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2395 }]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2396 [ac_cv_pthread_system_supported=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2397 [ac_cv_pthread_system_supported=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2398 [ac_cv_pthread_system_supported=no])
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2399 ])
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2400 AC_MSG_RESULT($ac_cv_pthread_system_supported)
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2401 if test "$ac_cv_pthread_system_supported" = "yes"; then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2402 AC_DEFINE(PTHREAD_SYSTEM_SCHED_SUPPORTED, 1, [Defined if PTHREAD_SCOPE_SYSTEM supported.])
19826
8ef456949b76 Improve threading on Solaris, according to SF patch #460269, submitted
Guido van Rossum <guido@python.org>
parents: 19818
diff changeset
2403 fi
29972
a408ac5527c3 Patch 775605: Cygwin pthread_sigmask() workaround patch
Jason Tishler <jason@tishler.net>
parents: 29838
diff changeset
2404 AC_CHECK_FUNCS(pthread_sigmask,
a408ac5527c3 Patch 775605: Cygwin pthread_sigmask() workaround patch
Jason Tishler <jason@tishler.net>
parents: 29838
diff changeset
2405 [case $ac_sys_system in
a408ac5527c3 Patch 775605: Cygwin pthread_sigmask() workaround patch
Jason Tishler <jason@tishler.net>
parents: 29838
diff changeset
2406 CYGWIN*)
a408ac5527c3 Patch 775605: Cygwin pthread_sigmask() workaround patch
Jason Tishler <jason@tishler.net>
parents: 29838
diff changeset
2407 AC_DEFINE(HAVE_BROKEN_PTHREAD_SIGMASK, 1,
a408ac5527c3 Patch 775605: Cygwin pthread_sigmask() workaround patch
Jason Tishler <jason@tishler.net>
parents: 29838
diff changeset
2408 [Define if pthread_sigmask() does not work on your system.])
a408ac5527c3 Patch 775605: Cygwin pthread_sigmask() workaround patch
Jason Tishler <jason@tishler.net>
parents: 29838
diff changeset
2409 ;;
a408ac5527c3 Patch 775605: Cygwin pthread_sigmask() workaround patch
Jason Tishler <jason@tishler.net>
parents: 29838
diff changeset
2410 esac])
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2411 fi
15245
e4ea44b10abb Patch #101936: Auto-detect DEC threads (which need "-threads" argument)
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15176
diff changeset
2412
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
2413
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2414 # Check for enable-ipv6
22989
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
2415 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
19720
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2416 AC_MSG_CHECKING([if --enable-ipv6 is specified])
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2417 AC_ARG_ENABLE(ipv6,
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2418 [ --enable-ipv6 Enable ipv6 (with ipv4) support
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2419 --disable-ipv6 Disable ipv6 support],
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2420 [ case "$enableval" in
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2421 no)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2422 AC_MSG_RESULT(no)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2423 ipv6=no
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2424 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2425 *) AC_MSG_RESULT(yes)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2426 AC_DEFINE(ENABLE_IPV6)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2427 ipv6=yes
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2428 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2429 esac ],
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2430
19720
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2431 [
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2432 dnl the check does not work on cross compilation case...
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2433 AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 available check */
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2434 #include <sys/types.h>
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2435 #include <sys/socket.h>
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2436 main()
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2437 {
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2438 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2439 exit(1);
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2440 else
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2441 exit(0);
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2442 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2443 ]])],[
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2444 AC_MSG_RESULT(yes)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2445 ipv6=yes
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2446 ],[
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2447 AC_MSG_RESULT(no)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2448 ipv6=no
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2449 ],[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2450 AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2451 ipv6=no
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2452 ])
19720
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2453
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2454 if test "$ipv6" = "yes"; then
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2455 AC_MSG_CHECKING(if RFC2553 API is available)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2456 AC_COMPILE_IFELSE([
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2457 AC_LANG_PROGRAM([[#include <sys/types.h>
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2458 #include <netinet/in.h>]],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2459 [[struct sockaddr_in6 x;
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2460 x.sin6_scope_id;]])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2461 ],[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2462 AC_MSG_RESULT(yes)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2463 ipv6=yes
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2464 ],[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2465 AC_MSG_RESULT(no, IPv6 disabled)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2466 ipv6=no
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2467 ])
19720
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2468 fi
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2469
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2470 if test "$ipv6" = "yes"; then
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2471 AC_DEFINE(ENABLE_IPV6)
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2472 fi
a684b4c10128 Check for RFC 2553 API. Fixes bug #454493.
Martin v. Löwis <martin@v.loewis.de>
parents: 19574
diff changeset
2473 ])
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2474
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2475 ipv6type=unknown
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2476 ipv6lib=none
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2477 ipv6trylibc=no
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2478
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2479 if test "$ipv6" = "yes"; then
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2480 AC_MSG_CHECKING([ipv6 stack type])
19732
b7dc5159448f Changes to automatically enable large file support on some systems.
Guido van Rossum <guido@python.org>
parents: 19728
diff changeset
2481 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
b7dc5159448f Changes to automatically enable large file support on some systems.
Guido van Rossum <guido@python.org>
parents: 19728
diff changeset
2482 do
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2483 case $i in
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2484 inria)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2485 dnl http://www.kame.net/
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2486 AC_EGREP_CPP(yes, [
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2487 #include <netinet/in.h>
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2488 #ifdef IPV6_INRIA_VERSION
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2489 yes
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2490 #endif],
21128
15ff504632ed Remove INET6 define. Use ENABLE_IPV6 instead.
Martin v. Löwis <martin@v.loewis.de>
parents: 20972
diff changeset
2491 [ipv6type=$i])
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2492 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2493 kame)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2494 dnl http://www.kame.net/
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2495 AC_EGREP_CPP(yes, [
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2496 #include <netinet/in.h>
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2497 #ifdef __KAME__
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2498 yes
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2499 #endif],
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2500 [ipv6type=$i;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2501 ipv6lib=inet6
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2502 ipv6libdir=/usr/local/v6/lib
21128
15ff504632ed Remove INET6 define. Use ENABLE_IPV6 instead.
Martin v. Löwis <martin@v.loewis.de>
parents: 20972
diff changeset
2503 ipv6trylibc=yes])
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2504 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2505 linux-glibc)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2506 dnl http://www.v6.linux.or.jp/
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2507 AC_EGREP_CPP(yes, [
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2508 #include <features.h>
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2509 #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2510 yes
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2511 #endif],
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2512 [ipv6type=$i;
21128
15ff504632ed Remove INET6 define. Use ENABLE_IPV6 instead.
Martin v. Löwis <martin@v.loewis.de>
parents: 20972
diff changeset
2513 ipv6trylibc=yes])
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2514 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2515 linux-inet6)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2516 dnl http://www.v6.linux.or.jp/
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2517 if test -d /usr/inet6; then
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2518 ipv6type=$i
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2519 ipv6lib=inet6
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2520 ipv6libdir=/usr/inet6/lib
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
2521 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2522 fi
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2523 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2524 solaris)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2525 if test -f /etc/netconfig; then
67315
b0b4414c0bdc Merged revisions 87698 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 67269
diff changeset
2526 if $GREP -q tcp6 /etc/netconfig; then
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2527 ipv6type=$i
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2528 ipv6trylibc=yes
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2529 fi
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2530 fi
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2531 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2532 toshiba)
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2533 AC_EGREP_CPP(yes, [
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2534 #include <sys/param.h>
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2535 #ifdef _TOSHIBA_INET6
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2536 yes
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2537 #endif],
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2538 [ipv6type=$i;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2539 ipv6lib=inet6;
21128
15ff504632ed Remove INET6 define. Use ENABLE_IPV6 instead.
Martin v. Löwis <martin@v.loewis.de>
parents: 20972
diff changeset
2540 ipv6libdir=/usr/local/v6/lib])
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2541 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2542 v6d)
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2543 AC_EGREP_CPP(yes, [
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2544 #include </usr/local/v6/include/sys/v6config.h>
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2545 #ifdef __V6D__
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2546 yes
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2547 #endif],
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2548 [ipv6type=$i;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2549 ipv6lib=v6;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2550 ipv6libdir=/usr/local/v6/lib;
27002
293eda3e69f5 Split OPT make variable into OPT and BASECFLAGS. The latter contains those
Skip Montanaro <skip@pobox.com>
parents: 26998
diff changeset
2551 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2552 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2553 zeta)
20428
632b9d3a8d1a Check whether pthreads are available without any options before checking
Martin v. Löwis <martin@v.loewis.de>
parents: 20413
diff changeset
2554 AC_EGREP_CPP(yes, [
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2555 #include <sys/param.h>
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2556 #ifdef _ZETA_MINAMI_INET6
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2557 yes
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2558 #endif],
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2559 [ipv6type=$i;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2560 ipv6lib=inet6;
21128
15ff504632ed Remove INET6 define. Use ENABLE_IPV6 instead.
Martin v. Löwis <martin@v.loewis.de>
parents: 20972
diff changeset
2561 ipv6libdir=/usr/local/v6/lib])
19091
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2562 ;;
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2563 esac
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2564 if test "$ipv6type" != "unknown"; then
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2565 break
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2566 fi
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2567 done
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2568 AC_MSG_RESULT($ipv6type)
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2569 fi
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2570
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2571 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2572 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2573 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2574 echo "using lib$ipv6lib"
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2575 else
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2576 if test $ipv6trylibc = "yes"; then
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2577 echo "using libc"
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2578 else
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2579 echo 'Fatal: no $ipv6lib library found. cannot continue.'
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2580 echo "You need to fetch lib$ipv6lib.a from appropriate"
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2581 echo 'ipv6 kit and compile beforehand.'
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2582 exit 1
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2583 fi
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2584 fi
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2585 fi
6faed615b058 Move IPv6 test further down so that usage of -lnsl has been tested.
Martin v. Löwis <martin@v.loewis.de>
parents: 19090
diff changeset
2586
47501
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47486
diff changeset
2587 AC_MSG_CHECKING(for OSX 10.5 SDK or later)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2588 AC_COMPILE_IFELSE([
61438
4da7fba3370f Fix configure bug that was misreporting availability of MacOS X 10.5 SDK as available on Linux but not on OS X.
Mark Dickinson <dickinsm@gmail.com>
parents: 61405
diff changeset
2589 AC_LANG_PROGRAM([[#include <Carbon/Carbon.h>]], [[FSIORefNum fRef = 0]])
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2590 ],[
60924
f4fe53f86627 - Issue #8509: Fix quoting in help strings and code snippets in configure.in.
Matthias Klose <doko@ubuntu.com>
parents: 60694
diff changeset
2591 AC_DEFINE(HAVE_OSX105_SDK, 1, [Define if compiling using MacOS X 10.5 SDK or later.])
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2592 AC_MSG_RESULT(yes)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2593 ],[
47501
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47486
diff changeset
2594 AC_MSG_RESULT(no)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2595 ])
47501
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47486
diff changeset
2596
23746
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2597 # Check for --with-doc-strings
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2598 AC_MSG_CHECKING(for --with-doc-strings)
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2599 AC_ARG_WITH(doc-strings,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2600 AS_HELP_STRING([--with(out)-doc-strings], [disable/enable documentation strings]))
23746
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2601
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2602 if test -z "$with_doc_strings"
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2603 then with_doc_strings="yes"
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2604 fi
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2605 if test "$with_doc_strings" != "no"
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2606 then
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2607 AC_DEFINE(WITH_DOC_STRINGS, 1,
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2608 [Define if you want documentation strings in extension modules])
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2609 fi
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2610 AC_MSG_RESULT($with_doc_strings)
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23700
diff changeset
2611
16782
5864a9c58c81 Add Vladimir Marangozov's object allocator. It is disabled by default. This
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16772
diff changeset
2612 # Check for Python-specific malloc support
32301
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2613 AC_MSG_CHECKING(for --with-tsc)
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2614 AC_ARG_WITH(tsc,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2615 AS_HELP_STRING([--with(out)-tsc],[enable/disable timestamp counter profile]),[
32301
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2616 if test "$withval" != no
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2617 then
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2618 AC_DEFINE(WITH_TSC, 1,
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2619 [Define to profile with the Pentium timestamp counter])
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2620 AC_MSG_RESULT(yes)
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2621 else AC_MSG_RESULT(no)
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2622 fi],
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2623 [AC_MSG_RESULT(no)])
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2624
41c59d80bbc5 Patch #510695: Add TSC profiling for the VM.
Martin v. Löwis <martin@v.loewis.de>
parents: 32218
diff changeset
2625 # Check for Python-specific malloc support
16782
5864a9c58c81 Add Vladimir Marangozov's object allocator. It is disabled by default. This
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16772
diff changeset
2626 AC_MSG_CHECKING(for --with-pymalloc)
5864a9c58c81 Add Vladimir Marangozov's object allocator. It is disabled by default. This
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16772
diff changeset
2627 AC_ARG_WITH(pymalloc,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2628 AS_HELP_STRING([--with(out)-pymalloc], [disable/enable specialized mallocs]))
22447
ef6e2fef81d2 Enable pymalloc by default.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 22427
diff changeset
2629
ef6e2fef81d2 Enable pymalloc by default.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 22427
diff changeset
2630 if test -z "$with_pymalloc"
ef6e2fef81d2 Enable pymalloc by default.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 22427
diff changeset
2631 then with_pymalloc="yes"
ef6e2fef81d2 Enable pymalloc by default.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 22427
diff changeset
2632 fi
ef6e2fef81d2 Enable pymalloc by default.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 22427
diff changeset
2633 if test "$with_pymalloc" != "no"
ef6e2fef81d2 Enable pymalloc by default.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 22427
diff changeset
2634 then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2635 AC_DEFINE(WITH_PYMALLOC, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2636 [Define if you want to compile in Python-specific mallocs])
22447
ef6e2fef81d2 Enable pymalloc by default.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 22427
diff changeset
2637 fi
ef6e2fef81d2 Enable pymalloc by default.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 22427
diff changeset
2638 AC_MSG_RESULT($with_pymalloc)
16782
5864a9c58c81 Add Vladimir Marangozov's object allocator. It is disabled by default. This
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16772
diff changeset
2639
57546
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2640 # Check for Valgrind support
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2641 AC_MSG_CHECKING([for --with-valgrind])
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2642 AC_ARG_WITH([valgrind],
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2643 AS_HELP_STRING([--with-valgrind], [Enable Valgrind support]),,
57546
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2644 with_valgrind=no)
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2645 AC_MSG_RESULT([$with_valgrind])
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2646 if test "$with_valgrind" != no; then
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2647 AC_CHECK_HEADER([valgrind/valgrind.h],
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2648 [AC_DEFINE([WITH_VALGRIND], 1, [Define if you want pymalloc to be disabled when running under valgrind])],
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2649 [AC_MSG_ERROR([Valgrind support requested but headers not available])]
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2650 )
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2651 fi
8180925c75ba disable pymalloc tricks with the --with-valgrind option #2422
Benjamin Peterson <benjamin@python.org>
parents: 57540
diff changeset
2652
13228
f195c9981fa1 Enable the garbage collection module by default. --without-cycle-gc
Barry Warsaw <barry@python.org>
parents: 13180
diff changeset
2653 # Check for --with-wctype-functions
f195c9981fa1 Enable the garbage collection module by default. --without-cycle-gc
Barry Warsaw <barry@python.org>
parents: 13180
diff changeset
2654 AC_MSG_CHECKING(for --with-wctype-functions)
f195c9981fa1 Enable the garbage collection module by default. --without-cycle-gc
Barry Warsaw <barry@python.org>
parents: 13180
diff changeset
2655 AC_ARG_WITH(wctype-functions,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
2656 AS_HELP_STRING([--with-wctype-functions], [use wctype.h functions]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
2657 [
13228
f195c9981fa1 Enable the garbage collection module by default. --without-cycle-gc
Barry Warsaw <barry@python.org>
parents: 13180
diff changeset
2658 if test "$withval" != no
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2659 then
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2660 AC_DEFINE(WANT_WCTYPE_FUNCTIONS, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2661 [Define if you want wctype.h functions to be used instead of the
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2662 one supplied by Python itself. (see Include/unicodectype.h).])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2663 AC_MSG_RESULT(yes)
13228
f195c9981fa1 Enable the garbage collection module by default. --without-cycle-gc
Barry Warsaw <barry@python.org>
parents: 13180
diff changeset
2664 else AC_MSG_RESULT(no)
f195c9981fa1 Enable the garbage collection module by default. --without-cycle-gc
Barry Warsaw <barry@python.org>
parents: 13180
diff changeset
2665 fi],
f195c9981fa1 Enable the garbage collection module by default. --without-cycle-gc
Barry Warsaw <barry@python.org>
parents: 13180
diff changeset
2666 [AC_MSG_RESULT(no)])
f195c9981fa1 Enable the garbage collection module by default. --without-cycle-gc
Barry Warsaw <barry@python.org>
parents: 13180
diff changeset
2667
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
2668 # -I${DLINCLDIR} is added to the compile rule for importdl.o
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
2669 AC_SUBST(DLINCLDIR)
19741
a5eeb1e70f41 SF bug #427073: DLINCLDIR defined incorrectly (Skip Montanaro).
Guido van Rossum <guido@python.org>
parents: 19732
diff changeset
2670 DLINCLDIR=.
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
2671
11606
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2672 # the dlopen() function means we might want to use dynload_shlib.o. some
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2673 # platforms, such as AIX, have dlopen(), but don't want to use it.
13874
266e11a226f7 Cleanup configure.in. Specifically:
Thomas Wouters <thomas@python.org>
parents: 13733
diff changeset
2674 AC_CHECK_FUNCS(dlopen)
11606
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2675
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2676 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2677 # loading of modules.
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2678 AC_SUBST(DYNLOADFILE)
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2679 AC_MSG_CHECKING(DYNLOADFILE)
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2680 if test -z "$DYNLOADFILE"
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2681 then
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2682 case $ac_sys_system/$ac_sys_release in
30941
cb7d5e23dbc7 Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
Martin v. Löwis <martin@v.loewis.de>
parents: 30892
diff changeset
2683 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
cb7d5e23dbc7 Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
Martin v. Löwis <martin@v.loewis.de>
parents: 30892
diff changeset
2684 if test "$ac_cv_func_dlopen" = yes
cb7d5e23dbc7 Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
Martin v. Löwis <martin@v.loewis.de>
parents: 30892
diff changeset
2685 then DYNLOADFILE="dynload_shlib.o"
cb7d5e23dbc7 Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
Martin v. Löwis <martin@v.loewis.de>
parents: 30892
diff changeset
2686 else DYNLOADFILE="dynload_aix.o"
cb7d5e23dbc7 Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
Martin v. Löwis <martin@v.loewis.de>
parents: 30892
diff changeset
2687 fi
cb7d5e23dbc7 Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
Martin v. Löwis <martin@v.loewis.de>
parents: 30892
diff changeset
2688 ;;
11606
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2689 BeOS*) DYNLOADFILE="dynload_beos.o";;
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2690 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
37553
3959810bc549 Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
Anthony Baxter <anthonybaxter@gmail.com>
parents: 37456
diff changeset
2691 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
3959810bc549 Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
Anthony Baxter <anthonybaxter@gmail.com>
parents: 37456
diff changeset
2692 Darwin/@<:@0156@:>@\..*) DYNLOADFILE="dynload_next.o";;
23777
bec1b942e0bc Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents: 23746
diff changeset
2693 atheos*) DYNLOADFILE="dynload_atheos.o";;
11606
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2694 *)
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2695 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2696 # out any dynamic loading
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2697 if test "$ac_cv_func_dlopen" = yes
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2698 then DYNLOADFILE="dynload_shlib.o"
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2699 else DYNLOADFILE="dynload_stub.o"
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2700 fi
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2701 ;;
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2702 esac
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2703 fi
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2704 AC_MSG_RESULT($DYNLOADFILE)
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2705 if test "$DYNLOADFILE" != "dynload_stub.o"
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2706 then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2707 AC_DEFINE(HAVE_DYNAMIC_LOADING, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2708 [Defined when any dynamic module loading is enabled.])
11606
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2709 fi
13daad8a6eee Changes to auto-detect the correct dynload_<platform>.c file.
Guido van Rossum <guido@python.org>
parents: 11584
diff changeset
2710
18154
d639a1e1f1f4 Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen <jack.jansen@cwi.nl>
parents: 17786
diff changeset
2711 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
d639a1e1f1f4 Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen <jack.jansen@cwi.nl>
parents: 17786
diff changeset
2712
d639a1e1f1f4 Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen <jack.jansen@cwi.nl>
parents: 17786
diff changeset
2713 AC_SUBST(MACHDEP_OBJS)
d639a1e1f1f4 Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen <jack.jansen@cwi.nl>
parents: 17786
diff changeset
2714 AC_MSG_CHECKING(MACHDEP_OBJS)
d639a1e1f1f4 Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen <jack.jansen@cwi.nl>
parents: 17786
diff changeset
2715 if test -z "$MACHDEP_OBJS"
d639a1e1f1f4 Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen <jack.jansen@cwi.nl>
parents: 17786
diff changeset
2716 then
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
2717 MACHDEP_OBJS=$extra_machdep_objs
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
2718 else
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
2719 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
18154
d639a1e1f1f4 Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen <jack.jansen@cwi.nl>
parents: 17786
diff changeset
2720 fi
19262
c3c87ce4afdc Lots of changes in the framework support:
Jack Jansen <jack.jansen@cwi.nl>
parents: 19151
diff changeset
2721 AC_MSG_RESULT(MACHDEP_OBJS)
18154
d639a1e1f1f4 Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen <jack.jansen@cwi.nl>
parents: 17786
diff changeset
2722
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
2723 # checks for library functions
46053
461ff43e74d0 Patch #2240: Implement signal.setitimer and signal.getitimer.
Martin v. Löwis <martin@v.loewis.de>
parents: 45991
diff changeset
2724 AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \
461ff43e74d0 Patch #2240: Implement signal.setitimer and signal.getitimer.
Martin v. Löwis <martin@v.loewis.de>
parents: 45991
diff changeset
2725 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
26810
9d0e62c9a128 Patch #657889: Implement posix.getloadavg.
Martin v. Löwis <martin@v.loewis.de>
parents: 26739
diff changeset
2726 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
57473
988db0bbee3a Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}.
Martin v. Löwis <martin@v.loewis.de>
parents: 57383
diff changeset
2727 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
57540
a54c19802acc Issue #7333: The `posix` module gains an `initgroups()` function providing
Antoine Pitrou <solipsis@pitrou.net>
parents: 57492
diff changeset
2728 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
25721
8b20b26f1186 Back out #479898.
Martin v. Löwis <martin@v.loewis.de>
parents: 25694
diff changeset
2729 mremap nice pathconf pause plock poll pthread_init \
27977
0fe321e78ad3 - sys.path[0] (the directory from which the script is loaded) is now
Guido van Rossum <guido@python.org>
parents: 27857
diff changeset
2730 putenv readlink realpath \
52696
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
2731 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
2732 setgid \
28422
721e9e4eec1e Add test for setpgrp. Fixes #690317.
Martin v. Löwis <martin@v.loewis.de>
parents: 28351
diff changeset
2733 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
57473
988db0bbee3a Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}.
Martin v. Löwis <martin@v.loewis.de>
parents: 57383
diff changeset
2734 setlocale setregid setreuid setresuid setresgid \
988db0bbee3a Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}.
Martin v. Löwis <martin@v.loewis.de>
parents: 57383
diff changeset
2735 setsid setpgid setpgrp setuid setvbuf snprintf \
31469
8495b027bce3 Remove HAVE_STRPTIME - no longer necessary with the pure Python version of
Skip Montanaro <skip@pobox.com>
parents: 31443
diff changeset
2736 sigaction siginterrupt sigrelse strftime \
23550
b3c50f69f38b This is patch
Michael W. Hudson <mwh@python.net>
parents: 23462
diff changeset
2737 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
37099
d62b13488943 Patch #1309579: wait3 and wait4 were added to the posix module by Chad J. Schroeder.
Neal Norwitz <nnorwitz@gmail.com>
parents: 36649
diff changeset
2738 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty)
9790
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
2739
26144
a48acb5b40ef Check whether we can take the address of chown, link, and symlink.
Martin v. Löwis <martin@v.loewis.de>
parents: 26091
diff changeset
2740 # For some functions, having a definition is not sufficient, since
a48acb5b40ef Check whether we can take the address of chown, link, and symlink.
Martin v. Löwis <martin@v.loewis.de>
parents: 26091
diff changeset
2741 # we want to take their address.
a48acb5b40ef Check whether we can take the address of chown, link, and symlink.
Martin v. Löwis <martin@v.loewis.de>
parents: 26091
diff changeset
2742 AC_MSG_CHECKING(for chroot)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2743 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=chroot]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2744 [AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2745 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2746 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2747 ])
26144
a48acb5b40ef Check whether we can take the address of chown, link, and symlink.
Martin v. Löwis <martin@v.loewis.de>
parents: 26091
diff changeset
2748 AC_MSG_CHECKING(for link)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2749 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=link]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2750 [AC_DEFINE(HAVE_LINK, 1, Define if you have the 'link' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2751 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2752 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2753 ])
26144
a48acb5b40ef Check whether we can take the address of chown, link, and symlink.
Martin v. Löwis <martin@v.loewis.de>
parents: 26091
diff changeset
2754 AC_MSG_CHECKING(for symlink)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2755 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=symlink]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2756 [AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2757 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2758 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2759 ])
30469
55857aebc24f Check for declarations of fchdir and fsync. Fixes #800710. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30455
diff changeset
2760 AC_MSG_CHECKING(for fchdir)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2761 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fchdir]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2762 [AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2763 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2764 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2765 ])
30469
55857aebc24f Check for declarations of fchdir and fsync. Fixes #800710. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30455
diff changeset
2766 AC_MSG_CHECKING(for fsync)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2767 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fsync]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2768 [AC_DEFINE(HAVE_FSYNC, 1, Define if you have the 'fsync' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2769 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2770 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2771 ])
30469
55857aebc24f Check for declarations of fchdir and fsync. Fixes #800710. Backported to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents: 30455
diff changeset
2772 AC_MSG_CHECKING(for fdatasync)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2773 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fdatasync]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2774 [AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2775 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2776 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2777 ])
45991
728dc13327b2 Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents: 45824
diff changeset
2778 AC_MSG_CHECKING(for epoll)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2779 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/epoll.h>]], [[void *x=epoll_create]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2780 [AC_DEFINE(HAVE_EPOLL, 1, Define if you have the 'epoll' functions.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2781 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2782 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2783 ])
45991
728dc13327b2 Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents: 45824
diff changeset
2784 AC_MSG_CHECKING(for kqueue)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2785 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
45991
728dc13327b2 Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents: 45824
diff changeset
2786 #include <sys/types.h>
728dc13327b2 Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents: 45824
diff changeset
2787 #include <sys/event.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2788 ]], [[int x=kqueue()]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2789 [AC_DEFINE(HAVE_KQUEUE, 1, Define if you have the 'kqueue' functions.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2790 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2791 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2792 ])
26325
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2793 # On some systems (eg. FreeBSD 5), we would find a definition of the
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2794 # functions ctermid_r, setgroups in the library, but no prototype
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2795 # (e.g. because we use _XOPEN_SOURCE). See whether we can take their
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2796 # address to avoid compiler warnings and potential miscompilations
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2797 # because of the missing prototypes.
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2798
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2799 AC_MSG_CHECKING(for ctermid_r)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2800 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
26325
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2801 #include <stdio.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2802 ]], [[void* p = ctermid_r]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2803 [AC_DEFINE(HAVE_CTERMID_R, 1, Define if you have the 'ctermid_r' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2804 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2805 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2806 ])
26325
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2807
64611
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2808 AC_CACHE_CHECK([for flock declaration], [ac_cv_flock_decl],
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2809 [AC_COMPILE_IFELSE(
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2810 [AC_LANG_PROGRAM(
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2811 [#include <sys/file.h>],
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2812 [void* p = flock]
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2813 )],
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2814 [ac_cv_flock_decl=yes],
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2815 [ac_cv_flock_decl=no]
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2816 )
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2817 ])
64611
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2818 if test "x${ac_cv_flock_decl}" = xyes; then
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2819 AC_CHECK_FUNCS(flock,,
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2820 AC_CHECK_LIB(bsd,flock,
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2821 [AC_DEFINE(HAVE_FLOCK)
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2822 AC_DEFINE(FLOCK_NEEDS_LIBBSD, 1, Define if flock needs to be linked with bsd library.)
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2823 ])
21ae4046e471 Merged revisions 84674 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64521
diff changeset
2824 )
64521
adfa1e488734 Merged revisions 84584 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64321
diff changeset
2825 fi
28454
f3078654a5c0 Patch #650412: Check whether the address of flock and getpagesize
Martin v. Löwis <martin@v.loewis.de>
parents: 28439
diff changeset
2826
f3078654a5c0 Patch #650412: Check whether the address of flock and getpagesize
Martin v. Löwis <martin@v.loewis.de>
parents: 28439
diff changeset
2827 AC_MSG_CHECKING(for getpagesize)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2828 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
28454
f3078654a5c0 Patch #650412: Check whether the address of flock and getpagesize
Martin v. Löwis <martin@v.loewis.de>
parents: 28439
diff changeset
2829 #include <unistd.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2830 ]], [[void* p = getpagesize]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2831 [AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2832 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2833 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2834 ])
28454
f3078654a5c0 Patch #650412: Check whether the address of flock and getpagesize
Martin v. Löwis <martin@v.loewis.de>
parents: 28439
diff changeset
2835
73770
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2836 AC_MSG_CHECKING(for broken unsetenv)
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2837 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2838 #include <stdlib.h>
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2839 ]], [[int res = unsetenv("DUMMY")]])],
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2840 [AC_MSG_RESULT(no)],
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2841 [AC_DEFINE(HAVE_BROKEN_UNSETENV, 1, Define if `unsetenv` does not return an int.)
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2842 AC_MSG_RESULT(yes)
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2843 ])
11bbeaf03894 Issue #13415: Test in configure if unsetenv() has a return value or not.
Charles-François Natali <neologix@free.fr>
parents: 72379
diff changeset
2844
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2845 dnl check for true
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2846 AC_CHECK_PROGS(TRUE, true, /bin/true)
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2847
28960
6ca94aeb292a Try linking hstrerror and inet_aton tests. Look for these functions in -lresolv.
Martin v. Löwis <martin@v.loewis.de>
parents: 28959
diff changeset
2848 dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
6ca94aeb292a Try linking hstrerror and inet_aton tests. Look for these functions in -lresolv.
Martin v. Löwis <martin@v.loewis.de>
parents: 28959
diff changeset
2849 dnl On others, they are in the C library, so we to take no action
29265
74da4d2eaad3 Patch #742741: Check for true in different paths, support -pthread.
Martin v. Löwis <martin@v.loewis.de>
parents: 29249
diff changeset
2850 AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_TRUE],
28960
6ca94aeb292a Try linking hstrerror and inet_aton tests. Look for these functions in -lresolv.
Martin v. Löwis <martin@v.loewis.de>
parents: 28959
diff changeset
2851 AC_CHECK_LIB(resolv, inet_aton)
6ca94aeb292a Try linking hstrerror and inet_aton tests. Look for these functions in -lresolv.
Martin v. Löwis <martin@v.loewis.de>
parents: 28959
diff changeset
2852 )
6ca94aeb292a Try linking hstrerror and inet_aton tests. Look for these functions in -lresolv.
Martin v. Löwis <martin@v.loewis.de>
parents: 28959
diff changeset
2853
44140
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2854 # On Tru64, chflags seems to be present, but calling it will
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2855 # exit Python
58601
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2856 AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
71030
abfe28e7e5cd Issue #8746: Correct faulty configure checks so that os.chflags() and
Ned Deily <nad@acm.org>
parents: 68281
diff changeset
2857 AC_RUN_IFELSE([AC_LANG_SOURCE([[
44140
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2858 #include <sys/stat.h>
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2859 #include <unistd.h>
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2860 int main(int argc, char*argv[])
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2861 {
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2862 if(chflags(argv[0], 0) != 0)
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2863 return 1;
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2864 return 0;
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2865 }
71030
abfe28e7e5cd Issue #8746: Correct faulty configure checks so that os.chflags() and
Ned Deily <nad@acm.org>
parents: 68281
diff changeset
2866 ]])],
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2867 [ac_cv_have_chflags=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2868 [ac_cv_have_chflags=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2869 [ac_cv_have_chflags=cross])
58601
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2870 ])
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2871 if test "$ac_cv_have_chflags" = cross ; then
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2872 AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2873 fi
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2874 if test "$ac_cv_have_chflags" = yes ; then
71030
abfe28e7e5cd Issue #8746: Correct faulty configure checks so that os.chflags() and
Ned Deily <nad@acm.org>
parents: 68281
diff changeset
2875 AC_DEFINE(HAVE_CHFLAGS, 1, [Define to 1 if you have the 'chflags' function.])
58601
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2876 fi
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2877
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2878 AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
71030
abfe28e7e5cd Issue #8746: Correct faulty configure checks so that os.chflags() and
Ned Deily <nad@acm.org>
parents: 68281
diff changeset
2879 AC_RUN_IFELSE([AC_LANG_SOURCE([[
44140
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2880 #include <sys/stat.h>
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2881 #include <unistd.h>
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2882 int main(int argc, char*argv[])
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2883 {
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2884 if(lchflags(argv[0], 0) != 0)
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2885 return 1;
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2886 return 0;
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2887 }
71030
abfe28e7e5cd Issue #8746: Correct faulty configure checks so that os.chflags() and
Ned Deily <nad@acm.org>
parents: 68281
diff changeset
2888 ]])],[ac_cv_have_lchflags=yes],[ac_cv_have_lchflags=no],[ac_cv_have_lchflags=cross])
58601
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2889 ])
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2890 if test "$ac_cv_have_lchflags" = cross ; then
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2891 AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2892 fi
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2893 if test "$ac_cv_have_lchflags" = yes ; then
71030
abfe28e7e5cd Issue #8746: Correct faulty configure checks so that os.chflags() and
Ned Deily <nad@acm.org>
parents: 68281
diff changeset
2894 AC_DEFINE(HAVE_LCHFLAGS, 1, [Define to 1 if you have the 'lchflags' function.])
58601
e956570bc3b9 Merged revisions 76050 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58049
diff changeset
2895 fi
44140
04505c988abc Fix chflags issue on Tru64, from #1490190.
Martin v. Löwis <martin@v.loewis.de>
parents: 44073
diff changeset
2896
38771
618d088d9668 Patch #1503046, Conditional compilation of zlib.(de)compressobj.copy
Neal Norwitz <nnorwitz@gmail.com>
parents: 38764
diff changeset
2897 dnl Check if system zlib has *Copy() functions
39019
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2898 dnl
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2899 dnl On MacOSX the linker will search for dylibs on the entire linker path
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2900 dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2901 dnl to revert to a more traditional unix behaviour and make it possible to
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2902 dnl override the system libz with a local static library of libz. Temporarily
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2903 dnl add that flag to our CFLAGS as well to ensure that we check the version
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2904 dnl of libz that will be used by setup.py.
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2905 dnl The -L/usr/local/lib is needed as wel to get the same compilation
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2906 dnl environment as setup.py (and leaving it out can cause configure to use the
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2907 dnl wrong version of the library)
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2908 case $ac_sys_system/$ac_sys_release in
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2909 Darwin/*)
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2910 _CUR_CFLAGS="${CFLAGS}"
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2911 _CUR_LDFLAGS="${LDFLAGS}"
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2912 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2913 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2914 ;;
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2915 esac
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2916
60924
f4fe53f86627 - Issue #8509: Fix quoting in help strings and code snippets in configure.in.
Matthias Klose <doko@ubuntu.com>
parents: 60694
diff changeset
2917 AC_CHECK_LIB(z, inflateCopy, AC_DEFINE(HAVE_ZLIB_COPY, 1, [Define if the zlib library has inflateCopy]))
38771
618d088d9668 Patch #1503046, Conditional compilation of zlib.(de)compressobj.copy
Neal Norwitz <nnorwitz@gmail.com>
parents: 38764
diff changeset
2918
39019
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2919 case $ac_sys_system/$ac_sys_release in
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2920 Darwin/*)
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2921 CFLAGS="${_CUR_CFLAGS}"
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2922 LDFLAGS="${_CUR_LDFLAGS}"
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2923 ;;
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2924 esac
f4e33b12bb57 This patch solves the problem Skip was seeing with zlib, this patch ensures that
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38877
diff changeset
2925
28953
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2926 AC_MSG_CHECKING(for hstrerror)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2927 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
28953
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2928 #include <netdb.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2929 ]], [[void* p = hstrerror; hstrerror(0)]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2930 [AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2931 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2932 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2933 ])
28953
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2934
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2935 AC_MSG_CHECKING(for inet_aton)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2936 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
36543
36325caeff9c Patch #1432345: Make python compile on DragonFly.
Martin v. Löwis <martin@v.loewis.de>
parents: 36501
diff changeset
2937 #include <sys/types.h>
28953
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2938 #include <sys/socket.h>
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2939 #include <netinet/in.h>
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2940 #include <arpa/inet.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2941 ]], [[void* p = inet_aton;inet_aton(0,0)]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2942 [AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2943 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2944 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2945 ])
28953
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2946
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2947 AC_MSG_CHECKING(for inet_pton)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2948 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
28983
a5dd5747cdfe Patch #732479: Fix typos.
Martin v. Löwis <martin@v.loewis.de>
parents: 28976
diff changeset
2949 #include <sys/types.h>
28953
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2950 #include <sys/socket.h>
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2951 #include <netinet/in.h>
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2952 #include <arpa/inet.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2953 ]], [[void* p = inet_pton]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2954 [AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2955 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2956 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2957 ])
28953
09422c301826 Patch #724588: Check whether the address of hstrerror and inet_pton can
Martin v. Löwis <martin@v.loewis.de>
parents: 28579
diff changeset
2958
29764
fe5eb17800f9 Include grp.h in setgroups test. Fixes #765822.
Martin v. Löwis <martin@v.loewis.de>
parents: 29759
diff changeset
2959 # On some systems, setgroups is in unistd.h, on others, in grp.h
26325
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2960 AC_MSG_CHECKING(for setgroups)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2961 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
28983
a5dd5747cdfe Patch #732479: Fix typos.
Martin v. Löwis <martin@v.loewis.de>
parents: 28976
diff changeset
2962 #include <unistd.h>
29764
fe5eb17800f9 Include grp.h in setgroups test. Fixes #765822.
Martin v. Löwis <martin@v.loewis.de>
parents: 29759
diff changeset
2963 #ifdef HAVE_GRP_H
fe5eb17800f9 Include grp.h in setgroups test. Fixes #765822.
Martin v. Löwis <martin@v.loewis.de>
parents: 29759
diff changeset
2964 #include <grp.h>
fe5eb17800f9 Include grp.h in setgroups test. Fixes #765822.
Martin v. Löwis <martin@v.loewis.de>
parents: 29759
diff changeset
2965 #endif
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2966 ]], [[void* p = setgroups]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2967 [AC_DEFINE(HAVE_SETGROUPS, 1, Define if you have the 'setgroups' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2968 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2969 [AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2970 ])
26325
823896ce2e5d Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
Martin v. Löwis <martin@v.loewis.de>
parents: 26170
diff changeset
2971
13058
53f4022c0cd5 Thomas Wouters <thomas@xs4all.net>:
Fred Drake <fdrake@acm.org>
parents: 12949
diff changeset
2972 # check for openpty and forkpty
53f4022c0cd5 Thomas Wouters <thomas@xs4all.net>:
Fred Drake <fdrake@acm.org>
parents: 12949
diff changeset
2973
36245
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2974 AC_CHECK_FUNCS(openpty,,
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2975 AC_CHECK_LIB(util,openpty,
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2976 [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2977 AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2978 )
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2979 )
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2980 AC_CHECK_FUNCS(forkpty,,
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2981 AC_CHECK_LIB(util,forkpty,
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2982 [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2983 AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2984 )
d3e68cb739fb Patch #881820: look for openpty and forkpty also in libbsd.
Martin v. Löwis <martin@v.loewis.de>
parents: 36228
diff changeset
2985 )
13058
53f4022c0cd5 Thomas Wouters <thomas@xs4all.net>:
Fred Drake <fdrake@acm.org>
parents: 12949
diff changeset
2986
45824
c0f165e1dbc0 Remove our implementation of memmove() and strerror(); both are in the C89
Brett Cannon <bcannon@gmail.com>
parents: 45787
diff changeset
2987 # Stuff for expat.
c0f165e1dbc0 Remove our implementation of memmove() and strerror(); both are in the C89
Brett Cannon <bcannon@gmail.com>
parents: 45787
diff changeset
2988 AC_CHECK_FUNCS(memmove)
c0f165e1dbc0 Remove our implementation of memmove() and strerror(); both are in the C89
Brett Cannon <bcannon@gmail.com>
parents: 45787
diff changeset
2989
9790
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
2990 # check for long file support functions
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
2991 AC_CHECK_FUNCS(fseek64 fseeko fstatvfs ftell64 ftello statvfs)
7cdcdf8686b3 Changes for long file support by Steve Clift.
Guido van Rossum <guido@python.org>
parents: 9646
diff changeset
2992
45824
c0f165e1dbc0 Remove our implementation of memmove() and strerror(); both are in the C89
Brett Cannon <bcannon@gmail.com>
parents: 45787
diff changeset
2993 AC_REPLACE_FUNCS(dup2 getcwd strdup)
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2994 AC_CHECK_FUNCS(getpgrp,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2995 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[getpgrp(0);]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2996 [AC_DEFINE(GETPGRP_HAVE_ARG, 1, [Define if getpgrp() must be called as getpgrp(0).])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
2997 [])
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
2998 )
28439
d93a845ce5c0 The test for setpgrp having two arguments didn't actually test anything.
Jack Jansen <jack.jansen@cwi.nl>
parents: 28423
diff changeset
2999 AC_CHECK_FUNCS(setpgrp,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3000 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[setpgrp(0,0);]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3001 [AC_DEFINE(SETPGRP_HAVE_ARG, 1, [Define if setpgrp() must be called as setpgrp(0, 0).])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3002 [])
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3003 )
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3004 AC_CHECK_FUNCS(gettimeofday,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3005 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3006 [[gettimeofday((struct timeval*)0,(struct timezone*)0);]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3007 [],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3008 [AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3009 [Define if gettimeofday() does not have second (timezone) argument
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3010 This is the case on Motorola V4 (R40V4.2)])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3011 ])
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3012 )
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3013
25694
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
3014 AC_MSG_CHECKING(for major, minor, and makedev)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3015 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
28035
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
3016 #if defined(MAJOR_IN_MKDEV)
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
3017 #include <sys/mkdev.h>
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
3018 #elif defined(MAJOR_IN_SYSMACROS)
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
3019 #include <sys/sysmacros.h>
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
3020 #else
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
3021 #include <sys/types.h>
f34fcd63ae28 Fix SF bug #691793, Python 2.3a2 build fails on Tru64
Neal Norwitz <nnorwitz@gmail.com>
parents: 28031
diff changeset
3022 #endif
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3023 ]], [[
25694
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
3024 makedev(major(0),minor(0));
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3025 ]])],[
25694
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
3026 AC_DEFINE(HAVE_DEVICE_MACROS, 1,
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
3027 [Define to 1 if you have the device macros.])
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
3028 AC_MSG_RESULT(yes)
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
3029 ],[
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
3030 AC_MSG_RESULT(no)
e9e7f160aac9 Patch #569139: Implementation of major, minor and makedev.
Martin v. Löwis <martin@v.loewis.de>
parents: 25656
diff changeset
3031 ])
20646
cabb568a558b Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
Martin v. Löwis <martin@v.loewis.de>
parents: 20596
diff changeset
3032
cabb568a558b Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
Martin v. Löwis <martin@v.loewis.de>
parents: 20596
diff changeset
3033 # On OSF/1 V5.1, getaddrinfo is available, but a define
cabb568a558b Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
Martin v. Löwis <martin@v.loewis.de>
parents: 20596
diff changeset
3034 # for [no]getaddrinfo in netdb.h.
cabb568a558b Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
Martin v. Löwis <martin@v.loewis.de>
parents: 20596
diff changeset
3035 AC_MSG_CHECKING(for getaddrinfo)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3036 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
20934
ba9455fc4c8b Add sys/types.h and stdio.h into getaddrinfo test, based on itojun's message
Martin v. Löwis <martin@v.loewis.de>
parents: 20789
diff changeset
3037 #include <sys/types.h>
20646
cabb568a558b Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
Martin v. Löwis <martin@v.loewis.de>
parents: 20596
diff changeset
3038 #include <sys/socket.h>
cabb568a558b Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
Martin v. Löwis <martin@v.loewis.de>
parents: 20596
diff changeset
3039 #include <netdb.h>
20934
ba9455fc4c8b Add sys/types.h and stdio.h into getaddrinfo test, based on itojun's message
Martin v. Löwis <martin@v.loewis.de>
parents: 20789
diff changeset
3040 #include <stdio.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3041 ]], [[getaddrinfo(NULL, NULL, NULL, NULL);]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3042 [have_getaddrinfo=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3043 [have_getaddrinfo=no])
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3044 AC_MSG_RESULT($have_getaddrinfo)
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3045 if test $have_getaddrinfo = yes
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3046 then
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3047 AC_MSG_CHECKING(getaddrinfo bug)
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3048 AC_CACHE_VAL(ac_cv_buggy_getaddrinfo,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3049 AC_RUN_IFELSE([AC_LANG_SOURCE([[[
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3050 #include <sys/types.h>
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3051 #include <netdb.h>
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3052 #include <string.h>
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3053 #include <sys/socket.h>
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3054 #include <netinet/in.h>
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3055
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3056 int main()
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3057 {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3058 int passive, gaierr, inet4 = 0, inet6 = 0;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3059 struct addrinfo hints, *ai, *aitop;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3060 char straddr[INET6_ADDRSTRLEN], strport[16];
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3061
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3062 for (passive = 0; passive <= 1; passive++) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3063 memset(&hints, 0, sizeof(hints));
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3064 hints.ai_family = AF_UNSPEC;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3065 hints.ai_flags = passive ? AI_PASSIVE : 0;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3066 hints.ai_socktype = SOCK_STREAM;
31910
73486ff6b552 Bug #934635: Fix a bug where the configure script couldn't detect
Hye-Shik Chang <hyeshik@gmail.com>
parents: 31761
diff changeset
3067 hints.ai_protocol = IPPROTO_TCP;
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3068 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3069 (void)gai_strerror(gaierr);
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3070 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3071 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3072 for (ai = aitop; ai; ai = ai->ai_next) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3073 if (ai->ai_addr == NULL ||
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3074 ai->ai_addrlen == 0 ||
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3075 getnameinfo(ai->ai_addr, ai->ai_addrlen,
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3076 straddr, sizeof(straddr), strport, sizeof(strport),
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3077 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3078 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3079 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3080 switch (ai->ai_family) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3081 case AF_INET:
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3082 if (strcmp(strport, "54321") != 0) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3083 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3084 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3085 if (passive) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3086 if (strcmp(straddr, "0.0.0.0") != 0) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3087 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3088 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3089 } else {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3090 if (strcmp(straddr, "127.0.0.1") != 0) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3091 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3092 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3093 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3094 inet4++;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3095 break;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3096 case AF_INET6:
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3097 if (strcmp(strport, "54321") != 0) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3098 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3099 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3100 if (passive) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3101 if (strcmp(straddr, "::") != 0) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3102 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3103 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3104 } else {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3105 if (strcmp(straddr, "::1") != 0) {
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3106 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3107 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3108 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3109 inet6++;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3110 break;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3111 case AF_UNSPEC:
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3112 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3113 break;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3114 default:
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3115 /* another family support? */
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3116 break;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3117 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3118 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3119 }
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3120
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3121 if (!(inet4 == 0 || inet4 == 2))
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3122 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3123 if (!(inet6 == 0 || inet6 == 2))
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3124 goto bad;
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3125
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3126 if (aitop)
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3127 freeaddrinfo(aitop);
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3128 return 0;
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3129
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3130 bad:
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3131 if (aitop)
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3132 freeaddrinfo(aitop);
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3133 return 1;
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3134 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3135 ]]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3136 [ac_cv_buggy_getaddrinfo=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3137 [ac_cv_buggy_getaddrinfo=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3138 [ac_cv_buggy_getaddrinfo=yes]))
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3139 fi
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3140
65853
720d45a6e316 Merged revisions 86075 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65825
diff changeset
3141 AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
720d45a6e316 Merged revisions 86075 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65825
diff changeset
3142
58047
84b00e6bd69b More configure fixes: avoid sh 'integer argument expected' error when 'long long' type doesn't exist.
Mark Dickinson <dickinsm@gmail.com>
parents: 58043
diff changeset
3143 if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3144 then
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3145 if test $ipv6 = yes
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3146 then
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3147 echo 'Fatal: You must get working getaddrinfo() function.'
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3148 echo ' or you can specify "--disable-ipv6"'.
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3149 exit 1
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3150 fi
20646
cabb568a558b Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
Martin v. Löwis <martin@v.loewis.de>
parents: 20596
diff changeset
3151 else
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3152 AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if you have the getaddrinfo function.])
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3153 fi
65853
720d45a6e316 Merged revisions 86075 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 65825
diff changeset
3154
19062
e426230ea573 Remove redundant check for 'getaddrinfo' (it's already checked the block
Thomas Wouters <thomas@python.org>
parents: 18996
diff changeset
3155 AC_CHECK_FUNCS(getnameinfo)
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3156
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3157 # checks for structures
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3158 AC_HEADER_TIME
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3159 AC_STRUCT_TM
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3160 AC_STRUCT_TIMEZONE
25810
915112671152 Patch #623780: Replace obsolete struct macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25721
diff changeset
3161 AC_CHECK_MEMBERS([struct stat.st_rdev])
915112671152 Patch #623780: Replace obsolete struct macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25721
diff changeset
3162 AC_CHECK_MEMBERS([struct stat.st_blksize])
34990
00cd350cf7bf Patch #1212117: Add optional attribute st_flags to os.stat_result
Hye-Shik Chang <hyeshik@gmail.com>
parents: 34828
diff changeset
3163 AC_CHECK_MEMBERS([struct stat.st_flags])
35326
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
3164 AC_CHECK_MEMBERS([struct stat.st_gen])
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
3165 AC_CHECK_MEMBERS([struct stat.st_birthtime])
20539
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents: 20537
diff changeset
3166 AC_STRUCT_ST_BLOCKS
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3167
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3168 AC_MSG_CHECKING(for time.h that defines altzone)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3169 AC_CACHE_VAL(ac_cv_header_time_altzone,[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3170 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[return altzone;]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3171 [ac_cv_header_time_altzone=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3172 [ac_cv_header_time_altzone=no])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3173 ])
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3174 AC_MSG_RESULT($ac_cv_header_time_altzone)
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3175 if test $ac_cv_header_time_altzone = yes; then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3176 AC_DEFINE(HAVE_ALTZONE, 1, [Define this if your time.h defines altzone.])
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3177 fi
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3178
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3179 was_it_defined=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3180 AC_MSG_CHECKING(whether sys/select.h and sys/time.h may both be included)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3181 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3182 #include <sys/types.h>
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3183 #include <sys/select.h>
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3184 #include <sys/time.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3185 ]], [[;]])],[
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3186 AC_DEFINE(SYS_SELECT_WITH_SYS_TIME, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3187 [Define if you can safely include both <sys/select.h> and <sys/time.h>
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3188 (which you can't on SCO ODT 3.0).])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3189 was_it_defined=yes
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3190 ],[])
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3191 AC_MSG_RESULT($was_it_defined)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3192
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3193 AC_MSG_CHECKING(for addrinfo)
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3194 AC_CACHE_VAL(ac_cv_struct_addrinfo,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3195 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[struct addrinfo a]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3196 [ac_cv_struct_addrinfo=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3197 [ac_cv_struct_addrinfo=no]))
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3198 AC_MSG_RESULT($ac_cv_struct_addrinfo)
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3199 if test $ac_cv_struct_addrinfo = yes; then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3200 AC_DEFINE(HAVE_ADDRINFO, 1, [struct addrinfo (netdb.h)])
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3201 fi
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3202
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3203 AC_MSG_CHECKING(for sockaddr_storage)
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3204 AC_CACHE_VAL(ac_cv_struct_sockaddr_storage,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3205 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3206 # include <sys/types.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3207 # include <sys/socket.h>]], [[struct sockaddr_storage s]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3208 [ac_cv_struct_sockaddr_storage=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3209 [ac_cv_struct_sockaddr_storage=no]))
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3210 AC_MSG_RESULT($ac_cv_struct_sockaddr_storage)
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3211 if test $ac_cv_struct_sockaddr_storage = yes; then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3212 AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [struct sockaddr_storage (sys/socket.h)])
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3213 fi
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3214
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3215 # checks for compiler characteristics
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3216
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3217 AC_C_CHAR_UNSIGNED
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3218 AC_C_CONST
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3219
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3220 works=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3221 AC_MSG_CHECKING(for working volatile)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3222 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[volatile int x; x = 0;]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3223 [works=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3224 [AC_DEFINE(volatile, , [Define to empty if the keyword does not work.])]
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3225 )
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3226 AC_MSG_RESULT($works)
1974
f95c193bfe65 add test for volatile
Guido van Rossum <guido@python.org>
parents: 1941
diff changeset
3227
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3228 works=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3229 AC_MSG_CHECKING(for working signed char)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3230 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[signed char c;]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3231 [works=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3232 [AC_DEFINE(signed, , [Define to empty if the keyword does not work.])]
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3233 )
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3234 AC_MSG_RESULT($works)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3235
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3236 have_prototypes=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3237 AC_MSG_CHECKING(for prototypes)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3238 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(int x) { return 0; }]], [[return foo(10);]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3239 [AC_DEFINE(HAVE_PROTOTYPES, 1,
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3240 [Define if your compiler supports function prototype])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3241 have_prototypes=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3242 []
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3243 )
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3244 AC_MSG_RESULT($have_prototypes)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3245
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3246 works=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3247 AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3248 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3249 #include <stdarg.h>
4184
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
3250 int foo(int x, ...) {
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
3251 va_list va;
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
3252 va_start(va, x);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
3253 va_arg(va, int);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
3254 va_arg(va, char *);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
3255 va_arg(va, double);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
3256 return 0;
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
3257 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3258 ]], [[return foo(10, "", 3.14);]])],[
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3259 AC_DEFINE(HAVE_STDARG_PROTOTYPES, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3260 [Define if your compiler supports variable length function prototypes
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3261 (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h>])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3262 works=yes
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3263 ],[])
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3264 AC_MSG_RESULT($works)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3265
33063
90da70986407 Patch #1003700: Add socketpair function to socket module.
Dave Cole <djc@object-craft.com.au>
parents: 32794
diff changeset
3266 # check for socketpair
90da70986407 Patch #1003700: Add socketpair function to socket module.
Dave Cole <djc@object-craft.com.au>
parents: 32794
diff changeset
3267 AC_MSG_CHECKING(for socketpair)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3268 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
33063
90da70986407 Patch #1003700: Add socketpair function to socket module.
Dave Cole <djc@object-craft.com.au>
parents: 32794
diff changeset
3269 #include <sys/types.h>
90da70986407 Patch #1003700: Add socketpair function to socket module.
Dave Cole <djc@object-craft.com.au>
parents: 32794
diff changeset
3270 #include <sys/socket.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3271 ]], [[void *x=socketpair]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3272 [AC_DEFINE(HAVE_SOCKETPAIR, 1, [Define if you have the 'socketpair' function.])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3273 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3274 [AC_MSG_RESULT(no)]
33063
90da70986407 Patch #1003700: Add socketpair function to socket module.
Dave Cole <djc@object-craft.com.au>
parents: 32794
diff changeset
3275 )
90da70986407 Patch #1003700: Add socketpair function to socket module.
Dave Cole <djc@object-craft.com.au>
parents: 32794
diff changeset
3276
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3277 # check if sockaddr has sa_len member
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3278 AC_MSG_CHECKING(if sockaddr has sa_len member)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3279 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3280 #include <sys/socket.h>]], [[struct sockaddr x;
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3281 x.sa_len = 0;]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3282 [AC_MSG_RESULT(yes)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3283 AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if sockaddr has sa_len member])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3284 [AC_MSG_RESULT(no)]
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3285 )
18246
c4db09b87424 Patch #401196: Configuration machinery for IPv6.
Martin v. Löwis <martin@v.loewis.de>
parents: 18154
diff changeset
3286
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3287 va_list_is_array=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3288 AC_MSG_CHECKING(whether va_list is an array)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3289 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3290 #ifdef HAVE_STDARG_PROTOTYPES
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3291 #include <stdarg.h>
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3292 #else
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3293 #include <varargs.h>
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3294 #endif
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3295 ]], [[va_list list1, list2; list1 = list2;]])],[],[
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3296 AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define if a va_list is an array of some kind])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3297 va_list_is_array=yes
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3298 ])
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
3299 AC_MSG_RESULT($va_list_is_array)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3300
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3301 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
22989
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
3302 AH_TEMPLATE(HAVE_GETHOSTBYNAME_R,
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
3303 [Define this if you have some version of gethostbyname_r()])
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
3304
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3305 AC_CHECK_FUNC(gethostbyname_r, [
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3306 AC_DEFINE(HAVE_GETHOSTBYNAME_R)
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3307 AC_MSG_CHECKING([gethostbyname_r with 6 args])
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3308 OLD_CFLAGS=$CFLAGS
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3309 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3310 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3311 # include <netdb.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3312 ]], [[
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3313 char *name;
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3314 struct hostent *he, *res;
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3315 char buffer[2048];
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3316 int buflen = 2048;
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3317 int h_errnop;
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3318
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3319 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3320 ]])],[
10448
97a06ec7c6f4 Ack! It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
Guido van Rossum <guido@python.org>
parents: 10444
diff changeset
3321 AC_DEFINE(HAVE_GETHOSTBYNAME_R)
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3322 AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3323 [Define this if you have the 6-arg version of gethostbyname_r().])
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3324 AC_MSG_RESULT(yes)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3325 ],[
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3326 AC_MSG_RESULT(no)
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3327 AC_MSG_CHECKING([gethostbyname_r with 5 args])
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3328 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3329 # include <netdb.h>
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3330 ]], [[
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3331 char *name;
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3332 struct hostent *he;
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3333 char buffer[2048];
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3334 int buflen = 2048;
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3335 int h_errnop;
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3336
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3337 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3338 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3339 [
10448
97a06ec7c6f4 Ack! It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
Guido van Rossum <guido@python.org>
parents: 10444
diff changeset
3340 AC_DEFINE(HAVE_GETHOSTBYNAME_R)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3341 AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG, 1,
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3342 [Define this if you have the 5-arg version of gethostbyname_r().])
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3343 AC_MSG_RESULT(yes)
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3344 ], [
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3345 AC_MSG_RESULT(no)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3346 AC_MSG_CHECKING([gethostbyname_r with 3 args])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3347 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3348 # include <netdb.h>
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3349 ]], [[
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3350 char *name;
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3351 struct hostent *he;
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3352 struct hostent_data data;
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3353
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3354 (void) gethostbyname_r(name, he, &data);
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3355 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3356 [
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3357 AC_DEFINE(HAVE_GETHOSTBYNAME_R)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3358 AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG, 1,
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3359 [Define this if you have the 3-arg version of gethostbyname_r().])
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3360 AC_MSG_RESULT(yes)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3361 ], [
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3362 AC_MSG_RESULT(no)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3363 ])
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3364 ])
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3365 ])
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3366 CFLAGS=$OLD_CFLAGS
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3367 ], [
13874
266e11a226f7 Cleanup configure.in. Specifically:
Thomas Wouters <thomas@python.org>
parents: 13733
diff changeset
3368 AC_CHECK_FUNCS(gethostbyname)
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3369 ])
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3370 AC_SUBST(HAVE_GETHOSTBYNAME_R_6_ARG)
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3371 AC_SUBST(HAVE_GETHOSTBYNAME_R_5_ARG)
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3372 AC_SUBST(HAVE_GETHOSTBYNAME_R_3_ARG)
10448
97a06ec7c6f4 Ack! It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
Guido van Rossum <guido@python.org>
parents: 10444
diff changeset
3373 AC_SUBST(HAVE_GETHOSTBYNAME_R)
10444
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3374 AC_SUBST(HAVE_GETHOSTBYNAME)
2a149e94ef4a Add code to test for all sorts of gethostbyname_r variants,
Guido van Rossum <guido@python.org>
parents: 10402
diff changeset
3375
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3376 # checks for system services
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3377 # (none yet)
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3378
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3379 # Linux requires this for correct f.p. operations
13731
8d996f9c5903 Gregor Hoffleit: Don't link with the libieee library if it's not necessary
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 13601
diff changeset
3380 AC_CHECK_FUNC(__fpu_control,
8d996f9c5903 Gregor Hoffleit: Don't link with the libieee library if it's not necessary
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 13601
diff changeset
3381 [],
8d996f9c5903 Gregor Hoffleit: Don't link with the libieee library if it's not necessary
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 13601
diff changeset
3382 [AC_CHECK_LIB(ieee, __fpu_control)
8d996f9c5903 Gregor Hoffleit: Don't link with the libieee library if it's not necessary
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 13601
diff changeset
3383 ])
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3384
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3385 # Check for --with-fpectl
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3386 AC_MSG_CHECKING(for --with-fpectl)
13130
7a7871535727 Thread support is turned on my default now. To disable building
Barry Warsaw <barry@python.org>
parents: 13058
diff changeset
3387 AC_ARG_WITH(fpectl,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
3388 AS_HELP_STRING([--with-fpectl], [enable SIGFPE catching]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3389 [
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3390 if test "$withval" != no
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3391 then
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3392 AC_DEFINE(WANT_SIGFPE_HANDLER, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3393 [Define if you want SIGFPE handled (see Include/pyfpe.h).])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3394 AC_MSG_RESULT(yes)
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3395 else AC_MSG_RESULT(no)
11960
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3396 fi],
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3397 [AC_MSG_RESULT(no)])
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3398
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3399 # check for --with-libm=...
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3400 AC_SUBST(LIBM)
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
3401 case $ac_sys_system in
15033
6c91a041c1d2 [ Patch #101730 ] Add initial static support for Darwin/MacOSX.
Guido van Rossum <guido@python.org>
parents: 14843
diff changeset
3402 Darwin) ;;
8818
71fcc4ca0e8a Changes for BeOS, QNX and long long, by Chris Herborth.
Guido van Rossum <guido@python.org>
parents: 8632
diff changeset
3403 BeOS) ;;
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
3404 *) LIBM=-lm
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
3405 esac
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3406 AC_MSG_CHECKING(for --with-libm=STRING)
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3407 AC_ARG_WITH(libm,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
3408 AS_HELP_STRING([--with-libm=STRING], [math library]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3409 [
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3410 if test "$withval" = no
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3411 then LIBM=
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3412 AC_MSG_RESULT(force LIBM empty)
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3413 elif test "$withval" != yes
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3414 then LIBM=$withval
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3415 AC_MSG_RESULT(set LIBM="$withval")
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3416 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3417 fi],
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3418 [AC_MSG_RESULT(default LIBM="$LIBM")])
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3419
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3420 # check for --with-libc=...
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3421 AC_SUBST(LIBC)
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3422 AC_MSG_CHECKING(for --with-libc=STRING)
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3423 AC_ARG_WITH(libc,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
3424 AS_HELP_STRING([--with-libc=STRING], [C library]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3425 [
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3426 if test "$withval" = no
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3427 then LIBC=
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3428 AC_MSG_RESULT(force LIBC empty)
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3429 elif test "$withval" != yes
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3430 then LIBC=$withval
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3431 AC_MSG_RESULT(set LIBC="$withval")
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3432 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
3433 fi],
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3434 [AC_MSG_RESULT(default LIBC="$LIBC")])
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
3435
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3436 # **************************************************
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3437 # * Check for various properties of floating point *
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3438 # **************************************************
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3439
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3440 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3441 AC_CACHE_VAL(ac_cv_little_endian_double, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3442 AC_RUN_IFELSE([AC_LANG_SOURCE([[
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3443 #include <string.h>
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3444 int main() {
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3445 double x = 9006104071832581.0;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3446 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3447 return 0;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3448 else
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3449 return 1;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3450 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3451 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3452 [ac_cv_little_endian_double=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3453 [ac_cv_little_endian_double=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3454 [ac_cv_little_endian_double=no])])
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3455 AC_MSG_RESULT($ac_cv_little_endian_double)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3456 if test "$ac_cv_little_endian_double" = yes
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3457 then
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3458 AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3459 [Define if C doubles are 64-bit IEEE 754 binary format, stored
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3460 with the least significant byte first])
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3461 fi
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3462
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3463 AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3464 AC_CACHE_VAL(ac_cv_big_endian_double, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3465 AC_RUN_IFELSE([AC_LANG_SOURCE([[
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3466 #include <string.h>
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3467 int main() {
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3468 double x = 9006104071832581.0;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3469 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3470 return 0;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3471 else
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3472 return 1;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3473 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3474 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3475 [ac_cv_big_endian_double=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3476 [ac_cv_big_endian_double=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3477 [ac_cv_big_endian_double=no])])
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3478 AC_MSG_RESULT($ac_cv_big_endian_double)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3479 if test "$ac_cv_big_endian_double" = yes
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3480 then
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3481 AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3482 [Define if C doubles are 64-bit IEEE 754 binary format, stored
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3483 with the most significant byte first])
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3484 fi
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3485
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3486 # Some ARM platforms use a mixed-endian representation for doubles.
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3487 # While Python doesn't currently have full support for these platforms
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3488 # (see e.g., issue 1762561), we can at least make sure that float <-> string
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3489 # conversions work.
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3490 AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3491 AC_CACHE_VAL(ac_cv_mixed_endian_double, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3492 AC_RUN_IFELSE([AC_LANG_SOURCE([[
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3493 #include <string.h>
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3494 int main() {
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3495 double x = 9006104071832581.0;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3496 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3497 return 0;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3498 else
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3499 return 1;
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3500 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3501 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3502 [ac_cv_mixed_endian_double=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3503 [ac_cv_mixed_endian_double=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3504 [ac_cv_mixed_endian_double=no])])
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3505 AC_MSG_RESULT($ac_cv_mixed_endian_double)
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3506 if test "$ac_cv_mixed_endian_double" = yes
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3507 then
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3508 AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3509 [Define if C doubles are 64-bit IEEE 754 binary format, stored
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3510 in ARM mixed-endian order (byte order 45670123)])
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3511 fi
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3512
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3513 # The short float repr introduced in Python 3.1 requires the
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3514 # correctly-rounded string <-> double conversion functions from
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3515 # Python/dtoa.c, which in turn require that the FPU uses 53-bit
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3516 # rounding; this is a problem on x86, where the x87 FPU has a default
57269
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3517 # rounding precision of 64 bits. For gcc/x86, we can fix this by
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3518 # using inline assembler to get and set the x87 FPU control word.
57269
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3519
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3520 # This inline assembler syntax may also work for suncc and icc,
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3521 # so we try it on all platforms.
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3522
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3523 AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3524 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
57269
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3525 unsigned short cw;
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3526 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3527 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3528 ]])],[have_gcc_asm_for_x87=yes],[have_gcc_asm_for_x87=no])
57269
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3529 AC_MSG_RESULT($have_gcc_asm_for_x87)
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3530 if test "$have_gcc_asm_for_x87" = yes
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3531 then
57269
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3532 AC_DEFINE(HAVE_GCC_ASM_FOR_X87, 1,
069b66cfad3f Issue #5792: Extend short float repr support to x86 platforms using suncc or icc.
Mark Dickinson <dickinsm@gmail.com>
parents: 57067
diff changeset
3533 [Define if we can use gcc inline assembler to get and set x87 control word])
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3534 fi
46528
108fe57b9a68 Make configure test for tanh(-0.) == -0. committed in r62447 actually
Mark Dickinson <dickinsm@gmail.com>
parents: 46524
diff changeset
3535
53732
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3536 # Detect whether system arithmetic is subject to x87-style double
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3537 # rounding issues. The result of this test has little meaning on non
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3538 # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3539 # mode is round-to-nearest and double rounding issues are present, and
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3540 # 0 otherwise. See http://bugs.python.org/issue2937 for more info.
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3541 AC_MSG_CHECKING(for x87-style double rounding)
56713
06e6636618d7 Configure check for double rounding should take BASECFLAGS into account
Mark Dickinson <dickinsm@gmail.com>
parents: 56707
diff changeset
3542 # $BASECFLAGS may affect the result
06e6636618d7 Configure check for double rounding should take BASECFLAGS into account
Mark Dickinson <dickinsm@gmail.com>
parents: 56707
diff changeset
3543 ac_save_cc="$CC"
06e6636618d7 Configure check for double rounding should take BASECFLAGS into account
Mark Dickinson <dickinsm@gmail.com>
parents: 56707
diff changeset
3544 CC="$CC $BASECFLAGS"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3545 AC_RUN_IFELSE([AC_LANG_SOURCE([[
53732
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3546 #include <stdlib.h>
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3547 #include <math.h>
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3548 int main() {
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3549 volatile double x, y, z;
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3550 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3551 x = 0.99999999999999989; /* 1-2**-53 */
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3552 y = 1./x;
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3553 if (y != 1.)
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3554 exit(0);
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3555 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3556 x = 1e16;
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3557 y = 2.99999;
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3558 z = x + y;
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3559 if (z != 1e16+4.)
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3560 exit(0);
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3561 /* both tests show evidence of double rounding */
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3562 exit(1);
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3563 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3564 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3565 [ac_cv_x87_double_rounding=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3566 [ac_cv_x87_double_rounding=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3567 [ac_cv_x87_double_rounding=no])
56713
06e6636618d7 Configure check for double rounding should take BASECFLAGS into account
Mark Dickinson <dickinsm@gmail.com>
parents: 56707
diff changeset
3568 CC="$ac_save_cc"
53732
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3569 AC_MSG_RESULT($ac_cv_x87_double_rounding)
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3570 if test "$ac_cv_x87_double_rounding" = yes
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3571 then
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3572 AC_DEFINE(X87_DOUBLE_ROUNDING, 1,
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3573 [Define if arithmetic is subject to x87-style double rounding issue])
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3574 fi
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3575
56707
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3576 # ************************************
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3577 # * Check for mathematical functions *
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3578 # ************************************
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3579
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3580 LIBS_SAVE=$LIBS
2ab08c919648 Issue #7117 (backport py3k float repr) continued:
Mark Dickinson <dickinsm@gmail.com>
parents: 56282
diff changeset
3581 LIBS="$LIBS $LIBM"
53732
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3582
46524
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3583 # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3584 # -0. on some architectures.
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3585 AC_MSG_CHECKING(whether tanh preserves the sign of zero)
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3586 AC_CACHE_VAL(ac_cv_tanh_preserves_zero_sign, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3587 AC_RUN_IFELSE([AC_LANG_SOURCE([[
46524
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3588 #include <math.h>
46528
108fe57b9a68 Make configure test for tanh(-0.) == -0. committed in r62447 actually
Mark Dickinson <dickinsm@gmail.com>
parents: 46524
diff changeset
3589 #include <stdlib.h>
46524
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3590 int main() {
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3591 /* return 0 if either negative zeros don't exist
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3592 on this platform or if negative zeros exist
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3593 and tanh(-0.) == -0. */
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3594 if (atan2(0., -1.) == atan2(-0., -1.) ||
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3595 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3596 else exit(1);
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3597 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3598 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3599 [ac_cv_tanh_preserves_zero_sign=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3600 [ac_cv_tanh_preserves_zero_sign=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3601 [ac_cv_tanh_preserves_zero_sign=no])])
46524
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3602 AC_MSG_RESULT($ac_cv_tanh_preserves_zero_sign)
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3603 if test "$ac_cv_tanh_preserves_zero_sign" = yes
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3604 then
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3605 AC_DEFINE(TANH_PRESERVES_ZERO_SIGN, 1,
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3606 [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3607 fi
bae2f4feefcc test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
Mark Dickinson <dickinsm@gmail.com>
parents: 46288
diff changeset
3608
57492
14ee75b86a5f Multiprocessing configure checks don't need LIBM
Mark Dickinson <dickinsm@gmail.com>
parents: 57482
diff changeset
3609 AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
14ee75b86a5f Multiprocessing configure checks don't need LIBM
Mark Dickinson <dickinsm@gmail.com>
parents: 57482
diff changeset
3610 AC_CHECK_FUNCS([hypot lgamma log1p round tgamma])
53732
bc1d196836a4 Issue #5724: Fix cmath failures on Solaris 10.
Mark Dickinson <dickinsm@gmail.com>
parents: 52454
diff changeset
3611 AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
44344
1d69aabf6f7f Applied patch #1635: Float patch for inf and nan on Windows (and other platforms).
Christian Heimes <christian@cheimes.de>
parents: 44324
diff changeset
3612
2057
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
3613 LIBS=$LIBS_SAVE
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
3614
57383
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3615 # For multiprocessing module, check that sem_open
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3616 # actually works. For FreeBSD versions <= 7.2,
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3617 # the kernel module that provides POSIX semaphores
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3618 # isn't loaded by default, so an attempt to call
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3619 # sem_open results in a 'Signal 12' error.
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3620 AC_MSG_CHECKING(whether POSIX semaphores are enabled)
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3621 AC_CACHE_VAL(ac_cv_posix_semaphores_enabled,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3622 AC_RUN_IFELSE([AC_LANG_SOURCE([[
57383
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3623 #include <unistd.h>
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3624 #include <fcntl.h>
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3625 #include <stdio.h>
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3626 #include <semaphore.h>
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3627 #include <sys/stat.h>
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3628
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3629 int main(void) {
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3630 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3631 if (a == SEM_FAILED) {
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3632 perror("sem_open");
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3633 return 1;
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3634 }
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3635 sem_close(a);
57711
536e46ed10ac Issue #7492: Autoconf tests were leaving semaphore files behind. Add
Mark Dickinson <dickinsm@gmail.com>
parents: 57546
diff changeset
3636 sem_unlink("/autoconf");
57383
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3637 return 0;
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3638 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3639 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3640 [ac_cv_posix_semaphores_enabled=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3641 [ac_cv_posix_semaphores_enabled=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3642 [ac_cv_posix_semaphores_enabled=yes])
57383
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3643 )
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3644 AC_MSG_RESULT($ac_cv_posix_semaphores_enabled)
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3645 if test $ac_cv_posix_semaphores_enabled = no
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3646 then
57482
33986648630b Issue #7272, continued: don't re-use existing HAVE_BROKEN_POSIX_SEMAPHORES
Mark Dickinson <dickinsm@gmail.com>
parents: 57473
diff changeset
3647 AC_DEFINE(POSIX_SEMAPHORES_NOT_ENABLED, 1,
33986648630b Issue #7272, continued: don't re-use existing HAVE_BROKEN_POSIX_SEMAPHORES
Mark Dickinson <dickinsm@gmail.com>
parents: 57473
diff changeset
3648 [Define if POSIX semaphores aren't enabled on your system])
57383
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3649 fi
2e3ec3bb4be7 Issue #7272: Add configure test to detect whether sem_open works
Mark Dickinson <dickinsm@gmail.com>
parents: 57354
diff changeset
3650
52696
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3651 # Multiprocessing check for broken sem_getvalue
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3652 AC_MSG_CHECKING(for broken sem_getvalue)
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3653 AC_CACHE_VAL(ac_cv_broken_sem_getvalue,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3654 AC_RUN_IFELSE([AC_LANG_SOURCE([[
52696
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3655 #include <unistd.h>
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3656 #include <fcntl.h>
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3657 #include <stdio.h>
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3658 #include <semaphore.h>
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3659 #include <sys/stat.h>
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3660
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3661 int main(void){
57711
536e46ed10ac Issue #7492: Autoconf tests were leaving semaphore files behind. Add
Mark Dickinson <dickinsm@gmail.com>
parents: 57546
diff changeset
3662 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
52696
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3663 int count;
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3664 int res;
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3665 if(a==SEM_FAILED){
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3666 perror("sem_open");
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3667 return 1;
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3668
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3669 }
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3670 res = sem_getvalue(a, &count);
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3671 sem_close(a);
57711
536e46ed10ac Issue #7492: Autoconf tests were leaving semaphore files behind. Add
Mark Dickinson <dickinsm@gmail.com>
parents: 57546
diff changeset
3672 sem_unlink("/autocftw");
52696
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3673 return res==-1 ? 1 : 0;
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3674 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3675 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3676 [ac_cv_broken_sem_getvalue=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3677 [ac_cv_broken_sem_getvalue=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3678 [ac_cv_broken_sem_getvalue=yes])
52696
d343e802b276 issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Jesse Noller <jnoller@gmail.com>
parents: 52599
diff changeset
3679 )
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3680 AC_MSG_RESULT($ac_cv_broken_sem_getvalue)
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3681 if test $ac_cv_broken_sem_getvalue = yes
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3682 then
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3683 AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1,
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3684 [define to 1 if your sem_getvalue is broken.])
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3685 fi
50583
f854373a66e5 Add autoconf test to detect x87-style double rounding, as described in
Mark Dickinson <dickinsm@gmail.com>
parents: 50580
diff changeset
3686
52233
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3687 # determine what size digit to use for Python's longs
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3688 AC_MSG_CHECKING([digit size for Python's longs])
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3689 AC_ARG_ENABLE(big-digits,
61400
afe2592354d9 - configure.in: Replace AC_HELP_STRING with AS_HELP_STRING
Matthias Klose <doko@ubuntu.com>
parents: 61399
diff changeset
3690 AS_HELP_STRING([--enable-big-digits@<:@=BITS@:>@],[use big digits for Python longs [[BITS=30]]]),
52233
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3691 [case $enable_big_digits in
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3692 yes)
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3693 enable_big_digits=30 ;;
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3694 no)
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3695 enable_big_digits=15 ;;
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3696 [15|30])
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3697 ;;
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3698 *)
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3699 AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;;
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3700 esac
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3701 AC_MSG_RESULT($enable_big_digits)
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3702 AC_DEFINE_UNQUOTED(PYLONG_BITS_IN_DIGIT, $enable_big_digits, [Define as the preferred size in bits of long digits])
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3703 ],
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3704 [AC_MSG_RESULT(no value specified)])
9b358eae532a Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Mark Dickinson <dickinsm@gmail.com>
parents: 50594
diff changeset
3705
11960
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3706 # check for wchar.h
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3707 AC_CHECK_HEADER(wchar.h, [
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3708 AC_DEFINE(HAVE_WCHAR_H, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3709 [Define if the compiler provides a wchar.h header file.])
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3710 wchar_h="yes"
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3711 ],
11960
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3712 wchar_h="no"
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3713 )
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3714
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3715 # determine wchar_t size
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3716 if test "$wchar_h" = yes
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3717 then
20581
bf03b8e3ef93 Patch from SF bug #473150: configure weaknesses on HP-UX (Michael Piotrowski)
Guido van Rossum <guido@python.org>
parents: 20551
diff changeset
3718 AC_CHECK_SIZEOF(wchar_t, 4, [#include <wchar.h>])
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3719 fi
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3720
30318
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3721 AC_MSG_CHECKING(for UCS-4 tcl)
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3722 have_ucs4_tcl=no
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3723 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
30318
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3724 #include <tcl.h>
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3725 #if TCL_UTF_MAX != 6
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3726 # error "NOT UCS4_TCL"
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3727 #endif]], [[]])],[
30318
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3728 AC_DEFINE(HAVE_UCS4_TCL, 1, [Define this if you have tcl and TCL_UTF_MAX==6])
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3729 have_ucs4_tcl=yes
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3730 ],[])
30318
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3731 AC_MSG_RESULT($have_ucs4_tcl)
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3732
30495
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3733 # check whether wchar_t is signed or not
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3734 if test "$wchar_h" = yes
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3735 then
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3736 # check whether wchar_t is signed or not
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3737 AC_MSG_CHECKING(whether wchar_t is signed)
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3738 AC_CACHE_VAL(ac_cv_wchar_t_signed, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3739 AC_RUN_IFELSE([AC_LANG_SOURCE([[
30495
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3740 #include <wchar.h>
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3741 int main()
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3742 {
37592
924504b00196 Correct test whether wchar_t is unsigned. Fixed crash
Martin v. Löwis <martin@v.loewis.de>
parents: 37553
diff changeset
3743 /* Success: exit code 0 */
924504b00196 Correct test whether wchar_t is unsigned. Fixed crash
Martin v. Löwis <martin@v.loewis.de>
parents: 37553
diff changeset
3744 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
30495
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3745 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3746 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3747 [ac_cv_wchar_t_signed=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3748 [ac_cv_wchar_t_signed=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3749 [ac_cv_wchar_t_signed=yes])])
30495
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3750 AC_MSG_RESULT($ac_cv_wchar_t_signed)
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3751 fi
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3752
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3753 AC_MSG_CHECKING(what type to use for unicode)
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3754 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3755 AC_ARG_ENABLE(unicode,
61892
a8eab6703266 correct default docs
Benjamin Peterson <benjamin@python.org>
parents: 61503
diff changeset
3756 AS_HELP_STRING([--enable-unicode@<:@=ucs@<:@24@:>@@:>@], [Enable Unicode strings (default is ucs2)]),
25940
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3757 [],
e1db1f90e17f Patch #629426: Eliminate more autoconf warnings. Use AC_HELP_STRING.
Martin v. Löwis <martin@v.loewis.de>
parents: 25923
diff changeset
3758 [enable_unicode=yes])
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3759
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3760 if test $enable_unicode = yes
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3761 then
18328
e4527d45e942 Default to ucs2 when no argument to --enable-unicode is specified.
Martin v. Löwis <martin@v.loewis.de>
parents: 18292
diff changeset
3762 # Without any arguments, Py_UNICODE defaults to two-byte mode
30318
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3763 case "$have_ucs4_tcl" in
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3764 yes) enable_unicode="ucs4"
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3765 ;;
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3766 *) enable_unicode="ucs2"
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3767 ;;
770fe83bf89f Patch #798202: detect redhat9 Tcl/Tk in configure script.
Martin v. Löwis <martin@v.loewis.de>
parents: 30310
diff changeset
3768 esac
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3769 fi
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3770
22991
1e1c721433d8 Remove acconfig.h.
Martin v. Löwis <martin@v.loewis.de>
parents: 22989
diff changeset
3771 AH_TEMPLATE(Py_UNICODE_SIZE,
1e1c721433d8 Remove acconfig.h.
Martin v. Löwis <martin@v.loewis.de>
parents: 22989
diff changeset
3772 [Define as the size of the unicode type.])
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3773 case "$enable_unicode" in
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3774 ucs2) unicode_size="2"
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3775 AC_DEFINE(Py_UNICODE_SIZE,2)
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3776 ;;
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3777 ucs4) unicode_size="4"
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3778 AC_DEFINE(Py_UNICODE_SIZE,4)
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3779 ;;
77072
d7aff4423172 Issue #8767: Restore building with --disable-unicode.
Martin v. Löwis <martin@v.loewis.de>
parents: 75668
diff changeset
3780 no) ;; # To allow --disable-unicode
59157
62babf456005 Merged revisions 78467 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 58920
diff changeset
3781 *) AC_MSG_ERROR([invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase).]) ;;
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3782 esac
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3783
22989
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
3784 AH_TEMPLATE(PY_UNICODE_TYPE,
61661583a12f Update to autoconf 2.5x.
Martin v. Löwis <martin@v.loewis.de>
parents: 22863
diff changeset
3785 [Define as the integral type used for Unicode representation.])
22991
1e1c721433d8 Remove acconfig.h.
Martin v. Löwis <martin@v.loewis.de>
parents: 22989
diff changeset
3786
19343
7257e87e0720 Patch #445762: Support --disable-unicode
Martin v. Löwis <martin@v.loewis.de>
parents: 19278
diff changeset
3787 AC_SUBST(UNICODE_OBJS)
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3788 if test "$enable_unicode" = "no"
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3789 then
19343
7257e87e0720 Patch #445762: Support --disable-unicode
Martin v. Löwis <martin@v.loewis.de>
parents: 19278
diff changeset
3790 UNICODE_OBJS=""
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3791 AC_MSG_RESULT(not used)
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3792 else
19343
7257e87e0720 Patch #445762: Support --disable-unicode
Martin v. Löwis <martin@v.loewis.de>
parents: 19278
diff changeset
3793 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3794 AC_DEFINE(Py_USING_UNICODE, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3795 [Define if you want to have a Unicode type.])
30495
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3796
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3797 # wchar_t is only usable if it maps to an unsigned type
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3798 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
34252
28891dc25580 Use = instead of == as operator to test
Matthias Klose <doko@ubuntu.com>
parents: 34054
diff changeset
3799 -a "$ac_cv_wchar_t_signed" = "no"
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3800 then
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3801 PY_UNICODE_TYPE="wchar_t"
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3802 AC_DEFINE(HAVE_USABLE_WCHAR_T, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3803 [Define if you have a useable wchar_t type defined in wchar.h; useable
30495
871776d38213 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type.
Marc-André Lemburg <mal@egenix.com>
parents: 30469
diff changeset
3804 means wchar_t must be an unsigned type with at least 16 bits. (see
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3805 Include/unicodeobject.h).])
18292
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3806 AC_DEFINE(PY_UNICODE_TYPE,wchar_t)
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3807 elif test "$ac_cv_sizeof_short" = "$unicode_size"
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3808 then
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3809 PY_UNICODE_TYPE="unsigned short"
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3810 AC_DEFINE(PY_UNICODE_TYPE,unsigned short)
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3811 elif test "$ac_cv_sizeof_long" = "$unicode_size"
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3812 then
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3813 PY_UNICODE_TYPE="unsigned long"
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3814 AC_DEFINE(PY_UNICODE_TYPE,unsigned long)
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3815 else
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3816 PY_UNICODE_TYPE="no type found"
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3817 fi
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3818 AC_MSG_RESULT($PY_UNICODE_TYPE)
ffbb9c918ac0 Support using UCS-4 as the Py_UNICODE type:
Martin v. Löwis <martin@v.loewis.de>
parents: 18262
diff changeset
3819 fi
11960
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3820
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3821 # check for endianness
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3822 AC_C_BIGENDIAN
741069092831 Part of the Unicode checkin for Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents: 11856
diff changeset
3823
13562
919f3d5172a9 Checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13467
diff changeset
3824 # Check whether right shifting a negative integer extends the sign bit
919f3d5172a9 Checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13467
diff changeset
3825 # or fills with zeros (like the Cray J90, according to Tim Peters).
919f3d5172a9 Checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13467
diff changeset
3826 AC_MSG_CHECKING(whether right shift extends the sign bit)
13569
5d61b6f2aea3 Second try: checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13562
diff changeset
3827 AC_CACHE_VAL(ac_cv_rshift_extends_sign, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3828 AC_RUN_IFELSE([AC_LANG_SOURCE([[
13562
919f3d5172a9 Checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13467
diff changeset
3829 int main()
919f3d5172a9 Checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13467
diff changeset
3830 {
13569
5d61b6f2aea3 Second try: checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13562
diff changeset
3831 exit(((-1)>>3 == -1) ? 0 : 1);
13562
919f3d5172a9 Checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13467
diff changeset
3832 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3833 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3834 [ac_cv_rshift_extends_sign=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3835 [ac_cv_rshift_extends_sign=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3836 [ac_cv_rshift_extends_sign=yes])])
13569
5d61b6f2aea3 Second try: checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13562
diff changeset
3837 AC_MSG_RESULT($ac_cv_rshift_extends_sign)
5d61b6f2aea3 Second try: checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13562
diff changeset
3838 if test "$ac_cv_rshift_extends_sign" = no
5d61b6f2aea3 Second try: checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13562
diff changeset
3839 then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3840 AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3841 [Define if i>>j for signed int i does not extend the sign bit
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3842 when i < 0])
13569
5d61b6f2aea3 Second try: checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13562
diff changeset
3843 fi
5d61b6f2aea3 Second try: checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13562
diff changeset
3844
15747
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3845 # check for getc_unlocked and related locking functions
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3846 AC_MSG_CHECKING(for getc_unlocked() and friends)
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3847 AC_CACHE_VAL(ac_cv_have_getc_unlocked, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3848 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
15747
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3849 FILE *f = fopen("/dev/null", "r");
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3850 flockfile(f);
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3851 getc_unlocked(f);
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3852 funlockfile(f);
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3853 ]])],[ac_cv_have_getc_unlocked=yes],[ac_cv_have_getc_unlocked=no])])
15747
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3854 AC_MSG_RESULT($ac_cv_have_getc_unlocked)
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3855 if test "$ac_cv_have_getc_unlocked" = yes
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3856 then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3857 AC_DEFINE(HAVE_GETC_UNLOCKED, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3858 [Define this if you have flockfile(), getc_unlocked(), and funlockfile()])
15747
fa3f537c8249 Configuration test for working getc_unlocked() (and flockfile() and
Guido van Rossum <guido@python.org>
parents: 15549
diff changeset
3859 fi
13562
919f3d5172a9 Checks whether right shift extends the sign bit.
Vladimir Marangozov <vladimir.marangozov@t-online.de>
parents: 13467
diff changeset
3860
36220
6e17968d4de9 If there is no libtermcap all the readline tests failed.
Neal Norwitz <nnorwitz@gmail.com>
parents: 36204
diff changeset
3861 # check where readline lives
36473
7b19a533ce9b Avoid linking python with readline.
Martin v. Löwis <martin@v.loewis.de>
parents: 36421
diff changeset
3862 # save the value of LIBS so we don't actually link Python with readline
7b19a533ce9b Avoid linking python with readline.
Martin v. Löwis <martin@v.loewis.de>
parents: 36421
diff changeset
3863 LIBS_no_readline=$LIBS
49071
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3864
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3865 # On some systems we need to link readline to a termcap compatible
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3866 # library. NOTE: Keep the precedence of listed libraries synchronised
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3867 # with setup.py.
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3868 py_cv_lib_readline=no
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3869 AC_MSG_CHECKING([how to link readline libs])
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3870 for py_libtermcap in "" ncursesw ncurses curses termcap; do
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3871 if test -z "$py_libtermcap"; then
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3872 READLINE_LIBS="-lreadline"
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3873 else
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3874 READLINE_LIBS="-lreadline -l$py_libtermcap"
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3875 fi
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3876 LIBS="$READLINE_LIBS $LIBS_no_readline"
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3877 AC_LINK_IFELSE(
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3878 [AC_LANG_CALL([],[readline])],
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3879 [py_cv_lib_readline=yes])
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3880 if test $py_cv_lib_readline = yes; then
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3881 break
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3882 fi
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3883 done
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3884 # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3885 #AC_SUBST([READLINE_LIBS])
49078
05e25d7a07e1 backport r66295 from trunk (small fix to the previous backport)
Gregory P. Smith <greg@mad-scientist.com>
parents: 49071
diff changeset
3886 if test $py_cv_lib_readline = no; then
49071
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3887 AC_MSG_RESULT([none])
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3888 else
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3889 AC_MSG_RESULT([$READLINE_LIBS])
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3890 AC_DEFINE(HAVE_LIBREADLINE, 1,
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3891 [Define if you have the readline library (-lreadline).])
36220
6e17968d4de9 If there is no libtermcap all the readline tests failed.
Neal Norwitz <nnorwitz@gmail.com>
parents: 36204
diff changeset
3892 fi
6e17968d4de9 If there is no libtermcap all the readline tests failed.
Neal Norwitz <nnorwitz@gmail.com>
parents: 36204
diff changeset
3893
32526
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3894 # check for readline 2.1
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3895 AC_CHECK_LIB(readline, rl_callback_handler_install,
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3896 AC_DEFINE(HAVE_RL_CALLBACK, 1,
49071
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3897 [Define if you have readline 2.1]), ,$READLINE_LIBS)
32526
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3898
26849
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3899 # check for readline 2.2
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3900 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <readline/readline.h>]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3901 [have_readline=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3902 [have_readline=no]
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3903 )
26849
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3904 if test $have_readline = yes
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3905 then
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3906 AC_EGREP_HEADER([extern int rl_completion_append_character;],
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3907 [readline/readline.h],
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3908 AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3909 [Define if you have readline 2.2]), )
56779
19a832b8464a Merged revisions 75531,75725 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 56283
diff changeset
3910 AC_EGREP_HEADER([extern int rl_completion_suppress_append;],
19a832b8464a Merged revisions 75531,75725 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 56283
diff changeset
3911 [readline/readline.h],
19a832b8464a Merged revisions 75531,75725 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 56283
diff changeset
3912 AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1,
19a832b8464a Merged revisions 75531,75725 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 56283
diff changeset
3913 [Define if you have rl_completion_suppress_append]), )
26849
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3914 fi
bca5409b76ec Patch 659834 by Magnus Lie Hetland:
Guido van Rossum <guido@python.org>
parents: 26810
diff changeset
3915
20188
6dda498cccc4 Patch #462122: add readline startup and pre_event hooks.
Martin v. Löwis <martin@v.loewis.de>
parents: 20143
diff changeset
3916 # check for readline 4.0
6dda498cccc4 Patch #462122: add readline startup and pre_event hooks.
Martin v. Löwis <martin@v.loewis.de>
parents: 20143
diff changeset
3917 AC_CHECK_LIB(readline, rl_pre_input_hook,
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3918 AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
49071
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3919 [Define if you have readline 4.0]), ,$READLINE_LIBS)
20188
6dda498cccc4 Patch #462122: add readline startup and pre_event hooks.
Martin v. Löwis <martin@v.loewis.de>
parents: 20143
diff changeset
3920
43228
1a0c73580665 Patch #1388440: Add set_completion_display_matches_hook and
Martin v. Löwis <martin@v.loewis.de>
parents: 43198
diff changeset
3921 # also in 4.0
1a0c73580665 Patch #1388440: Add set_completion_display_matches_hook and
Martin v. Löwis <martin@v.loewis.de>
parents: 43198
diff changeset
3922 AC_CHECK_LIB(readline, rl_completion_display_matches_hook,
1a0c73580665 Patch #1388440: Add set_completion_display_matches_hook and
Martin v. Löwis <martin@v.loewis.de>
parents: 43198
diff changeset
3923 AC_DEFINE(HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK, 1,
48979
2a60f7b42328 Fix issue 3645: OpenBSD required -lcurses when linking with readline
Gregory P. Smith <greg@mad-scientist.com>
parents: 48219
diff changeset
3924 [Define if you have readline 4.0]), ,$READLINE_LIBS)
43228
1a0c73580665 Patch #1388440: Add set_completion_display_matches_hook and
Martin v. Löwis <martin@v.loewis.de>
parents: 43198
diff changeset
3925
18452
2f1b4cdcbb06 SF Patch #432457 by Jason Tishler: support for readline 4.2.
Guido van Rossum <guido@python.org>
parents: 18328
diff changeset
3926 # check for readline 4.2
2f1b4cdcbb06 SF Patch #432457 by Jason Tishler: support for readline 4.2.
Guido van Rossum <guido@python.org>
parents: 18328
diff changeset
3927 AC_CHECK_LIB(readline, rl_completion_matches,
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3928 AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1,
49071
8cfbb2e275d9 backport r66179 and r66283 from trunk:
Gregory P. Smith <greg@mad-scientist.com>
parents: 45314
diff changeset
3929 [Define if you have readline 4.2]), ,$READLINE_LIBS)
18452
2f1b4cdcbb06 SF Patch #432457 by Jason Tishler: support for readline 4.2.
Guido van Rossum <guido@python.org>
parents: 18328
diff changeset
3930
32526
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3931 # also in readline 4.2
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3932 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <readline/readline.h>]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3933 [have_readline=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3934 [have_readline=no]
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3935 )
32526
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3936 if test $have_readline = yes
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3937 then
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3938 AC_EGREP_HEADER([extern int rl_catch_signals;],
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3939 [readline/readline.h],
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3940 AC_DEFINE(HAVE_RL_CATCH_SIGNAL, 1,
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3941 [Define if you can turn off readline's signal handling.]), )
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3942 fi
78bd25b42d46 This closes patch:
Michael W. Hudson <mwh@python.net>
parents: 32409
diff changeset
3943
36473
7b19a533ce9b Avoid linking python with readline.
Martin v. Löwis <martin@v.loewis.de>
parents: 36421
diff changeset
3944 # End of readline checks: restore LIBS
7b19a533ce9b Avoid linking python with readline.
Martin v. Löwis <martin@v.loewis.de>
parents: 36421
diff changeset
3945 LIBS=$LIBS_no_readline
7b19a533ce9b Avoid linking python with readline.
Martin v. Löwis <martin@v.loewis.de>
parents: 36421
diff changeset
3946
18486
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3947 AC_MSG_CHECKING(for broken nice())
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3948 AC_CACHE_VAL(ac_cv_broken_nice, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3949 AC_RUN_IFELSE([AC_LANG_SOURCE([[
18486
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3950 int main()
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3951 {
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3952 int val1 = nice(1);
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3953 if (val1 != -1 && val1 == nice(2))
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3954 exit(0);
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3955 exit(1);
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3956 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3957 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3958 [ac_cv_broken_nice=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3959 [ac_cv_broken_nice=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3960 [ac_cv_broken_nice=no])])
18486
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3961 AC_MSG_RESULT($ac_cv_broken_nice)
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3962 if test "$ac_cv_broken_nice" = yes
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3963 then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3964 AC_DEFINE(HAVE_BROKEN_NICE, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
3965 [Define if nice() returns success/failure instead of the new priority.])
18486
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3966 fi
26fc905ddc12 Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Thomas Wouters <thomas@python.org>
parents: 18476
diff changeset
3967
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3968 AC_MSG_CHECKING(for broken poll())
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
3969 AC_CACHE_VAL(ac_cv_broken_poll,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3970 AC_RUN_IFELSE([AC_LANG_SOURCE([[
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3971 #include <poll.h>
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3972
55285
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3973 int main()
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3974 {
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3975 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
55285
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3976 int poll_test;
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3977
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3978 close (42);
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3979
55285
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3980 poll_test = poll(&poll_struct, 1, 0);
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3981 if (poll_test < 0)
55285
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3982 return 0;
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3983 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
55285
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3984 return 0;
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3985 else
55285
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3986 return 1;
7f6d03b59865 Clean up the test case for broken poll().
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55284
diff changeset
3987 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3988 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3989 [ac_cv_broken_poll=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3990 [ac_cv_broken_poll=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
3991 [ac_cv_broken_poll=no]))
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3992 AC_MSG_RESULT($ac_cv_broken_poll)
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3993 if test "$ac_cv_broken_poll" = yes
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3994 then
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3995 AC_DEFINE(HAVE_BROKEN_POLL, 1,
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3996 [Define if poll() sets errno on invalid file descriptors.])
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3997 fi
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
3998
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
3999 # Before we can test tzset, we need to check if struct tm has a tm_zone
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4000 # (which is not required by ISO C or UNIX spec) and/or if we support
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4001 # tzname[]
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4002 AC_STRUCT_TIMEZONE
31761
f4a4ac7331ec Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin <nick.bastin@gmail.com>
parents: 31504
diff changeset
4003
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4004 # check tzset(3) exists and works like we expect it to
28299
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4005 AC_MSG_CHECKING(for working tzset())
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4006 AC_CACHE_VAL(ac_cv_working_tzset, [
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4007 AC_RUN_IFELSE([AC_LANG_SOURCE([[
28299
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4008 #include <stdlib.h>
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4009 #include <time.h>
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4010 #include <string.h>
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4011
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4012 #if HAVE_TZNAME
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4013 extern char *tzname[];
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4014 #endif
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4015
28299
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4016 int main()
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4017 {
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4018 /* Note that we need to ensure that not only does tzset(3)
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4019 do 'something' with localtime, but it works as documented
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4020 in the library reference and as expected by the test suite.
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4021 This includes making sure that tzname is set properly if
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4022 tm->tm_zone does not exist since it is the alternative way
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4023 of getting timezone info.
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4024
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4025 Red Hat 6.2 doesn't understand the southern hemisphere
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4026 after New Year's Day.
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4027 */
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4028
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4029 time_t groundhogday = 1044144000; /* GMT-based */
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4030 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4031
28579
981032e64736 SF patch #706707, time.tzset standards compliance update by Stuart Bishop
Neal Norwitz <nnorwitz@gmail.com>
parents: 28473
diff changeset
4032 putenv("TZ=UTC+0");
28299
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4033 tzset();
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4034 if (localtime(&groundhogday)->tm_hour != 0)
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4035 exit(1);
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4036 #if HAVE_TZNAME
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4037 /* For UTC, tzname[1] is sometimes "", sometimes " " */
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4038 if (strcmp(tzname[0], "UTC") ||
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4039 (tzname[1][0] != 0 && tzname[1][0] != ' '))
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4040 exit(1);
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4041 #endif
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4042
28579
981032e64736 SF patch #706707, time.tzset standards compliance update by Stuart Bishop
Neal Norwitz <nnorwitz@gmail.com>
parents: 28473
diff changeset
4043 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
28299
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4044 tzset();
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4045 if (localtime(&groundhogday)->tm_hour != 19)
28299
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4046 exit(1);
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4047 #if HAVE_TZNAME
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4048 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4049 exit(1);
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4050 #endif
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4051
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4052 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4053 tzset();
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4054 if (localtime(&groundhogday)->tm_hour != 11)
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4055 exit(1);
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4056 #if HAVE_TZNAME
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4057 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4058 exit(1);
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4059 #endif
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4060
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4061 #if HAVE_STRUCT_TM_TM_ZONE
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4062 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4063 exit(1);
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4064 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4065 exit(1);
34580
ca7c18ef8bdc Modified test for tzset to not rely on tm->tm_zone's existence. Also added
Brett Cannon <bcannon@gmail.com>
parents: 34481
diff changeset
4066 #endif
30451
b39cb9212f5c Improve detection of whether tzset is broken.
Brett Cannon <bcannon@gmail.com>
parents: 30318
diff changeset
4067
28299
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4068 exit(0);
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4069 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4070 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4071 [ac_cv_working_tzset=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4072 [ac_cv_working_tzset=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4073 [ac_cv_working_tzset=no])])
28299
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4074 AC_MSG_RESULT($ac_cv_working_tzset)
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4075 if test "$ac_cv_working_tzset" = yes
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4076 then
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4077 AC_DEFINE(HAVE_WORKING_TZSET, 1,
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4078 [Define if tzset() actually switches the local timezone in a meaningful way.])
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4079 fi
14316df1c298 - New function time.tzset() provides access to the C library tzet()
Guido van Rossum <guido@python.org>
parents: 28057
diff changeset
4080
25176
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4081 # Look for subsecond timestamps in struct stat
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4082 AC_MSG_CHECKING(for tv_nsec in struct stat)
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4083 AC_CACHE_VAL(ac_cv_stat_tv_nsec,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4084 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[
25176
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4085 struct stat st;
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4086 st.st_mtim.tv_nsec = 1;
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4087 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4088 [ac_cv_stat_tv_nsec=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4089 [ac_cv_stat_tv_nsec=no]))
25176
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4090 AC_MSG_RESULT($ac_cv_stat_tv_nsec)
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4091 if test "$ac_cv_stat_tv_nsec" = yes
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4092 then
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4093 AC_DEFINE(HAVE_STAT_TV_NSEC, 1,
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4094 [Define if you have struct stat.st_mtim.tv_nsec])
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4095 fi
038711ae13e0 Patch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis <martin@v.loewis.de>
parents: 24842
diff changeset
4096
35326
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4097 # Look for BSD style subsecond timestamps in struct stat
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4098 AC_MSG_CHECKING(for tv_nsec2 in struct stat)
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4099 AC_CACHE_VAL(ac_cv_stat_tv_nsec2,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4100 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[
35326
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4101 struct stat st;
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4102 st.st_mtimespec.tv_nsec = 1;
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4103 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4104 [ac_cv_stat_tv_nsec2=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4105 [ac_cv_stat_tv_nsec2=no]))
35326
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4106 AC_MSG_RESULT($ac_cv_stat_tv_nsec2)
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4107 if test "$ac_cv_stat_tv_nsec2" = yes
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4108 then
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4109 AC_DEFINE(HAVE_STAT_TV_NSEC2, 1,
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4110 [Define if you have struct stat.st_mtimensec])
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4111 fi
3094843e7b92 Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
Martin v. Löwis <martin@v.loewis.de>
parents: 35325
diff changeset
4112
20647
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4113 # On HP/UX 11.0, mvwdelch is a block with a return statement
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4114 AC_MSG_CHECKING(whether mvwdelch is an expression)
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4115 AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4116 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
20647
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4117 int rtn;
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4118 rtn = mvwdelch(0,0,0);
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4119 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4120 [ac_cv_mvwdelch_is_expression=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4121 [ac_cv_mvwdelch_is_expression=no]))
20647
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4122 AC_MSG_RESULT($ac_cv_mvwdelch_is_expression)
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4123
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4124 if test "$ac_cv_mvwdelch_is_expression" = yes
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4125 then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
4126 AC_DEFINE(MVWDELCH_IS_EXPRESSION, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
4127 [Define if mvwdelch in curses.h is an expression.])
20647
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4128 fi
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4129
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4130 AC_MSG_CHECKING(whether WINDOW has _flags)
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4131 AC_CACHE_VAL(ac_cv_window_has_flags,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4132 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
20647
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4133 WINDOW *w;
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4134 w->_flags = 0;
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4135 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4136 [ac_cv_window_has_flags=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4137 [ac_cv_window_has_flags=no]))
20647
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4138 AC_MSG_RESULT($ac_cv_window_has_flags)
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4139
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4140
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4141 if test "$ac_cv_window_has_flags" = yes
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4142 then
22863
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
4143 AC_DEFINE(WINDOW_HAS_FLAGS, 1,
6f8a5ad39e6f Move autoheader declarations into configure.in.
Martin v. Löwis <martin@v.loewis.de>
parents: 22847
diff changeset
4144 [Define if WINDOW in curses.h offers a field _flags.])
20647
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4145 fi
dd78b1a71f3e Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis <martin@v.loewis.de>
parents: 20646
diff changeset
4146
38876
4a766024043a Patch #1506645: add Python wrappers for the curses functions
Walter Dörwald <walter@livinglogic.de>
parents: 38771
diff changeset
4147 AC_MSG_CHECKING(for is_term_resized)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4148 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[void *x=is_term_resized]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4149 [AC_DEFINE(HAVE_CURSES_IS_TERM_RESIZED, 1, Define if you have the 'is_term_resized' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4150 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4151 [AC_MSG_RESULT(no)]
38876
4a766024043a Patch #1506645: add Python wrappers for the curses functions
Walter Dörwald <walter@livinglogic.de>
parents: 38771
diff changeset
4152 )
4a766024043a Patch #1506645: add Python wrappers for the curses functions
Walter Dörwald <walter@livinglogic.de>
parents: 38771
diff changeset
4153
38877
0b95a0aaaaef Make check order match in configure and configure.in.
Walter Dörwald <walter@livinglogic.de>
parents: 38876
diff changeset
4154 AC_MSG_CHECKING(for resize_term)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4155 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[void *x=resize_term]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4156 [AC_DEFINE(HAVE_CURSES_RESIZE_TERM, 1, Define if you have the 'resize_term' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4157 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4158 [AC_MSG_RESULT(no)]
38876
4a766024043a Patch #1506645: add Python wrappers for the curses functions
Walter Dörwald <walter@livinglogic.de>
parents: 38771
diff changeset
4159 )
4a766024043a Patch #1506645: add Python wrappers for the curses functions
Walter Dörwald <walter@livinglogic.de>
parents: 38771
diff changeset
4160
38877
0b95a0aaaaef Make check order match in configure and configure.in.
Walter Dörwald <walter@livinglogic.de>
parents: 38876
diff changeset
4161 AC_MSG_CHECKING(for resizeterm)
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4162 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[void *x=resizeterm]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4163 [AC_DEFINE(HAVE_CURSES_RESIZETERM, 1, Define if you have the 'resizeterm' function.)
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4164 AC_MSG_RESULT(yes)],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4165 [AC_MSG_RESULT(no)]
38876
4a766024043a Patch #1506645: add Python wrappers for the curses functions
Walter Dörwald <walter@livinglogic.de>
parents: 38771
diff changeset
4166 )
4a766024043a Patch #1506645: add Python wrappers for the curses functions
Walter Dörwald <walter@livinglogic.de>
parents: 38771
diff changeset
4167
40139
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4168 AC_MSG_CHECKING(for /dev/ptmx)
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4169
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4170 if test -r /dev/ptmx
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4171 then
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4172 AC_MSG_RESULT(yes)
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4173 AC_DEFINE(HAVE_DEV_PTMX, 1,
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4174 [Define if we have /dev/ptmx.])
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4175 else
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4176 AC_MSG_RESULT(no)
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4177 fi
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4178
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4179 AC_MSG_CHECKING(for /dev/ptc)
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4180
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4181 if test -r /dev/ptc
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4182 then
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4183 AC_MSG_RESULT(yes)
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4184 AC_DEFINE(HAVE_DEV_PTC, 1,
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4185 [Define if we have /dev/ptc.])
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4186 else
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4187 AC_MSG_RESULT(no)
fb5db12f0267 Forward-port r52358:
Martin v. Löwis <martin@v.loewis.de>
parents: 39951
diff changeset
4188 fi
28351
d57421623449 /dev/ptmx doesn't exist on AIX, they had to be different and use /dev/ptc.
Neal Norwitz <nnorwitz@gmail.com>
parents: 28314
diff changeset
4189
57277
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4190 if test "$have_long_long" = yes
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4191 then
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4192 AC_MSG_CHECKING(for %lld and %llu printf() format support)
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4193 AC_CACHE_VAL(ac_cv_have_long_long_format,
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4194 AC_RUN_IFELSE([AC_LANG_SOURCE([[[
57277
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4195 #include <stdio.h>
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4196 #include <stddef.h>
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4197 #include <string.h>
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4198
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4199 #ifdef HAVE_SYS_TYPES_H
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4200 #include <sys/types.h>
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4201 #endif
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4202
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4203 int main()
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4204 {
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4205 char buffer[256];
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4206
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4207 if (sprintf(buffer, "%lld", (long long)123) < 0)
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4208 return 1;
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4209 if (strcmp(buffer, "123"))
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4210 return 1;
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4211
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4212 if (sprintf(buffer, "%lld", (long long)-123) < 0)
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4213 return 1;
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4214 if (strcmp(buffer, "-123"))
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4215 return 1;
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4216
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4217 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4218 return 1;
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4219 if (strcmp(buffer, "123"))
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4220 return 1;
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4221
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4222 return 0;
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4223 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4224 ]]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4225 [ac_cv_have_long_long_format=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4226 [ac_cv_have_long_long_format=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4227 [ac_cv_have_long_long_format=no])
57277
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4228 )
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4229 AC_MSG_RESULT($ac_cv_have_long_long_format)
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4230 fi
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4231
58043
ab40b936bd1c Add missing quotes.
Mark Dickinson <dickinsm@gmail.com>
parents: 58024
diff changeset
4232 if test "$ac_cv_have_long_long_format" = yes
57277
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4233 then
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4234 AC_DEFINE(PY_FORMAT_LONG_LONG, "ll",
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4235 [Define to printf format modifier for long long type])
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4236 fi
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4237
57354
c079fcbfc761 Fix for issue #7085
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 57277
diff changeset
4238 if test $ac_sys_system = Darwin
c079fcbfc761 Fix for issue #7085
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 57277
diff changeset
4239 then
c079fcbfc761 Fix for issue #7085
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 57277
diff changeset
4240 LIBS="$LIBS -framework CoreFoundation"
c079fcbfc761 Fix for issue #7085
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 57277
diff changeset
4241 fi
c079fcbfc761 Fix for issue #7085
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 57277
diff changeset
4242
57277
51028709abc3 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
Mark Dickinson <dickinsm@gmail.com>
parents: 57269
diff changeset
4243
57067
698de501799d see issue1006238, this merges in the following patch to ease cross
Gregory P. Smith <greg@mad-scientist.com>
parents: 57065
diff changeset
4244 AC_CACHE_CHECK([for %zd printf() format support], ac_cv_have_size_t_format, [dnl
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4245 AC_RUN_IFELSE([AC_LANG_SOURCE([[
55290
27e70d81ad57 Double-quote the test case for %zd printf() format support to avoid
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55285
diff changeset
4246 #include <stdio.h>
38151
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4247 #include <stddef.h>
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4248 #include <string.h>
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4249
44338
a99128f6c97d Backport of #1638: %zd configure test fails on Linux
Christian Heimes <christian@cheimes.de>
parents: 44286
diff changeset
4250 #ifdef HAVE_SYS_TYPES_H
a99128f6c97d Backport of #1638: %zd configure test fails on Linux
Christian Heimes <christian@cheimes.de>
parents: 44286
diff changeset
4251 #include <sys/types.h>
a99128f6c97d Backport of #1638: %zd configure test fails on Linux
Christian Heimes <christian@cheimes.de>
parents: 44286
diff changeset
4252 #endif
39886
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4253
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4254 #ifdef HAVE_SSIZE_T
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4255 typedef ssize_t Py_ssize_t;
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4256 #elif SIZEOF_VOID_P == SIZEOF_LONG
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4257 typedef long Py_ssize_t;
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4258 #else
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4259 typedef int Py_ssize_t;
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4260 #endif
38151
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4261
44338
a99128f6c97d Backport of #1638: %zd configure test fails on Linux
Christian Heimes <christian@cheimes.de>
parents: 44286
diff changeset
4262 int main()
a99128f6c97d Backport of #1638: %zd configure test fails on Linux
Christian Heimes <christian@cheimes.de>
parents: 44286
diff changeset
4263 {
a99128f6c97d Backport of #1638: %zd configure test fails on Linux
Christian Heimes <christian@cheimes.de>
parents: 44286
diff changeset
4264 char buffer[256];
a99128f6c97d Backport of #1638: %zd configure test fails on Linux
Christian Heimes <christian@cheimes.de>
parents: 44286
diff changeset
4265
38151
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4266 if(sprintf(buffer, "%zd", (size_t)123) < 0)
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4267 return 1;
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4268
39886
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4269 if (strcmp(buffer, "123"))
38151
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4270 return 1;
39886
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4271
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4272 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4273 return 1;
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4274
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4275 if (strcmp(buffer, "-123"))
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4276 return 1;
3c7f1881e82a Backport rev. 51971:
Georg Brandl <georg@python.org>
parents: 39751
diff changeset
4277
38151
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4278 return 0;
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
4279 }
61404
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4280 ]])],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4281 [ac_cv_have_size_t_format=yes],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4282 [ac_cv_have_size_t_format=no],
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4283 [ac_cv_have_size_t_format="cross -- assuming yes"
c5fde4a42cb0 configure.in: convert all obsolete AC_TRY_* macros to AC_*_IFELSE,
Matthias Klose <doko@ubuntu.com>
parents: 61401
diff changeset
4284 ])])
57067
698de501799d see issue1006238, this merges in the following patch to ease cross
Gregory P. Smith <greg@mad-scientist.com>
parents: 57065
diff changeset
4285 if test "$ac_cv_have_size_t_format" != no ; then
55279
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
4286 AC_DEFINE(PY_FORMAT_SIZE_T, "z",
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
4287 [Define to printf format modifier for Py_ssize_t])
cfa004c1fd95 Cache the results of all runtime checks.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 55278
diff changeset
4288 fi
38151
9d4fcc390236 Detect if %zd is supported by printf() during configure and sets
Brett Cannon <bcannon@gmail.com>
parents: 38040
diff changeset
4289
26148
0b611e50c5fc Use new-style CHECK_TYPE to avoid modifying confdefs.h. Include sys/types.h
Martin v. Löwis <martin@v.loewis.de>
parents: 26147
diff changeset
4290 AC_CHECK_TYPE(socklen_t,,
0b611e50c5fc Use new-style CHECK_TYPE to avoid modifying confdefs.h. Include sys/types.h
Martin v. Löwis <martin@v.loewis.de>
parents: 26147
diff changeset
4291 AC_DEFINE(socklen_t,int,
60924
f4fe53f86627 - Issue #8509: Fix quoting in help strings and code snippets in configure.in.
Matthias Klose <doko@ubuntu.com>
parents: 60694
diff changeset
4292 [Define to `int' if <sys/socket.h> does not define.]),[
26148
0b611e50c5fc Use new-style CHECK_TYPE to avoid modifying confdefs.h. Include sys/types.h
Martin v. Löwis <martin@v.loewis.de>
parents: 26147
diff changeset
4293 #ifdef HAVE_SYS_TYPES_H
0b611e50c5fc Use new-style CHECK_TYPE to avoid modifying confdefs.h. Include sys/types.h
Martin v. Löwis <martin@v.loewis.de>
parents: 26147
diff changeset
4294 #include <sys/types.h>
0b611e50c5fc Use new-style CHECK_TYPE to avoid modifying confdefs.h. Include sys/types.h
Martin v. Löwis <martin@v.loewis.de>
parents: 26147
diff changeset
4295 #endif
12715
6ad8cd34ad8c Fix the test for socklen_t so that it searches through sys/socket.h.
Guido van Rossum <guido@python.org>
parents: 12668
diff changeset
4296 #ifdef HAVE_SYS_SOCKET_H
6ad8cd34ad8c Fix the test for socklen_t so that it searches through sys/socket.h.
Guido van Rossum <guido@python.org>
parents: 12668
diff changeset
4297 #include <sys/socket.h>
6ad8cd34ad8c Fix the test for socklen_t so that it searches through sys/socket.h.
Guido van Rossum <guido@python.org>
parents: 12668
diff changeset
4298 #endif
26148
0b611e50c5fc Use new-style CHECK_TYPE to avoid modifying confdefs.h. Include sys/types.h
Martin v. Löwis <martin@v.loewis.de>
parents: 26147
diff changeset
4299 ])
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4300
65386
d4390b6bf7ec Merged revisions 85554 via svnmerge from
R. David Murray <rdmurray@bitdance.com>
parents: 65203
diff changeset
4301 case $ac_sys_system in
d4390b6bf7ec Merged revisions 85554 via svnmerge from
R. David Murray <rdmurray@bitdance.com>
parents: 65203
diff changeset
4302 AIX*)
d4390b6bf7ec Merged revisions 85554 via svnmerge from
R. David Murray <rdmurray@bitdance.com>
parents: 65203
diff changeset
4303 AC_DEFINE(HAVE_BROKEN_PIPE_BUF, 1, [Define if the system reports an invalid PIPE_BUF value.]) ;;
d4390b6bf7ec Merged revisions 85554 via svnmerge from
R. David Murray <rdmurray@bitdance.com>
parents: 65203
diff changeset
4304 esac
d4390b6bf7ec Merged revisions 85554 via svnmerge from
R. David Murray <rdmurray@bitdance.com>
parents: 65203
diff changeset
4305
d4390b6bf7ec Merged revisions 85554 via svnmerge from
R. David Murray <rdmurray@bitdance.com>
parents: 65203
diff changeset
4306
21134
abe14ac62024 Compute thread headers through shell expansion in configure.
Martin v. Löwis <martin@v.loewis.de>
parents: 21128
diff changeset
4307 AC_SUBST(THREADHEADERS)
abe14ac62024 Compute thread headers through shell expansion in configure.
Martin v. Löwis <martin@v.loewis.de>
parents: 21128
diff changeset
4308
abe14ac62024 Compute thread headers through shell expansion in configure.
Martin v. Löwis <martin@v.loewis.de>
parents: 21128
diff changeset
4309 for h in `(cd $srcdir;echo Python/thread_*.h)`
abe14ac62024 Compute thread headers through shell expansion in configure.
Martin v. Löwis <martin@v.loewis.de>
parents: 21128
diff changeset
4310 do
abe14ac62024 Compute thread headers through shell expansion in configure.
Martin v. Löwis <martin@v.loewis.de>
parents: 21128
diff changeset
4311 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
abe14ac62024 Compute thread headers through shell expansion in configure.
Martin v. Löwis <martin@v.loewis.de>
parents: 21128
diff changeset
4312 done
abe14ac62024 Compute thread headers through shell expansion in configure.
Martin v. Löwis <martin@v.loewis.de>
parents: 21128
diff changeset
4313
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4314 AC_SUBST(SRCDIRS)
36087
49a0493f245e Jack said we don't need the Mac/Python/ directory any more.
Neal Norwitz <nnorwitz@gmail.com>
parents: 36033
diff changeset
4315 SRCDIRS="Parser Grammar Objects Python Modules Mac"
16290
7a251440ce67 Removed setup.cfg from the list of generated files
Andrew M. Kuchling <amk@amk.ca>
parents: 16276
diff changeset
4316 AC_MSG_CHECKING(for build directories)
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4317 for dir in $SRCDIRS; do
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4318 if test ! -d $dir; then
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4319 mkdir $dir
15370
2e1ab0c941c0 Make sure the Modules/ directory is created before writing Modules/Setup.
Fred Drake <fdrake@acm.org>
parents: 15365
diff changeset
4320 fi
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4321 done
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4322 AC_MSG_RESULT(done)
15343
acf2b19e4344 Test for and create Modules/Setup in the configure script if it does not
Fred Drake <fdrake@acm.org>
parents: 15245
diff changeset
4323
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
4324 # generate output files
54316
f8cadfb4a1a2 Issue #3585: Add pkg-config support.
Antoine Pitrou <solipsis@pitrou.net>
parents: 54289
diff changeset
4325 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
64618
e27030e0cced Merged revisions 84680 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 64611
diff changeset
4326 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
25923
834b0e0389c5 Patch #623771: Properly use autoconf 2.5x macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 25921
diff changeset
4327 AC_OUTPUT
16276
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4328
37714
ec986aabe1fd Patch #1045620: Prepend Modules/ before Setup in stdout.
Martin v. Löwis <martin@v.loewis.de>
parents: 37709
diff changeset
4329 echo "creating Modules/Setup"
16276
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4330 if test ! -f Modules/Setup
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4331 then
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4332 cp $srcdir/Modules/Setup.dist Modules/Setup
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4333 fi
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4334
37714
ec986aabe1fd Patch #1045620: Prepend Modules/ before Setup in stdout.
Martin v. Löwis <martin@v.loewis.de>
parents: 37709
diff changeset
4335 echo "creating Modules/Setup.local"
16276
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4336 if test ! -f Modules/Setup.local
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4337 then
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4338 echo "# Edit this file for local setup changes" >Modules/Setup.local
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4339 fi
16227
8c4db8b9af9b - build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16142
diff changeset
4340
16276
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4341 echo "creating Makefile"
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4342 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
ca85547fcb5e - LIBRARY is now a SUBST variable.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16227
diff changeset
4343 -s Modules Modules/Setup.config \
17611
1eb00a123a0e Process Setup* files with makesetup in the same order as the makefile.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 17571
diff changeset
4344 Modules/Setup.local Modules/Setup
42699
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4345
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4346 case $ac_sys_system in
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4347 BeOS)
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4348 AC_MSG_WARN([
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4349
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4350 Support for BeOS is deprecated as of Python 2.6.
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4351 See PEP 11 for the gory details.
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4352 ])
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4353 ;;
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4354 *) ;;
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4355 esac
3b4e39e83193 Note that BeOS is unsupported as of Python 2.6.
Skip Montanaro <skip@pobox.com>
parents: 42412
diff changeset
4356
16669
990fa25cde1c Use -G option for linking shared libraries on Solaris (SF patch #103656).
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16627
diff changeset
4357 mv config.c Modules