annotate configure.in @ 5817:48b94de85bf3 legacy-trunk

Extensive changes by AMK.
author Guido van Rossum <guido@python.org>
date Thu, 17 Jul 1997 16:29:42 +0000
parents a8e31d905d2c
children 5a8a5a1a0475
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
5207
00ebfa33cc07 Fix typo (missing $ in )
Guido van Rossum <guido@python.org>
parents: 5034
diff changeset
48 case $MACHDEP in
3852
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
5521
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
114 AC_MSG_CHECKING(whether $CC accepts -Olimit 1500)
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
115 AC_CACHE_VAL(ac_cv_olimit_ok,
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
116 [ac_save_cc="$CC"
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
117 CC="$CC -Olimit 1500"
5669
85134b97ae4d Use TRY_RUN, not TRY_COMPILE, to test for -Olimit (on Solaris,
Guido van Rossum <guido@python.org>
parents: 5596
diff changeset
118 AC_TRY_RUN([int main() { return 0; }],
5521
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
119 ac_cv_olimit_ok=yes,
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
120 ac_cv_olimit_ok=no)
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
121 CC="$ac_save_cc"])
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
122 AC_MSG_RESULT($ac_cv_olimit_ok)
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
123 if test $ac_cv_olimit_ok = yes; then
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
124 OPT="$OPT -Olimit 1500"
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
125 fi
8803bf404b69 Add -Olimit 1500 to OPT if CC supports it.
Guido van Rossum <guido@python.org>
parents: 5497
diff changeset
126
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
127 # check for ANSI or K&R ("traditional") preprocessor
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
128 AC_MSG_CHECKING(for C preprocessor type)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
129 AC_TRY_COMPILE([
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
130 #define spam(name, doc) {#name, &name, #name "() -- " doc}
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
131 int foo;
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
132 struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
133 ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
134 AC_MSG_RESULT($cpp_type)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
135
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
136 # checks for header files
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
137 AC_HEADER_STDC
5382
3f558a32c498 Added test for pthread.h.
Guido van Rossum <guido@python.org>
parents: 5207
diff changeset
138 AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h ncurses.h pthread.h \
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
139 signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
4608
3ee87d082147 Test for sys/file.h.
Guido van Rossum <guido@python.org>
parents: 4268
diff changeset
140 sys/audioio.h sys/file.h sys/lock.h \
3ee87d082147 Test for sys/file.h.
Guido van Rossum <guido@python.org>
parents: 4268
diff changeset
141 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
142 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
143 AC_HEADER_DIRENT
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
144
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
145 # checks for typedefs
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
146 was_it_defined=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
147 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
148 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
149 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
150
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
151 # 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
152 cat >> confdefs.h <<\EOF
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
153 #if defined(SCO_DS)
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
154 #undef _OFF_T
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
155 #endif
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
156 EOF
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
157
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
158 AC_TYPE_MODE_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
159 AC_TYPE_OFF_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
160 AC_TYPE_PID_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
161 AC_TYPE_SIGNAL
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
162 AC_TYPE_SIZE_T
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
163 AC_TYPE_UID_T
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
164
4608
3ee87d082147 Test for sys/file.h.
Guido van Rossum <guido@python.org>
parents: 4268
diff changeset
165 AC_CHECK_SIZEOF(int)
3ee87d082147 Test for sys/file.h.
Guido van Rossum <guido@python.org>
parents: 4268
diff changeset
166 AC_CHECK_SIZEOF(long)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
167
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
168 # Set info about shared libraries.
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
169 AC_SUBST(SO)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
170 AC_SUBST(LDSHARED)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
171 AC_SUBST(CCSHARED)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
172 AC_SUBST(LINKFORSHARED)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
173 # SO is the extension of shared libraries `(including the dot!)
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
174 # -- 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
175 AC_MSG_CHECKING(SO)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
176 if test -z "$SO"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
177 then
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
178 case $ac_sys_system in
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
179 hp*|HP*) SO=.sl;;
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
180 *) SO=.so;;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
181 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
182 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
183 AC_MSG_RESULT($SO)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
184 # LDSHARED is the ld *command* used to create shared library
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
185 # -- "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
186 AC_MSG_CHECKING(LDSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
187 if test -z "$LDSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
188 then
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
189 case $ac_sys_system/$ac_sys_release in
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
190 AIX*) LDSHARED="ld_so_aix \$(CC)";;
5382
3f558a32c498 Added test for pthread.h.
Guido van Rossum <guido@python.org>
parents: 5207
diff changeset
191 IRIX/5*) LDSHARED="ld -shared";;
5669
85134b97ae4d Use TRY_RUN, not TRY_COMPILE, to test for -Olimit (on Solaris,
Guido van Rossum <guido@python.org>
parents: 5596
diff changeset
192 IRIX*/6*) LDSHARED="ld $SGI_ABI -shared -all"; OPT="$OPT $SGI_ABI";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
193 SunOS/4*) LDSHARED="ld";;
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
194 SunOS/5*) LDSHARED="ld -G";;
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
195 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
196 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
197 DYNIX/ptx*) LDSHARED="ld -G";;
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
198 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
199 Linux*) LDSHARED="gcc -shared";;
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
200 FreeBSD*) LDSHARED="ld -Bshareable";;
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
201 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
202 *) LDSHARED="ld";;
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
203 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
204 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
205 AC_MSG_RESULT($LDSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
206 # 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
207 # 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
208 AC_MSG_CHECKING(CCSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
209 if test -z "$CCSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
210 then
5382
3f558a32c498 Added test for pthread.h.
Guido van Rossum <guido@python.org>
parents: 5207
diff changeset
211 case $ac_sys_system/$ac_sys_release in
2329
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
212 hp*|HP*) if test "$GCC" = yes;
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
213 then CCSHARED="-fpic";
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
214 else CCSHARED="+z";
1b262d190a4a the usual
Guido van Rossum <guido@python.org>
parents: 2245
diff changeset
215 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
216 Linux*) CCSHARED="-fpic";;
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
217 FreeBSD*) CCSHARED="-fpic";;
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
218 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
5669
85134b97ae4d Use TRY_RUN, not TRY_COMPILE, to test for -Olimit (on Solaris,
Guido van Rossum <guido@python.org>
parents: 5596
diff changeset
219 IRIX*/6*) CCSHARED="$SGI_ABI -all";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
220 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
221 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
222 AC_MSG_RESULT($CCSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
223 # 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
224 # 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
225 AC_MSG_CHECKING(LINKFORSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
226 if test -z "$LINKFORSHARED"
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
227 then
5382
3f558a32c498 Added test for pthread.h.
Guido van Rossum <guido@python.org>
parents: 5207
diff changeset
228 case $ac_sys_system/$ac_sys_release in
5497
377f8695a9fb Added $(srcdir)/ prefix to python.exp for AIX.
Guido van Rossum <guido@python.org>
parents: 5469
diff changeset
229 AIX*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
4608
3ee87d082147 Test for sys/file.h.
Guido van Rossum <guido@python.org>
parents: 4268
diff changeset
230 hp*|HP*)
3ee87d082147 Test for sys/file.h.
Guido van Rossum <guido@python.org>
parents: 4268
diff changeset
231 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/sharedmodules";;
2731
9f82a6bb0010 linux elf shlib; sys/wait.h; don't add -posix for NeXT
Guido van Rossum <guido@python.org>
parents: 2508
diff changeset
232 Linux*) LINKFORSHARED="-rdynamic";;
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
233 next) LINKFORSHARED="-u libsys_s";;
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
234 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
5669
85134b97ae4d Use TRY_RUN, not TRY_COMPILE, to test for -Olimit (on Solaris,
Guido van Rossum <guido@python.org>
parents: 5596
diff changeset
235 IRIX*/6*) LINKFORSHARED="$SGI_ABI -all";;
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
236 esac
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
237 fi
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
238 AC_MSG_RESULT($LINKFORSHARED)
1881
3a70e9c0d9f5 Shared library support
Guido van Rossum <guido@python.org>
parents: 1803
diff changeset
239
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
240 # checks for libraries
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
241 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
242 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
243 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
244 # 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
245 # 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
246 # 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
247 # 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
248 # 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
249 # satisfied without it).
4180
7ede012a35c5 Added checks for strdup and changed checks for hypot.
Guido van Rossum <guido@python.org>
parents: 4029
diff changeset
250 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
251 then
2161
f06222e07ca7 hopefully final changes for Sequent -linet
Guido van Rossum <guido@python.org>
parents: 2130
diff changeset
252 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
253 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
254 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
255 fi
3891
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
256 AC_MSG_CHECKING(for --with-libs)
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
257 AC_ARG_WITH(libs, [--with-libs='lib1 ...' link against additional libs], [
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
258 AC_MSG_RESULT($withval)
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
259 LIBS="$withval $LIBS"
d9e7f1088c3b Three changes:
Guido van Rossum <guido@python.org>
parents: 3852
diff changeset
260 ], AC_MSG_RESULT(no))
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
261
4850
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
262 AC_MSG_CHECKING(for --with(out)-readline)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
263 use_readline="yes"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
264 AC_ARG_WITH(readline,
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
265 [--with-readline=DIRECTORY search GNU readline library in DIRECTORY
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
266 --without-readline do not use GNU readline library],
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
267 [AC_MSG_RESULT($withval); use_readline="$withval"],
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
268 [AC_MSG_RESULT((default) yes)])
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
269 if test "$use_readline" != "no"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
270 then
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
271 if test "$use_readline" != "yes"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
272 then add_ldflags="-L$use_readline"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
273 else add_ldflags=""
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
274 fi
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
275 # See where the termcap interface could be hiding...
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
276 AC_MSG_CHECKING(for readline and termcap libraries)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
277 AC_CACHE_VAL(ac_cv_readline_termcap,
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
278 [
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
279 AC_MSG_RESULT(have to find out)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
280 save_libs="$LIBS"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
281 save_ldflags="$LDFLAGS"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
282 LDFLAGS="$save_ldflags $add_ldflags"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
283 rl="-lreadline"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
284 first=""
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
285 # Hack for SGI IRIX 5.x.
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
286 # Both termcap and gl have an entry point clear().
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
287 # When linking with both shared libraries, we're in trouble.
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
288 # We don't need the one in termcap.
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
289 # By forcing a static link for termcap, we avoid
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
290 # linking its clear() entry point.
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
291 if test -f /usr/lib/libgl.so -a -f /usr/lib/libtermcap.a
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
292 then first="/usr/lib/libtermcap.a"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
293 fi
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
294 for add_lib in \
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
295 "$first" "-ltermcap" "-ltermlib" "-lcurses" "-lncurses"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
296 do
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
297 AC_MSG_CHECKING(for $rl $add_lib)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
298 LIBS="$save_libs $rl $add_lib"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
299 AC_TRY_LINK([extern char *readline();],
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
300 [char *line=readline();],
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
301 [AC_MSG_RESULT(yes);
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
302 ac_cv_readline_termcap="$rl $add_lib"],
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
303 [AC_MSG_RESULT(no)])
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
304 if test "$ac_cv_readline_termcap" != ""
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
305 then break
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
306 fi
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
307 done
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
308 LIBS="$save_libs"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
309 LDFLAGS="$save_ldflags"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
310 AC_MSG_CHECKING(result from check for readline and termcap)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
311 ])
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
312 if test "$ac_cv_readline_termcap" = ""
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
313 then
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
314 AC_MSG_RESULT(no)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
315 AC_MSG_WARN(cannot link with GNU readline -- see config.log)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
316 else
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
317 AC_MSG_RESULT($ac_cv_readline_termcap)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
318 LIBS="$LIBS $ac_cv_readline_termcap"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
319 LDFLAGS="$LDFLAGS $add_ldflags"
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
320 AC_DEFINE(WITH_READLINE)
0e1897a1f0d5 Rewritten the readline test, hopefully it's okay now.
Guido van Rossum <guido@python.org>
parents: 4665
diff changeset
321 fi
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
322 fi
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
323
5034
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
324 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
325 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
326 AC_ARG_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
327 [--with-dec-threads use DEC Alpha/OSF1 thread-safe libraries],
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
328 [AC_MSG_RESULT($withval)
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
329 LDLAST=-threads
5024
7e5190999633 Let --with-threads be an alias for --with-thread.
Guido van Rossum <guido@python.org>
parents: 4850
diff changeset
330 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
331 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
332 fi],
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
333 AC_MSG_RESULT(no))
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
334
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
335 AC_MSG_CHECKING(for --with-threads)
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
336 AC_ARG_WITH(threads, [--with-threads alias for --with-thread],
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
337 [AC_MSG_RESULT($withval)
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
338 if test "${with_thread+set}" != set; then
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
339 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
340 fi],
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
341 AC_MSG_RESULT(no))
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
342
de2a75c7ea9f Add --with-dec-threads, for DEL Alpha, which requires -threads as the
Guido van Rossum <guido@python.org>
parents: 5024
diff changeset
343 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
344 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
345 AC_MSG_RESULT($withval)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
346 if test -d "$withval"
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
347 then LDFLAGS="$LDFLAGS -L$withval"
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
348 fi
3911
a9a92dc2b374 Put definition of _REENTRANT in config.h
Guido van Rossum <guido@python.org>
parents: 3908
diff changeset
349 AC_DEFINE(_REENTRANT)
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
350 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
351 AC_DEFINE(C_THREADS)
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
352 LIBOBJS="$LIBOBJS thread.o"],[
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
353 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
354 AC_DEFINE(_POSIX_THREADS)
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
355 LIBS="$LIBS -lpthreads"
3722
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
356 LIBOBJS="$LIBOBJS thread.o"], [
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
357 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
358 AC_DEFINE(_POSIX_THREADS)
b2b063aa2755 Split some long lines (headers, functions).
Guido van Rossum <guido@python.org>
parents: 3626
diff changeset
359 LIBS="$LIBS -lpthread"
5596
2e2bbe985620 DG/UX specific test for threads.
Guido van Rossum <guido@python.org>
parents: 5590
diff changeset
360 LIBOBJS="$LIBOBJS thread.o"], [
2e2bbe985620 DG/UX specific test for threads.
Guido van Rossum <guido@python.org>
parents: 5590
diff changeset
361 AC_CHECK_LIB(thread, __d6_pthread_create, [AC_DEFINE(WITH_THREAD)
2e2bbe985620 DG/UX specific test for threads.
Guido van Rossum <guido@python.org>
parents: 5590
diff changeset
362 AC_DEFINE(_POSIX_THREADS)
2e2bbe985620 DG/UX specific test for threads.
Guido van Rossum <guido@python.org>
parents: 5590
diff changeset
363 LIBS="$LIBS -lthread"
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
364 LIBOBJS="$LIBOBJS thread.o"])
5596
2e2bbe985620 DG/UX specific test for threads.
Guido van Rossum <guido@python.org>
parents: 5590
diff changeset
365 ])])])
2e2bbe985620 DG/UX specific test for threads.
Guido van Rossum <guido@python.org>
parents: 5590
diff changeset
366
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
367 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
368 LIBS="$LIBS -lmpc"
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
369 LIBOBJS="$LIBOBJS thread.o"])
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
370 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
371 LIBS="$LIBS -lthread"
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
372 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
373 ], AC_MSG_RESULT(no))
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
374
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
375 # -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
376 AC_SUBST(DLINCLDIR)
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
377 DLINCLDIR=/
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
378
2195
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 --with-sgi-dl)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
380 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
381 AC_MSG_RESULT($withval)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
382 AC_DEFINE(WITH_SGI_DL)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
383 dldir=$withval
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
384 if test -d "$dldir"
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
385 then LDFLAGS="$LDFLAGS -L$dldir"
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
386 else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
387 fi
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
388 DLINCLDIR=${dldir}
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
389 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
390
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
391 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
392 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
393 AC_MSG_RESULT($withval)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
394 AC_DEFINE(WITH_DL_DLD)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
395 dldir=`echo "$withval" | sed 's/,.*//'`
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
396 dlddir=`echo "$withval" | sed 's/.*,//'`
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
397 if test -d "$dldir" -a -d "$dlddir"
4029
82c9dee053bc Several refinements:
Guido van Rossum <guido@python.org>
parents: 3911
diff changeset
398 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
399 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
400 fi
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
401 DLINCLDIR=${dldir}
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
402 LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no))
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
403
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
404 # checks for library functions
5590
f3f65687e426 Add kill, execv, fork to tested functions.
Guido van Rossum <guido@python.org>
parents: 5521
diff changeset
405 AC_CHECK_FUNCS(chown clock dlopen execv flock fork ftime ftruncate \
3626
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
406 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
5590
f3f65687e426 Add kill, execv, fork to tested functions.
Guido van Rossum <guido@python.org>
parents: 5521
diff changeset
407 kill 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
408 select setgid setuid setsid setpgid setpgrp setvbuf \
bd6eaa2b41ac Some more header files and symbols.
Guido van Rossum <guido@python.org>
parents: 3113
diff changeset
409 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
410 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
411 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
412 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
413 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
414 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
415
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
416 # checks for structures
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
417 AC_HEADER_TIME
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
418 AC_STRUCT_TM
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
419 AC_STRUCT_TIMEZONE
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
420
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
421 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
422 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
423 [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
424 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
425 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
426 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
427 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
428 AC_DEFINE(HAVE_ALTZONE)
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
429 fi
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
430
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
431 was_it_defined=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
432 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
433 AC_TRY_COMPILE([
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
434 #include <sys/types.h>
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
435 #include <sys/select.h>
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
436 #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
437 ], [;], [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
438 AC_MSG_RESULT($was_it_defined)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
439
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
440 # checks for compiler characteristics
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
441
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
442 AC_C_CHAR_UNSIGNED
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
443
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
444 AC_C_CONST
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
445
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
446 works=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
447 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
448 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
449 AC_MSG_RESULT($works)
1974
f95c193bfe65 add test for volatile
Guido van Rossum <guido@python.org>
parents: 1941
diff changeset
450
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
451 works=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
452 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
453 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
454 AC_MSG_RESULT($works)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
455
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
456 have_prototypes=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
457 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
458 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
459 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
460 AC_MSG_RESULT($have_prototypes)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
461
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
462 works=no
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 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
464 AC_TRY_COMPILE([
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
465 #include <stdarg.h>
4184
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
466 int foo(int x, ...) {
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
467 va_list va;
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
468 va_start(va, x);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
469 va_arg(va, int);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
470 va_arg(va, char *);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
471 va_arg(va, double);
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
472 return 0;
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
473 }
2ccb99c92854 More thorough test for working <stdarg.h>.
Guido van Rossum <guido@python.org>
parents: 4180
diff changeset
474 ], [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
475 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
476 AC_MSG_RESULT($works)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
477
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
478 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
479 bad_prototypes=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
480 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
481 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
482 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
483 AC_MSG_RESULT($bad_prototypes)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
484 fi
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
485
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
486 bad_forward=no
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
487 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
488 AC_TRY_RUN([
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
489 struct s { int a; int b; };
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
490 static struct s foo;
2015
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
491 int foobar() {
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
492 static int random;
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
493 random = (int) &foo;
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
494 return random;
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
495 }
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
496 static struct s foo = { 1, 2 };
2015
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
497 main() {
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
498 exit(!((int)&foo == foobar()));
ec05d9021bcc bugfix release
Guido van Rossum <guido@python.org>
parents: 1996
diff changeset
499 }
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
500 ], , 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
501 AC_MSG_RESULT($bad_forward)
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
502
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
503 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
504 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
505 AC_TRY_COMPILE([
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
506 #ifdef HAVE_STDARG_PROTOTYPES
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
507 #include <stdarg.h>
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
508 #else
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
509 #include <varargs.h>
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
510 #endif
2195
ccc279ff935d modernize all tests to use cache and report outcome
Guido van Rossum <guido@python.org>
parents: 2193
diff changeset
511 ], [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
512 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
513 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
514
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
515 # checks for system services
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
516 # (none yet)
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
517
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
518 # 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
519 AC_CHECK_LIB(ieee, __fpu_control)
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
520
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
521 # Check for --with-fpectl
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
522 AC_SUBST(WANT_SIGFPE_HANDLER)
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
523 AC_MSG_CHECKING(for --with-fpectl)
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
524 AC_ARG_WITH(fpectl, [--with-fpectl enable SIGFPE catching], [
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
525 if test "$withval" != no
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
526 then AC_DEFINE(WANT_SIGFPE_HANDLER) AC_MSG_RESULT(yes)
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
527 else AC_MSG_RESULT(no)
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
528 fi])
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
529
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
530 # check for --with-libm=...
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
531 AC_SUBST(LIBM)
4253
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
532 case $ac_sys_system in
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
533 next) ;;
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
534 *) LIBM=-lm
02a0321f9468 Changes for NeXT by Lele
Guido van Rossum <guido@python.org>
parents: 4252
diff changeset
535 esac
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
536 AC_MSG_CHECKING(for --with-libm=STRING)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
537 AC_ARG_WITH(libm, [--with-libm=STRING math library], [
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
538 if test "$withval" = no
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
539 then LIBM=
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
540 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
541 elif test "$withval" != yes
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
542 then LIBM=$withval
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
543 AC_MSG_RESULT(set LIBM=\"$withval\")
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
544 else AC_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
545 fi],
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
546 [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
547
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
548 # check for --with-libc=...
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
549 AC_SUBST(LIBC)
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
550 AC_MSG_CHECKING(for --with-libc=STRING)
2049
07cf3b3baf16 The usual changes when a release is nearing...
Guido van Rossum <guido@python.org>
parents: 2015
diff changeset
551 AC_ARG_WITH(libc, [--with-libc=STRING C library], [
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
552 if test "$withval" = no
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
553 then LIBC=
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
554 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
555 elif test "$withval" != yes
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
556 then LIBC=$withval
5469
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
557 AC_MSG_RESULT(set LIBC=\"$withval\")
1748
8286a662502b Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1456
diff changeset
558 else AC_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
559 fi],
47e81b2169e9 Added --with-fpectl. Change checks for -lm, -lc.
Guido van Rossum <guido@python.org>
parents: 5384
diff changeset
560 [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
561
2057
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
562 # 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
563 LIBS_SAVE=$LIBS
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
564 LIBS="$LIBS $LIBM"
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
565 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
566 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
567 LIBS=$LIBS_SAVE
79c171f581fc README: changed URL format to <URL:...>; added section on Tk.
Guido van Rossum <guido@python.org>
parents: 2049
diff changeset
568
2193
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
569 # check for getopt
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
570 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
571 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
572 [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
573 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
574 extern char* optarg;
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
575 int main() {
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
576 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
577 opterr = 0;
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
578 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
579 exit(0);
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
580 }], 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
581 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
582 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
583 AC_SUBST(LIBOBJS)dnl
1c012d82a975 add INSTALL_PROGRAM and INSTALL_DATA; check for getopt
Guido van Rossum <guido@python.org>
parents: 2161
diff changeset
584
5761
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
585 # check whether malloc(0) returns NULL or not
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
586 AC_SUBST(MALLOC_ZERO_RETURNS_NULL)
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
587 AC_MSG_CHECKING(what malloc(0) returns)
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
588 AC_CACHE_VAL(ac_cv_malloc_zero,
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
589 [AC_TRY_RUN([#include <stdio.h>
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
590 #ifdef HAVE_STDLIB
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
591 #include <stdlib.h>
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
592 #else
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
593 char *malloc(), *realloc();
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
594 int *free();
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
595 #endif
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
596 main() {
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
597 char *p;
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
598 p = malloc(0);
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
599 if (p == NULL) exit(1);
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
600 p = realloc(p, 0);
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
601 if (p == NULL) exit(1);
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
602 free(p);
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
603 exit(0);
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
604 }], ac_cv_malloc_zero=nonnull, ac_cv_malloc_zero=null)])
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
605 AC_MSG_RESULT($ac_cv_malloc_zero)
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
606 if test "$ac_cv_malloc_zero" = null
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
607 then
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
608 AC_DEFINE(MALLOC_ZERO_RETURNS_NULL)
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
609 fi
a8e31d905d2c Added check whether malloc(0) returns NULL or not.
Guido van Rossum <guido@python.org>
parents: 5669
diff changeset
610
1453
d773a5f89426 New files
Guido van Rossum <guido@python.org>
parents:
diff changeset
611 # generate output files
3852
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
612 AC_OUTPUT(Makefile \
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
613 Objects/Makefile \
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
614 Parser/Makefile \
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
615 Python/Makefile \
97519dfc63ae Changes for NeXT. Some improvements to long lines.
Guido van Rossum <guido@python.org>
parents: 3809
diff changeset
616 Modules/Makefile.pre)