annotate configure.in @ 4566:6403c94de50d legacy-trunk

Added safeguard against failure in __del__.
author Guido van Rossum <guido@python.org>
date Wed, 27 Nov 1996 19:39:58 +0000
parents 2e87b81176f9
children 3ee87d082147
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
1 dnl Process this file with autoconf 2.0 or later to make a configure script.
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
2 AC_REVISION($Revision$)
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
3 AC_PREREQ(2.0)
1456
19fa01c9faf3 Alpha 1.0.0
Guido van Rossum <guido@python.org>
parents: 1453
diff changeset
4 AC_INIT(Include/object.h)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
5 AC_CONFIG_HEADER(config.h)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
6
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
7 # NEXTSTEP stuff
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
8 if test -f /usr/lib/NextStep/software_version; then
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
9
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
10 AC_MSG_CHECKING(for --with-next-archs)
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
11 AC_ARG_WITH(next-archs,
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
12 [--with-next-archs='arch1 arch2 ..' build MAB binary], [
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
13 if test -n "$withval"; then
4268
2e87b81176f9 Shortened some lines
Guido van Rossum <guido@python.org>
parents: 4253
diff changeset
14 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
2e87b81176f9 Shortened some lines
Guido van Rossum <guido@python.org>
parents: 4253
diff changeset
15 # GCC does not currently support multi archs on the NeXT
2e87b81176f9 Shortened some lines
Guido van Rossum <guido@python.org>
parents: 4253
diff changeset
16 with_gcc=no
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
17 fi
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
18 AC_MSG_RESULT($with_next_archs)
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
19 ], [AC_MSG_RESULT(none: using `arch`)])
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
20
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
21 if test -z "$MACHDEP"
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
22 then
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
23 set X `hostinfo | grep 'NeXT Mach.*:' | \
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
24 sed -e 's/://' -e 's/\./_/'` && \
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
25 ac_sys_system=next && ac_sys_release=$4
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
26
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
27 MACHDEP="$ac_sys_system$ac_sys_release"
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
28 fi
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
29 fi
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
30
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
31 # 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
32 AC_SUBST(MACHDEP)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
33 AC_MSG_CHECKING(MACHDEP)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
34 if test -z "$MACHDEP"
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
35 then
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
36 ac_sys_system=`uname -s`
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
37 if test "$ac_sys_system" = "AIX" ; then
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
38 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
39 else
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
40 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
41 fi
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
42 ac_md_system=`echo $ac_sys_system |
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
43 tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
44 ac_md_release=`echo $ac_sys_release |
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
45 tr -d '[/ ]' | sed 's/\..*//'`
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
46 MACHDEP="$ac_md_system$ac_md_release"
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
47
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
48 case MACHDEP in
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
49 '') MACHDEP=unknown;;
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
50 esac
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
51 fi
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
52 AC_MSG_RESULT($MACHDEP)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
53
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
54 # checks for alternative programs
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
55 AC_MSG_CHECKING(for --without-gcc)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
56 AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
57 case $withval in
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
58 no) CC=cc
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
59 without_gcc=yes;;
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
60 yes) CC=gcc
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
61 without_gcc=no;;
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
62 *) CC=$withval
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
63 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
64 esac], [
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
65 case $ac_sys_system in
3089
ef9ac6def71d on osf/1, never use gcc; added test for strftime()
Guido van Rossum <guido@python.org>
parents: 3007
diff changeset
66 OSF1) CC=cc
ef9ac6def71d on osf/1, never use gcc; added test for strftime()
Guido van Rossum <guido@python.org>
parents: 3007
diff changeset
67 without_gcc=;;
ef9ac6def71d on osf/1, never use gcc; added test for strftime()
Guido van Rossum <guido@python.org>
parents: 3007
diff changeset
68 *) without_gcc=no;;
ef9ac6def71d on osf/1, never use gcc; added test for strftime()
Guido van Rossum <guido@python.org>
parents: 3007
diff changeset
69 esac])
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
70 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
71
2508
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
72 # 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
73 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
74 then
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
75 AC_ERROR(cached CC is different -- throw away $cache_file
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
76 (it is also a good idea to do 'make clean' before compiling))
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
77 fi
47cc53a1fd47 added test for CC value not matching cache
Guido van Rossum <guido@python.org>
parents: 2329
diff changeset
78
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
79 AC_PROG_CC
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
80 AC_PROG_RANLIB
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
81 AC_SUBST(AR)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
82 AC_CHECK_PROGS(AR, ar aal, ar)
1803
fafa5dc8100f Simplify value of INSTALL (always 'cp').
Guido van Rossum <guido@python.org>
parents: 1779
diff changeset
83 AC_SUBST(INSTALL)
2193
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
84 AC_SUBST(INSTALL_PROGRAM)
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
85 AC_SUBST(INSTALL_DATA)
1803
fafa5dc8100f Simplify value of INSTALL (always 'cp').
Guido van Rossum <guido@python.org>
parents: 1779
diff changeset
86 # Install just never works :-(
fafa5dc8100f Simplify value of INSTALL (always 'cp').
Guido van Rossum <guido@python.org>
parents: 1779
diff changeset
87 if test -z "$INSTALL"
2193
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
88 then
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
89 INSTALL=cp
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
90 INSTALL_PROGRAM=cp
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
91 INSTALL_DATA=cp
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
92 else
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
93 INSTALL_PROGRAM="$INSTALL"
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
94 INSTALL_DATA="$INSTALL -m 644"
1803
fafa5dc8100f Simplify value of INSTALL (always 'cp').
Guido van Rossum <guido@python.org>
parents: 1779
diff changeset
95 fi
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
96
1803
fafa5dc8100f Simplify value of INSTALL (always 'cp').
Guido van Rossum <guido@python.org>
parents: 1779
diff changeset
97 # Optimizer/debugger flags passed between Makefiles
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
98 AC_SUBST(OPT)
1803
fafa5dc8100f Simplify value of INSTALL (always 'cp').
Guido van Rossum <guido@python.org>
parents: 1779
diff changeset
99 if test -z "$OPT"
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
100 then
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
101 case $ac_sys_system in
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
102 *) OPT="-O";;
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
103 esac
1803
fafa5dc8100f Simplify value of INSTALL (always 'cp').
Guido van Rossum <guido@python.org>
parents: 1779
diff changeset
104 fi
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
105
4252
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
106 if test "$ac_arch_flags"
3891
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
107 then
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
108 OPT="$OPT $ac_arch_flags"
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
109 fi
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
110 # checks for UNIX variants that set C preprocessor variables
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
111 AC_AIX
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
112 AC_MINIX
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
113
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
114 # check for ANSI or K&R ("traditional") preprocessor
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
115 AC_MSG_CHECKING(for C preprocessor type)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
116 AC_TRY_COMPILE([
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
117 #define spam(name, doc) {#name, &name, #name "() -- " doc}
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
118 int foo;
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
119 struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
120 ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
121 AC_MSG_RESULT($cpp_type)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
122
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
123 # checks for header files
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
124 AC_HEADER_STDC
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
125 AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h ncurses.h \
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
126 signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
3740
e4807a0c1092 added plock
Guido van Rossum <guido@python.org>
parents: 3722
diff changeset
127 sys/audioio.h sys/lock.h sys/param.h sys/select.h sys/time.h sys/times.h \
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
128 sys/un.h sys/utsname.h sys/wait.h)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
129 AC_HEADER_DIRENT
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
130
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
131 # checks for typedefs
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
132 was_it_defined=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
133 AC_MSG_CHECKING(for clock_t in time.h)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
134 AC_EGREP_HEADER(clock_t, time.h, was_it_defined=yes, AC_DEFINE(clock_t, long))
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
135 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
136
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
137 # 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
138 cat >> confdefs.h <<\EOF
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
139 #if defined(SCO_DS)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
140 #undef _OFF_T
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
141 #endif
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
142 EOF
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
143
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
144 AC_TYPE_MODE_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
145 AC_TYPE_OFF_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
146 AC_TYPE_PID_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
147 AC_TYPE_SIGNAL
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
148 AC_TYPE_SIZE_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
149 AC_TYPE_UID_T
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
150
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
151
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
152 # Set info about shared libraries.
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
153 AC_SUBST(SO)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
154 AC_SUBST(LDSHARED)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
155 AC_SUBST(CCSHARED)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
156 AC_SUBST(LINKFORSHARED)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
157 # SO is the extension of shared libraries `(including the dot!)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
158 # -- usually .so, .sl on HP-UX
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
159 AC_MSG_CHECKING(SO)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
160 if test -z "$SO"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
161 then
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
162 case $ac_sys_system in
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
163 hp*|HP*) SO=.sl;;
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
164 *) SO=.so;;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
165 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
166 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
167 AC_MSG_RESULT($SO)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
168 # LDSHARED is the ld *command* used to create shared library
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
169 # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
170 AC_MSG_CHECKING(LDSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
171 if test -z "$LDSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
172 then
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
173 case $ac_sys_system/$ac_sys_release in
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
174 AIX*) LDSHARED="ld_so_aix \$(CC)";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
175 IRIX*) LDSHARED="ld -shared";;
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
176 SunOS/4*) LDSHARED="ld";;
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
177 SunOS/5*) LDSHARED="ld -G";;
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
178 hp*|HP*) LDSHARED="ld -b";;
2245
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
179 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2193
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
180 DYNIX/ptx*) LDSHARED="ld -G";;
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
181 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
3782
3eb1694edce6 Use gcc, not gcc-elf on Linux
Guido van Rossum <guido@python.org>
parents: 3740
diff changeset
182 Linux*) LDSHARED="gcc -shared";;
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
183 FreeBSD*) LDSHARED="ld -Bshareable";;
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
184 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
185 *) LDSHARED="ld";;
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
186 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
187 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
188 AC_MSG_RESULT($LDSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
189 # CCSHARED are the C *flags* used to create objects to go into a shared
2731
9f82a6bb0010 linux elf shlib; sys/wait.h; don't add -posix for NeXT
Guido van Rossum <guido@python.org>
parents: 2508
diff changeset
190 # library -- 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
191 AC_MSG_CHECKING(CCSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
192 if test -z "$CCSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
193 then
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
194 case $ac_sys_system in
2329
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
195 hp*|HP*) if test "$GCC" = yes;
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
196 then CCSHARED="-fpic";
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
197 else CCSHARED="+z";
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
198 fi;;
2731
9f82a6bb0010 linux elf shlib; sys/wait.h; don't add -posix for NeXT
Guido van Rossum <guido@python.org>
parents: 2508
diff changeset
199 Linux*) CCSHARED="-fpic";;
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
200 FreeBSD*) CCSHARED="-fpic";;
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
201 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
202 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
203 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
204 AC_MSG_RESULT($CCSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
205 # 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
206 # 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
207 AC_MSG_CHECKING(LINKFORSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
208 if test -z "$LINKFORSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
209 then
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
210 case $ac_sys_system in
3908
8671642e14a3 Changes for AIX; also remove all references to _REENTRANT.
Guido van Rossum <guido@python.org>
parents: 3891
diff changeset
211 AIX*) LINKFORSHARED="-Wl,-bE:python.exp";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
212 hp*|HP*) LINKFORSHARED="-Wl,-E";;
2731
9f82a6bb0010 linux elf shlib; sys/wait.h; don't add -posix for NeXT
Guido van Rossum <guido@python.org>
parents: 2508
diff changeset
213 Linux*) LINKFORSHARED="-rdynamic";;
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
214 next) LINKFORSHARED="-u libsys_s";;
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
215 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
216 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
217 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
218 AC_MSG_RESULT($LINKFORSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
219
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
220 # checks for libraries
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
221 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
222 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
223 AC_CHECK_LIB(sun, getpwnam) # NIS (== YP) interface for IRIX 4
2245
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
224 # The following three (nsl,inet,socket) are needed on Sequent;
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
225 # the order of checking must be this. Most SVR4 platforms will
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
226 # need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
227 # broken. I see no elegant solution (probably CHECK_LIB should be
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
228 # fixed to only add the library if the given entry point is not
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
229 # satisfied without it).
4180
7ede012a35c5 Added checks for strdup and changed checks for hypot.
Guido van Rossum <guido@python.org>
parents: 4029
diff changeset
230 if test "$ac_sys_system" != IRIX
2245
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
231 then
2161
f06222e07ca7 hopefully final changes for Sequent -linet
Guido van Rossum <guido@python.org>
parents: 2130
diff changeset
232 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
233 AC_CHECK_LIB(inet, gethostbyname, [LIBS="-linet $LIBS"], [], -lnsl) # Sequent
f06222e07ca7 hopefully final changes for Sequent -linet
Guido van Rossum <guido@python.org>
parents: 2130
diff changeset
234 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
2245
7fa48ab4be0f add OSF/1 LDSHARED; add IRIX5 conditional for sockets
Guido van Rossum <guido@python.org>
parents: 2195
diff changeset
235 fi
3891
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
236 AC_MSG_CHECKING(for --with-libs)
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
237 AC_ARG_WITH(libs, [--with-libs='lib1 ...' link against additional libs], [
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
238 AC_MSG_RESULT($withval)
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
239 LIBS="$withval $LIBS"
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
240 ], AC_MSG_RESULT(no))
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
241
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
242 AC_MSG_CHECKING(for --with-readline)
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
243 AC_ARG_WITH(readline, [--with-readline[=DIRECTORY] use GNU readline library], [
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
244 AC_MSG_RESULT($withval)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
245 AC_DEFINE(WITH_READLINE)
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
246 if test -d "$withval"
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
247 then LDFLAGS="$LDFLAGS -L$withval"
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
248 fi
4252
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
249 # first check if we can compile without lib termcap
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
250 AC_MSG_CHECKING(for -lreadline without -ltermcap)
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
251 # check if a libreadline exists
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
252 LIBS="$LIBS -lreadline"
4252
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
253 AC_TRY_LINK(extern char *readline();,char *line=readline();,[
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
254 AC_MSG_RESULT(yes)],[
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
255 AC_MSG_RESULT(no)
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
256 AC_CHECKING(for -lreadline that needs -ltermcap)
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
257 termcap=
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
258 AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
259 AC_CHECK_LIB(termlib, tgetent, [termcap=termlib], [
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
260 AC_ERROR(no working -ltermcap/termlib found -- do not use --with-readline)])])
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
261 # Avoid possible conflict between shared libraries termcap and gl
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
262 # on IRIX 5: both contain a routine called clear.
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
263 if test -f /usr/lib/lib$termcap.a
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
264 then LIBS="$LIBS /usr/lib/lib$termcap.a"
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
265 else LIBS="$LIBS -l$termcap"
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
266 fi
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
267 AC_MSG_CHECKING(for -lreadline)
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
268 AC_TRY_LINK(extern char *readline();, char *line=readline();,[
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
269 AC_MSG_RESULT(yes)],[
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
270 AC_ERROR(no working GNU readline library found -- do not use --with-readline)])
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
271 ])
6b6c5d12130c Fixed nextstep buglet; check for libreadline w/o libterm*
Guido van Rossum <guido@python.org>
parents: 4184
diff changeset
272 ],
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
273 AC_MSG_RESULT(no))
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
274
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
275 AC_MSG_CHECKING(for --with-thread)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
276 AC_ARG_WITH(thread, [--with-thread[=DIRECTORY] make interpreter thread-safe], [
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
277 AC_MSG_RESULT($withval)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
278 if test -d "$withval"
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
279 then LDFLAGS="$LDFLAGS -L$withval"
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
280 fi
3911
a9a92dc2b374 Put definition of _REENTRANT in config.h
Guido van Rossum <guido@python.org>
parents: 3908
diff changeset
281 AC_DEFINE(_REENTRANT)
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
282 AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
283 AC_DEFINE(C_THREADS)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
284 LIBOBJS="$LIBOBJS thread.o"],[
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
285 AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
286 AC_DEFINE(_POSIX_THREADS)
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
287 LIBS="$LIBS -lpthreads"
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
288 LIBOBJS="$LIBOBJS thread.o"], [
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
289 AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
290 AC_DEFINE(_POSIX_THREADS)
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
291 LIBS="$LIBS -lpthread"
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
292 LIBOBJS="$LIBOBJS thread.o"])
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
293 ])])
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
294 AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
295 LIBS="$LIBS -lmpc"
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
296 LIBOBJS="$LIBOBJS thread.o"])
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
297 AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
298 LIBS="$LIBS -lthread"
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
299 LIBOBJS="$LIBOBJS thread.o"])
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
300 ], AC_MSG_RESULT(no))
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
301
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
302 # -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
303 AC_SUBST(DLINCLDIR)
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
304 DLINCLDIR=/
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
305
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
306 AC_MSG_CHECKING(for --with-sgi-dl)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
307 AC_ARG_WITH(sgi-dl, [--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking], [
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
308 AC_MSG_RESULT($withval)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
309 AC_DEFINE(WITH_SGI_DL)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
310 dldir=$withval
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
311 if test -d "$dldir"
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
312 then LDFLAGS="$LDFLAGS -L$dldir"
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
313 else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
314 fi
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
315 DLINCLDIR=${dldir}
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
316 LIBS="$LIBS -ldl -lmld"], AC_MSG_RESULT(no))
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
317
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
318 AC_MSG_CHECKING(for --with-dl-dld)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
319 AC_ARG_WITH(dl-dld, [--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking], [
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
320 AC_MSG_RESULT($withval)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
321 AC_DEFINE(WITH_DL_DLD)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
322 dldir=`echo "$withval" | sed 's/,.*//'`
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
323 dlddir=`echo "$withval" | sed 's/.*,//'`
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
324 if test -d "$dldir" -a -d "$dlddir"
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
325 then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
326 else AC_ERROR(proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY)
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
327 fi
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
328 DLINCLDIR=${dldir}
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
329 LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no))
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
330
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
331 # checks for library functions
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
332 AC_CHECK_FUNCS(chown clock dlopen flock ftime ftruncate \
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
333 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
3809
bf3f80941ec1 Added putenv to AC_CHECK_FUNCS list.
Guido van Rossum <guido@python.org>
parents: 3782
diff changeset
334 link lstat mkfifo nice plock putenv readlink \
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
335 select setgid setuid setsid setpgid setpgrp setvbuf \
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
336 sigaction siginterrupt sigrelse strftime symlink \
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
337 tcgetpgrp tcsetpgrp times truncate uname waitpid)
4180
7ede012a35c5 Added checks for strdup and changed checks for hypot.
Guido van Rossum <guido@python.org>
parents: 4029
diff changeset
338 AC_REPLACE_FUNCS(dup2 getcwd strdup strerror memmove)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
339 AC_CHECK_FUNC(getpgrp, AC_TRY_COMPILE([#include <unistd.h>], [getpgrp(0);], AC_DEFINE(GETPGRP_HAVE_ARG)))
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
340 AC_CHECK_FUNC(setpgrp, AC_TRY_COMPILE([#include <unistd.h>], [setpgrp(0,0);], AC_DEFINE(SETPGRP_HAVE_ARG)))
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
341 AC_CHECK_FUNC(gettimeofday, AC_TRY_COMPILE([#include <sys/time.h>], [gettimeofday((struct timeval*)0,(struct timezone*)0);], ,AC_DEFINE(GETTIMEOFDAY_NO_TZ)))
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
342
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
343 # checks for structures
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
344 AC_HEADER_TIME
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
345 AC_STRUCT_TM
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
346 AC_STRUCT_TIMEZONE
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
347
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
348 AC_MSG_CHECKING(for time.h that defines altzone)
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
349 AC_CACHE_VAL(ac_cv_header_time_altzone,
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
350 [AC_TRY_COMPILE([#include <time.h>], [return altzone;],
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
351 ac_cv_header_time_altzone=yes,
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
352 ac_cv_header_time_altzone=no)])
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
353 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
354 if test $ac_cv_header_time_altzone = yes; then
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
355 AC_DEFINE(HAVE_ALTZONE)
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
356 fi
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
357
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
358 was_it_defined=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
359 AC_MSG_CHECKING(whether sys/select.h and sys/time.h may both be included)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
360 AC_TRY_COMPILE([
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
361 #include <sys/types.h>
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
362 #include <sys/select.h>
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
363 #include <sys/time.h>
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
364 ], [;], [AC_DEFINE(SYS_SELECT_WITH_SYS_TIME) was_it_defined=yes])
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
365 AC_MSG_RESULT($was_it_defined)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
366
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
367 # checks for compiler characteristics
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
368
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
369 AC_C_CHAR_UNSIGNED
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
370
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
371 AC_C_CONST
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
372
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
373 works=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
374 AC_MSG_CHECKING(for working volatile)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
375 AC_TRY_COMPILE([],[volatile int x; x = 0;], works=yes, AC_DEFINE(volatile, []))
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
376 AC_MSG_RESULT($works)
1974
f95c193bfe65 add test for volatile
Guido van Rossum <guido@python.org>
parents: 1941
diff changeset
377
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
378 works=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
379 AC_MSG_CHECKING(for working signed char)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
380 AC_TRY_COMPILE([], [signed char c;], works=yes, AC_DEFINE(signed, []))
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
381 AC_MSG_RESULT($works)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
382
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
383 have_prototypes=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
384 AC_MSG_CHECKING(for prototypes)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
385 AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
386 AC_DEFINE(HAVE_PROTOTYPES) have_prototypes=yes)
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
387 AC_MSG_RESULT($have_prototypes)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
388
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
389 works=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
390 AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
391 AC_TRY_COMPILE([
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
392 #include <stdarg.h>
4184
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
393 int foo(int x, ...) {
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
394 va_list va;
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
395 va_start(va, x);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
396 va_arg(va, int);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
397 va_arg(va, char *);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
398 va_arg(va, double);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
399 return 0;
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
400 }
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
401 ], [return foo(10, "", 3.14);],
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
402 AC_DEFINE(HAVE_STDARG_PROTOTYPES) works=yes)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
403 AC_MSG_RESULT($works)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
404
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
405 if test "$have_prototypes" = yes; then
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
406 bad_prototypes=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
407 AC_MSG_CHECKING(for bad exec* prototypes)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
408 AC_TRY_COMPILE([#include <unistd.h>], [char **t;execve("@",t,t);], ,
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
409 AC_DEFINE(BAD_EXEC_PROTOTYPES) bad_prototypes=yes)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
410 AC_MSG_RESULT($bad_prototypes)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
411 fi
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
412
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
413 bad_forward=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
414 AC_MSG_CHECKING(for bad static forward)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
415 AC_TRY_RUN([
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
416 struct s { int a; int b; };
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
417 static struct s foo;
2015
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
418 int foobar() {
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
419 static int random;
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
420 random = (int) &foo;
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
421 return random;
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
422 }
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
423 static struct s foo = { 1, 2 };
2015
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
424 main() {
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
425 exit(!((int)&foo == foobar()));
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
426 }
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
427 ], , AC_DEFINE(BAD_STATIC_FORWARD) bad_forward=yes)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
428 AC_MSG_RESULT($bad_forward)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
429
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
430 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
431 AC_MSG_CHECKING(whether va_list is an array)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
432 AC_TRY_COMPILE([
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
433 #ifdef HAVE_STDARG_PROTOTYPES
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
434 #include <stdarg.h>
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
435 #else
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
436 #include <varargs.h>
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
437 #endif
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
438 ], [va_list list1, list2; list1 = list2;], ,
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
439 AC_DEFINE(VA_LIST_IS_ARRAY) va_list_is_array=yes)
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
440 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
441
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
442 # checks for system services
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
443 # (none yet)
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
444
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
445 # Linux requires this for correct f.p. operations
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
446 AC_CHECK_LIB(ieee, __fpu_control)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
447
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
448 # check for --with-libm=...
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
449 AC_SUBST(LIBM)
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
450 case $ac_sys_system in
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
451 next) ;;
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
452 *) LIBM=-lm
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
453 esac
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
454 AC_ARG_WITH(libm, [--with-libm=STRING math library], [
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
455 if test "$withval" != yes
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
456 then LIBM=$withval
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
457 else AC_ERROR(proper usage is --with-libm=STRING)
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
458 fi])
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
459
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
460 # check for --with-libc=...
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
461 AC_SUBST(LIBC)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
462 AC_ARG_WITH(libc, [--with-libc=STRING C library], [
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
463 if test "$withval" != yes
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
464 then LIBC=$withval
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
465 else AC_ERROR(proper usage is --with-libc=STRING)
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
466 fi])
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
467
2057
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
468 # check for hypot() in math library
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
469 LIBS_SAVE=$LIBS
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
470 LIBS="$LIBS $LIBM"
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
471 AC_CHECK_FUNCS(hypot)
4180
7ede012a35c5 Added checks for strdup and changed checks for hypot.
Guido van Rossum <guido@python.org>
parents: 4029
diff changeset
472 AC_REPLACE_FUNCS(hypot)
2057
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
473 LIBS=$LIBS_SAVE
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
474
2193
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
475 # check for getopt
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
476 AC_MSG_CHECKING(for genuine getopt)
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
477 AC_CACHE_VAL(ac_cv_func_getopt,
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
478 [AC_TRY_RUN([#include <stdio.h>
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
479 extern int optind, opterr, getopt();
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
480 extern char* optarg;
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
481 int main() {
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
482 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
483 opterr = 0;
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
484 if (getopt(3, av, "f:") == 'f') { exit(1); }
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
485 exit(0);
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
486 }], ac_cv_func_getopt=yes, ac_cv_func_getopt=no, ac_cv_func_getopt=no)])dnl
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
487 AC_MSG_RESULT($ac_cv_func_getopt)
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
488 test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
489 AC_SUBST(LIBOBJS)dnl
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
490
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
491 # generate output files
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
492 AC_OUTPUT(Makefile \
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
493 Objects/Makefile \
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
494 Parser/Makefile \
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
495 Python/Makefile \
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
496 Modules/Makefile.pre)