blob: 0df844a333f97f7dd57e638ec3b46b2c9f5dd517 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003# From configure.in Revision: 1.239
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021 --with-dyld Use (OpenStep|Rhapsody) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
Neil Schemenauerdfb38e42001-01-27 06:57:08 +000027 --with-suffix=.exe set executable suffix"
28ac_help="$ac_help
Fred Drake109d9862001-07-11 06:27:56 +000029 --with-pydebug build with Py_DEBUG defined"
30ac_help="$ac_help
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000031 --enable-ipv6 Enable ipv6 (with ipv4) support
32 --disable-ipv6 Disable ipv6 support"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000033ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000034 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000035ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000036 --with-signal-module disable/enable signal module"
37ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000038 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000039ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000040 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000041ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000042 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000043ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000044 --with-pth use GNU pth threading libraries"
45ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000046 --with(out)-cycle-gc disable/enable garbage collection"
47ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000048 --with(out)-pymalloc disable/enable specialized mallocs"
49ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000050 --with-wctype-functions use wctype.h functions"
51ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000052 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000053ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000054 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000055ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000056 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000057ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000058 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000059ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000060 --with-libc=STRING C library"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000061ac_help="$ac_help
62 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000063
Guido van Rossum7f43da71994-08-01 12:15:30 +000064# Initialize some variables set by options.
65# The variables have the same names as the options, with
66# dashes changed to underlines.
67build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068cache_file=./config.cache
69exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000070host=NONE
71no_create=
72nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000073no_recursion=
74prefix=NONE
75program_prefix=NONE
76program_suffix=NONE
77program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000078silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000079site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000080srcdir=
81target=NONE
82verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000083x_includes=NONE
84x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000085bindir='${exec_prefix}/bin'
86sbindir='${exec_prefix}/sbin'
87libexecdir='${exec_prefix}/libexec'
88datadir='${prefix}/share'
89sysconfdir='${prefix}/etc'
90sharedstatedir='${prefix}/com'
91localstatedir='${prefix}/var'
92libdir='${exec_prefix}/lib'
93includedir='${prefix}/include'
94oldincludedir='/usr/include'
95infodir='${prefix}/info'
96mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000097
98# Initialize some other variables.
99subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000100MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000101SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +0000102# Maximum number of lines to put in a shell here document.
103ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104
105ac_prev=
106for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 # If the previous option needs an argument, assign it.
110 if test -n "$ac_prev"; then
111 eval "$ac_prev=\$ac_option"
112 ac_prev=
113 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000114 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 case "$ac_option" in
117 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
118 *) ac_optarg= ;;
119 esac
120
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000121 # Accept the important Cygnus configure options, so we can diagnose typos.
122
Guido van Rossum7f43da71994-08-01 12:15:30 +0000123 case "$ac_option" in
124
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -bindir | --bindir | --bindi | --bind | --bin | --bi)
126 ac_prev=bindir ;;
127 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
128 bindir="$ac_optarg" ;;
129
130 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000132 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000133 build="$ac_optarg" ;;
134
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 -cache-file | --cache-file | --cache-fil | --cache-fi \
136 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
137 ac_prev=cache_file ;;
138 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
139 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
140 cache_file="$ac_optarg" ;;
141
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000142 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
143 ac_prev=datadir ;;
144 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
145 | --da=*)
146 datadir="$ac_optarg" ;;
147
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 -disable-* | --disable-*)
149 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000152 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 fi
154 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
155 eval "enable_${ac_feature}=no" ;;
156
157 -enable-* | --enable-*)
158 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000160 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000161 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000162 fi
163 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
164 case "$ac_option" in
165 *=*) ;;
166 *) ac_optarg=yes ;;
167 esac
168 eval "enable_${ac_feature}='$ac_optarg'" ;;
169
Guido van Rossum7f43da71994-08-01 12:15:30 +0000170 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
171 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
172 | --exec | --exe | --ex)
173 ac_prev=exec_prefix ;;
174 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
175 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
176 | --exec=* | --exe=* | --ex=*)
177 exec_prefix="$ac_optarg" ;;
178
179 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000180 # Obsolete; use --with-gas.
181 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000182
183 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000184 # Omit some internal or obsolete options to make the list less imposing.
185 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000186 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000187Usage: configure [options] [host]
188Options: [defaults in brackets after descriptions]
189Configuration:
190 --cache-file=FILE cache test results in FILE
191 --help print this message
192 --no-create do not create output files
193 --quiet, --silent do not print \`checking...' messages
194 --version print the version of autoconf that created configure
195Directory and file names:
196 --prefix=PREFIX install architecture-independent files in PREFIX
197 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000199 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000200 --bindir=DIR user executables in DIR [EPREFIX/bin]
201 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
202 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
203 --datadir=DIR read-only architecture-independent data in DIR
204 [PREFIX/share]
205 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
206 --sharedstatedir=DIR modifiable architecture-independent data in DIR
207 [PREFIX/com]
208 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
209 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
210 --includedir=DIR C header files in DIR [PREFIX/include]
211 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
212 --infodir=DIR info documentation in DIR [PREFIX/info]
213 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000214 --srcdir=DIR find the sources in DIR [configure dir or ..]
215 --program-prefix=PREFIX prepend PREFIX to installed program names
216 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000217 --program-transform-name=PROGRAM
218 run sed PROGRAM on installed program names
219EOF
220 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000221Host type:
222 --build=BUILD configure for building on BUILD [BUILD=HOST]
223 --host=HOST configure for HOST [guessed]
224 --target=TARGET configure for TARGET [TARGET=HOST]
225Features and packages:
226 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
227 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
230 --x-includes=DIR X include files are in DIR
231 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000232EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000233 if test -n "$ac_help"; then
234 echo "--enable and --with options recognized:$ac_help"
235 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000236 exit 0 ;;
237
238 -host | --host | --hos | --ho)
239 ac_prev=host ;;
240 -host=* | --host=* | --hos=* | --ho=*)
241 host="$ac_optarg" ;;
242
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
248 includedir="$ac_optarg" ;;
249
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
251 ac_prev=infodir ;;
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253 infodir="$ac_optarg" ;;
254
255 -libdir | --libdir | --libdi | --libd)
256 ac_prev=libdir ;;
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
258 libdir="$ac_optarg" ;;
259
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
265 libexecdir="$ac_optarg" ;;
266
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274 localstatedir="$ac_optarg" ;;
275
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277 ac_prev=mandir ;;
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279 mandir="$ac_optarg" ;;
280
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 # Obsolete; use --without-fp.
283 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000284
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286 | --no-cr | --no-c)
287 no_create=yes ;;
288
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000292
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300 oldincludedir="$ac_optarg" ;;
301
Guido van Rossum7f43da71994-08-01 12:15:30 +0000302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303 ac_prev=prefix ;;
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305 prefix="$ac_optarg" ;;
306
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312 program_prefix="$ac_optarg" ;;
313
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319 program_suffix="$ac_optarg" ;;
320
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
336 program_transform_name="$ac_optarg" ;;
337
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
340 silent=yes ;;
341
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343 ac_prev=sbindir ;;
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345 | --sbi=* | --sb=*)
346 sbindir="$ac_optarg" ;;
347
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
351 | --sha | --sh)
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356 | --sha=* | --sh=*)
357 sharedstatedir="$ac_optarg" ;;
358
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000359 -site | --site | --sit)
360 ac_prev=site ;;
361 -site=* | --site=* | --sit=*)
362 site="$ac_optarg" ;;
363
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365 ac_prev=srcdir ;;
366 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367 srcdir="$ac_optarg" ;;
368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370 | --syscon | --sysco | --sysc | --sys | --sy)
371 ac_prev=sysconfdir ;;
372 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374 sysconfdir="$ac_optarg" ;;
375
Guido van Rossum7f43da71994-08-01 12:15:30 +0000376 -target | --target | --targe | --targ | --tar | --ta | --t)
377 ac_prev=target ;;
378 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379 target="$ac_optarg" ;;
380
381 -v | -verbose | --verbose | --verbos | --verbo | --verb)
382 verbose=yes ;;
383
384 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000385 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000386 exit 0 ;;
387
388 -with-* | --with-*)
389 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000393 fi
394 ac_package=`echo $ac_package| sed 's/-/_/g'`
395 case "$ac_option" in
396 *=*) ;;
397 *) ac_optarg=yes ;;
398 esac
399 eval "with_${ac_package}='$ac_optarg'" ;;
400
401 -without-* | --without-*)
402 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000405 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406 fi
407 ac_package=`echo $ac_package| sed 's/-/_/g'`
408 eval "with_${ac_package}=no" ;;
409
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000410 --x)
411 # Obsolete; use --with-x.
412 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413
414 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415 | --x-incl | --x-inc | --x-in | --x-i)
416 ac_prev=x_includes ;;
417 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419 x_includes="$ac_optarg" ;;
420
421 -x-libraries | --x-libraries | --x-librarie | --x-librari \
422 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423 ac_prev=x_libraries ;;
424 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426 x_libraries="$ac_optarg" ;;
427
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429 ;;
430
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000431 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000432 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000434 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000435 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000436 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437 fi
438 nonopt="$ac_option"
439 ;;
440
441 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000442done
443
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000446fi
447
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000449
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000451# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000452# 1 file creation
453# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000454# 3 some systems may open it to /dev/tty
455# 4 used on the Kubota Titan
456# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000457# 5 compiler messages saved in config.log
458if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000459 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000460else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000461 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000462fi
463exec 5>./config.log
464
465echo "\
466This file contains any messages produced by compilers while
467running configure, to aid debugging if configure makes a mistake.
468" 1>&5
469
470# Strip out --no-create and --no-recursion so they do not pile up.
471# Also quote any args containing shell metacharacters.
472ac_configure_args=
473for ac_arg
474do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000475 case "$ac_arg" in
476 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
477 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000478 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
479 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
480 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
481 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
482 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 esac
484done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485
486# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000487# Only set these to C if already set. These must not be set unconditionally
488# because not all systems understand e.g. LANG=C (notably SCO).
489# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
490# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000492if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
493if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
494if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496# confdefs.h avoids OS command line length limits that DEFS can exceed.
497rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498# AIX cpp loses on an empty file, so make sure it contains at least a newline.
499echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000500
501# A filename unique to this package, relative to the directory that
502# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000503ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000504
505# Find the source files, if location was not specified.
506if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000508 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000509 ac_prog=$0
510 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
511 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512 srcdir=$ac_confdir
513 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000514 srcdir=..
515 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000516else
517 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000518fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000520 if test "$ac_srcdir_defaulted" = yes; then
521 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000523 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000524 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000525fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000526srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
527
528# Prefer explicitly selected file to automatically selected ones.
529if test -z "$CONFIG_SITE"; then
530 if test "x$prefix" != xNONE; then
531 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
532 else
533 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
534 fi
535fi
536for ac_site_file in $CONFIG_SITE; do
537 if test -r "$ac_site_file"; then
538 echo "loading site script $ac_site_file"
539 . "$ac_site_file"
540 fi
541done
542
543if test -r "$cache_file"; then
544 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000545 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546else
547 echo "creating cache $cache_file"
548 > $cache_file
549fi
550
Guido van Rossum7f43da71994-08-01 12:15:30 +0000551ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000552# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000555ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000556cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000557
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000558ac_exeext=
559ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000560if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
561 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
562 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
563 ac_n= ac_c='
564' ac_t=' '
565 else
566 ac_n=-n ac_c= ac_t=
567 fi
568else
569 ac_n= ac_c='\c' ac_t=
570fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000571
Guido van Rossum0a516c91994-09-12 10:58:40 +0000572
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000573
Guido van Rossum627b2d71993-12-24 10:39:16 +0000574
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000575# Set VERSION so we only need to edit in one place (i.e., here)
576
Guido van Rossum6db412b2001-04-18 04:37:57 +0000577VERSION=2.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000578
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000579# Arguments passed to configure.
580
581CONFIG_ARGS="$ac_configure_args"
582
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000583# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000584if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000585
586 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000587echo "configure:588: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000588 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000589if test "${with_next_archs+set}" = set; then
590 withval="$with_next_archs"
591
Guido van Rossum563e7081996-09-10 18:20:48 +0000592 if test -n "$withval"; then
593 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
594 # GCC does not currently support multi archs on the NeXT
595 with_gcc=no
596 fi
597 echo "$ac_t""$with_next_archs" 1>&6
598
599else
600 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000601fi
602
Guido van Rossum563e7081996-09-10 18:20:48 +0000603
604 if test -z "$MACHDEP"
605 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000606 ac_sys_system=`uname -s`
607 if test "$ac_sys_system" = "Darwin" ; then
608 ac_sys_release=`uname -r`
609 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000610 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000611 sed -e 's/://' -e 's/\./_/'` && \
612 ac_sys_system=next && ac_sys_release=$4
613 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000614
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000615 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000616 fi
617fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000618
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000619# Check whether --with-next-framework or --without-next-framework was given.
620if test "${with_next_framework+set}" = set; then
621 withval="$with_next_framework"
622 :
623fi
624
625# Check whether --with-dyld or --without-dyld was given.
626if test "${with_dyld+set}" = set; then
627 withval="$with_dyld"
628 :
629fi
630
Guido van Rossum91922671997-10-09 20:24:13 +0000631
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632# Set name for machine-dependent library files
633
634echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000635echo "configure:636: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000636if test -z "$MACHDEP"
637then
Guido van Rossum563e7081996-09-10 18:20:48 +0000638 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000639 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000640 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000641 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000642 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000643 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000644 ac_md_system=`echo $ac_sys_system |
645 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
646 ac_md_release=`echo $ac_sys_release |
647 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000648 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000649
Guido van Rossum07397971997-04-29 21:49:50 +0000650 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000651 cygwin*) MACHDEP="cygwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000652 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000653 esac
654fi
Guido van Rossum91922671997-10-09 20:24:13 +0000655
656#
657# SGI compilers allow the specification of the both the ABI and the
658# ISA on the command line. Depending on the values of these switches,
659# different and often incompatable code will be generated.
660#
661# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
662# thus supply support for various ABI/ISA combinations. The MACHDEP
663# variable is also adjusted.
664#
665
666if test ! -z "$SGI_ABI"
667then
668 CC="cc $SGI_ABI"
669 LDFLAGS="$SGI_ABI $LDFLAGS"
670 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
671fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000672echo "$ac_t""$MACHDEP" 1>&6
673
Guido van Rossum627b2d71993-12-24 10:39:16 +0000674# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000675echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000676echo "configure:677: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000677# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000678if test "${with_gcc+set}" = set; then
679 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000680
681 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000682 no) CC=cc
683 without_gcc=yes;;
684 yes) CC=gcc
685 without_gcc=no;;
686 *) CC=$withval
687 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000688 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000689else
Guido van Rossume77438c1995-09-13 18:59:59 +0000690
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000691 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000692 AIX*) CC=cc_r
693 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 case $BE_HOST_CPU in
696 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000697 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000698 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000699 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000700 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 ;;
703 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000704 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000706 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000707 ;;
708 *)
Fred Drake5790be12000-10-09 17:06:13 +0000709 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000710 ;;
711 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000712 AR="\$(srcdir)/Modules/ar_beos"
713 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000714 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000715 Monterey*)
716 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000717 without_gcc=;;
718 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000719 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000720fi
721
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000722echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000723
Guido van Rossum95012191999-12-16 17:50:52 +0000724
725
Fred Drakea1a84e72001-03-06 05:52:16 +0000726MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000727echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000728echo "configure:729: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000729# Check whether --with-cxx or --without-cxx was given.
730if test "${with_cxx+set}" = set; then
731 withval="$with_cxx"
732
Martin v. Löwis22352952000-12-13 17:37:02 +0000733 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000734 case $withval in
735 no) CXX=
736 with_cxx=no;;
737 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000738 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000739 with_cxx=$withval;;
740 esac
741else
742
743 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000744 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000745
746fi
747
748echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000749
750
751if test "$check_cxx" = "yes"
752then
753 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
754do
755# Extract the first word of "$ac_prog", so it can be a program name with args.
756set dummy $ac_prog; ac_word=$2
757echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000758echo "configure:759: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000759if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
760 echo $ac_n "(cached) $ac_c" 1>&6
761else
762 if test -n "$CXX"; then
763 ac_cv_prog_CXX="$CXX" # Let the user override the test.
764else
765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
766 ac_dummy="$PATH"
767 for ac_dir in $ac_dummy; do
768 test -z "$ac_dir" && ac_dir=.
769 if test -f $ac_dir/$ac_word; then
770 ac_cv_prog_CXX="$ac_prog"
771 break
772 fi
773 done
774 IFS="$ac_save_ifs"
775fi
776fi
777CXX="$ac_cv_prog_CXX"
778if test -n "$CXX"; then
779 echo "$ac_t""$CXX" 1>&6
780else
781 echo "$ac_t""no" 1>&6
782fi
783
784test -n "$CXX" && break
785done
786test -n "$CXX" || CXX="notfound"
787
788 if test "$CXX" = "notfound"
789 then
790 CXX=
791 else
792 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000793echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000794
795ac_ext=C
796# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
797ac_cpp='$CXXCPP $CPPFLAGS'
798ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800cross_compiling=$ac_cv_prog_cxx_cross
801
802cat > conftest.$ac_ext << EOF
803
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000804#line 805 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000805#include "confdefs.h"
806
807int main(){return(0);}
808EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000809if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000810 ac_cv_prog_cxx_works=yes
811 # If we can't run a trivial program, we are probably using a cross compiler.
812 if (./conftest; exit) 2>/dev/null; then
813 ac_cv_prog_cxx_cross=no
814 else
815 ac_cv_prog_cxx_cross=yes
816 fi
817else
818 echo "configure: failed program was:" >&5
819 cat conftest.$ac_ext >&5
820 ac_cv_prog_cxx_works=no
821fi
822rm -fr conftest*
823ac_ext=c
824# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
825ac_cpp='$CPP $CPPFLAGS'
826ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
827ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
828cross_compiling=$ac_cv_prog_cc_cross
829
830echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
831if test $ac_cv_prog_cxx_works = no; then
832 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
833fi
834echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000835echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000836echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
837cross_compiling=$ac_cv_prog_cxx_cross
838
839 fi
840fi
841
Guido van Rossum8b131c51995-03-09 14:10:13 +0000842# If the user switches compilers, we can't believe the cache
843if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
844then
845 { echo "configure: error: cached CC is different -- throw away $cache_file
846(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
847fi
848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849# Extract the first word of "gcc", so it can be a program name with args.
850set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000851echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000852echo "configure:853: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000853if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855else
856 if test -n "$CC"; then
857 ac_cv_prog_CC="$CC" # Let the user override the test.
858else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000859 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
860 ac_dummy="$PATH"
861 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862 test -z "$ac_dir" && ac_dir=.
863 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000865 break
866 fi
867 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870fi
871CC="$ac_cv_prog_CC"
872if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000873 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000875 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878if test -z "$CC"; then
879 # Extract the first word of "cc", so it can be a program name with args.
880set dummy cc; ac_word=$2
881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000882echo "configure:883: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000883if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 echo $ac_n "(cached) $ac_c" 1>&6
885else
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
888else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000891 ac_dummy="$PATH"
892 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
895 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
896 ac_prog_rejected=yes
897 continue
898 fi
899 ac_cv_prog_CC="cc"
900 break
901 fi
902 done
903 IFS="$ac_save_ifs"
904if test $ac_prog_rejected = yes; then
905 # We found a bogon in the path, so make sure we never use it.
906 set dummy $ac_cv_prog_CC
907 shift
908 if test $# -gt 0; then
909 # We chose a different compiler from the bogus one.
910 # However, it has the same basename, so the bogon will be chosen
911 # first if we set CC to just the basename; use the full file name.
912 shift
913 set dummy "$ac_dir/$ac_word" "$@"
914 shift
915 ac_cv_prog_CC="$@"
916 fi
917fi
918fi
919fi
920CC="$ac_cv_prog_CC"
921if test -n "$CC"; then
922 echo "$ac_t""$CC" 1>&6
923else
924 echo "$ac_t""no" 1>&6
925fi
926
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000927 if test -z "$CC"; then
928 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000929 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000930 # Extract the first word of "cl", so it can be a program name with args.
931set dummy cl; ac_word=$2
932echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000933echo "configure:934: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000934if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000935 echo $ac_n "(cached) $ac_c" 1>&6
936else
937 if test -n "$CC"; then
938 ac_cv_prog_CC="$CC" # Let the user override the test.
939else
940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
941 ac_dummy="$PATH"
942 for ac_dir in $ac_dummy; do
943 test -z "$ac_dir" && ac_dir=.
944 if test -f $ac_dir/$ac_word; then
945 ac_cv_prog_CC="cl"
946 break
947 fi
948 done
949 IFS="$ac_save_ifs"
950fi
951fi
952CC="$ac_cv_prog_CC"
953if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
955else
956 echo "$ac_t""no" 1>&6
957fi
958 ;;
959 esac
960 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
962fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000964echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000965echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000966
967ac_ext=c
968# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
969ac_cpp='$CPP $CPPFLAGS'
970ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000971ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000972cross_compiling=$ac_cv_prog_cc_cross
973
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000974cat > conftest.$ac_ext << EOF
975
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000976#line 977 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000977#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000978
Guido van Rossumf78abae1997-01-21 22:02:36 +0000979main(){return(0);}
980EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000981if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000982 ac_cv_prog_cc_works=yes
983 # If we can't run a trivial program, we are probably using a cross compiler.
984 if (./conftest; exit) 2>/dev/null; then
985 ac_cv_prog_cc_cross=no
986 else
987 ac_cv_prog_cc_cross=yes
988 fi
989else
990 echo "configure: failed program was:" >&5
991 cat conftest.$ac_ext >&5
992 ac_cv_prog_cc_works=no
993fi
994rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000995ac_ext=c
996# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
997ac_cpp='$CPP $CPPFLAGS'
998ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
999ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1000cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +00001001
1002echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1003if test $ac_cv_prog_cc_works = no; then
1004 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1005fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001006echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001007echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001008echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1009cross_compiling=$ac_cv_prog_cc_cross
1010
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001011echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001012echo "configure:1013: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001013if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001014 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015else
1016 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019#endif
1020EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001021if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 ac_cv_prog_gcc=yes
1023else
1024 ac_cv_prog_gcc=no
1025fi
1026fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001028echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001030if test $ac_cv_prog_gcc = yes; then
1031 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001032else
1033 GCC=
1034fi
1035
1036ac_test_CFLAGS="${CFLAGS+set}"
1037ac_save_CFLAGS="$CFLAGS"
1038CFLAGS=
1039echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001040echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001041if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001042 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043else
1044 echo 'void f(){}' > conftest.c
1045if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001048 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049fi
1050rm -f conftest*
1051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossumf78abae1997-01-21 22:02:36 +00001054echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001055if test "$ac_test_CFLAGS" = set; then
1056 CFLAGS="$ac_save_CFLAGS"
1057elif test $ac_cv_prog_cc_g = yes; then
1058 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001059 CFLAGS="-g -O2"
1060 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001061 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 fi
1063else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001064 if test "$GCC" = yes; then
1065 CFLAGS="-O2"
1066 else
1067 CFLAGS=
1068 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069fi
1070
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001071echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001072echo "configure:1073: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001073if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1075else
1076 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001077#line 1078 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001078#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001079
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001080int main() {
1081
1082#ifndef __CYGWIN__
1083#define __CYGWIN__ __CYGWIN32__
1084#endif
1085return __CYGWIN__;
1086; return 0; }
1087EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001088if { (eval echo configure:1089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001089 rm -rf conftest*
1090 ac_cv_cygwin=yes
1091else
1092 echo "configure: failed program was:" >&5
1093 cat conftest.$ac_ext >&5
1094 rm -rf conftest*
1095 ac_cv_cygwin=no
1096fi
1097rm -f conftest*
1098rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001099fi
1100
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001101echo "$ac_t""$ac_cv_cygwin" 1>&6
1102CYGWIN=
1103test "$ac_cv_cygwin" = yes && CYGWIN=yes
1104echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001105echo "configure:1106: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001106if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1107 echo $ac_n "(cached) $ac_c" 1>&6
1108else
1109 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001110#line 1111 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001111#include "confdefs.h"
1112
1113int main() {
1114return __MINGW32__;
1115; return 0; }
1116EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001117if { (eval echo configure:1118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001118 rm -rf conftest*
1119 ac_cv_mingw32=yes
1120else
1121 echo "configure: failed program was:" >&5
1122 cat conftest.$ac_ext >&5
1123 rm -rf conftest*
1124 ac_cv_mingw32=no
1125fi
1126rm -f conftest*
1127rm -f conftest*
1128fi
1129
1130echo "$ac_t""$ac_cv_mingw32" 1>&6
1131MINGW32=
1132test "$ac_cv_mingw32" = yes && MINGW32=yes
1133
1134
1135echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001136echo "configure:1137: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001137if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1138 echo $ac_n "(cached) $ac_c" 1>&6
1139else
1140 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1141 ac_cv_exeext=.exe
1142else
1143 rm -f conftest*
1144 echo 'int main () { return 0; }' > conftest.$ac_ext
1145 ac_cv_exeext=
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001146 if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001147 for file in conftest.*; do
1148 case $file in
1149 *.c | *.o | *.obj) ;;
1150 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1151 esac
1152 done
1153 else
1154 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1155 fi
1156 rm -f conftest*
1157 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1158fi
1159fi
1160
1161EXEEXT=""
1162test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1163echo "$ac_t""${ac_cv_exeext}" 1>&6
1164ac_exeext=$EXEEXT
1165
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001166echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001167echo "configure:1168: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001168# Check whether --with-suffix or --without-suffix was given.
1169if test "${with_suffix+set}" = set; then
1170 withval="$with_suffix"
1171
1172 case $withval in
1173 no) EXEEXT=;;
1174 yes) EXEEXT=.exe;;
1175 *) EXEEXT=$withval;;
1176 esac
1177fi
1178
1179echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001180# Test whether we're running on a non-case-sensitive system, in which
1181# case we give a warning if no ext is given
1182if test -d "python" -a -z "$EXEEXT"
1183then
1184 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1185fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001186
Guido van Rossumdd997f71998-10-07 19:58:26 +00001187case $MACHDEP in
1188bsdos*)
1189 case $CC in
1190 gcc) CC="$CC -D_HAVE_BSDI";;
1191 esac;;
1192esac
1193
Guido van Rossum24b1e751997-08-21 02:29:16 +00001194case $ac_sys_system in
1195hp*|HP*)
1196 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001197 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001198 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001199Monterey*)
1200 case $CC in
1201 cc) CC="$CC -Wl,-Bexport";;
1202 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001203SunOS*)
1204 # Some functions have a prototype only with that define, e.g. confstr
1205 cat >> confdefs.h <<\EOF
1206#define __EXTENSIONS__ 1
1207EOF
1208
1209 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001210esac
1211
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001212
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001213
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001214echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001215echo "configure:1216: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001216if test -z "$LIBRARY"
1217then
1218 LIBRARY='libpython$(VERSION).a'
1219fi
1220echo "$ac_t""$LIBRARY" 1>&6
1221
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001222# LDLIBRARY is the name of the library to link against (as opposed to the
1223# name of the library into which to insert object files). On systems
1224# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001225# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1226# shared (i.e., DLL) library.
1227
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001228
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001229LDLIBRARY="$LIBRARY"
Guido van Rossumca563f22001-01-23 01:52:44 +00001230DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001231
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001232# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001233# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001234# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001235
1236echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001237echo "configure:1238: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001238if test -z "$LINKCC"
1239then
1240 case $ac_sys_system in
1241 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001242 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001243 dgux*)
1244 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001245 Monterey64*)
1246 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001247 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001248 esac
1249fi
1250echo "$ac_t""$LINKCC" 1>&6
1251
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001252echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001253echo "configure:1254: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001254
1255# NeXT framework builds require that the 'ar' library be converted into
1256# a bundle using libtool.
1257if test "$with_next_framework"
1258then
1259 LDLIBRARY='libpython$(VERSION).dylib'
Jack Jansenca06bc62001-08-03 15:32:23 +00001260 DLLLIBRARY=$LDLIBRARY
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001261fi
1262
1263# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001264case $MACHDEP in
1265dguxR4)
1266 LDLIBRARY='libpython$(VERSION).so'
1267 OPT="$OPT -pic"
1268 ;;
1269beos*)
1270 LDLIBRARY='libpython$(VERSION).so'
1271 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001272cygwin*)
1273 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001274 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001275 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001276esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001277echo "$ac_t""$LDLIBRARY" 1>&6
1278
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279# Extract the first word of "ranlib", so it can be a program name with args.
1280set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001281echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001282echo "configure:1283: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001283if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001284 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285else
1286 if test -n "$RANLIB"; then
1287 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1288else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001289 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1290 ac_dummy="$PATH"
1291 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001292 test -z "$ac_dir" && ac_dir=.
1293 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295 break
1296 fi
1297 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301fi
1302RANLIB="$ac_cv_prog_RANLIB"
1303if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001304 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001306 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
1309
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310for ac_prog in ar aal
1311do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312# Extract the first word of "$ac_prog", so it can be a program name with args.
1313set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001314echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001315echo "configure:1316: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001316if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001317 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318else
1319 if test -n "$AR"; then
1320 ac_cv_prog_AR="$AR" # Let the user override the test.
1321else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001322 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1323 ac_dummy="$PATH"
1324 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001325 test -z "$ac_dir" && ac_dir=.
1326 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 break
1329 fi
1330 done
1331 IFS="$ac_save_ifs"
1332fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333fi
1334AR="$ac_cv_prog_AR"
1335if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001336 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001337else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001338 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340
1341test -n "$AR" && break
1342done
1343test -n "$AR" || AR="ar"
1344
Neil Schemenauera42c8272001-03-31 00:01:55 +00001345
1346case $MACHDEP in
1347bsdos*)
1348 # install -d does not work on BSDI
1349 if test -z "$INSTALL"
1350 then
1351 INSTALL="${srcdir}/install-sh -c"
1352 fi
1353esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001354ac_aux_dir=
1355for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1356 if test -f $ac_dir/install-sh; then
1357 ac_aux_dir=$ac_dir
1358 ac_install_sh="$ac_aux_dir/install-sh -c"
1359 break
1360 elif test -f $ac_dir/install.sh; then
1361 ac_aux_dir=$ac_dir
1362 ac_install_sh="$ac_aux_dir/install.sh -c"
1363 break
1364 fi
1365done
1366if test -z "$ac_aux_dir"; then
1367 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001368fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001369ac_config_guess=$ac_aux_dir/config.guess
1370ac_config_sub=$ac_aux_dir/config.sub
1371ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1372
1373# Find a good install program. We prefer a C program (faster),
1374# so one script is as good as another. But avoid the broken or
1375# incompatible versions:
1376# SysV /etc/install, /usr/sbin/install
1377# SunOS /usr/etc/install
1378# IRIX /sbin/install
1379# AIX /bin/install
1380# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1381# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1382# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1383# ./install, which can be erroneously created by make from ./install.sh.
1384echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001385echo "configure:1386: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001386if test -z "$INSTALL"; then
1387if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1389else
1390 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1391 for ac_dir in $PATH; do
1392 # Account for people who put trailing slashes in PATH elements.
1393 case "$ac_dir/" in
1394 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1395 *)
1396 # OSF1 and SCO ODT 3.0 have their own names for install.
1397 # Don't use installbsd from OSF since it installs stuff as root
1398 # by default.
1399 for ac_prog in ginstall scoinst install; do
1400 if test -f $ac_dir/$ac_prog; then
1401 if test $ac_prog = install &&
1402 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1403 # AIX install. It has an incompatible calling convention.
1404 :
1405 else
1406 ac_cv_path_install="$ac_dir/$ac_prog -c"
1407 break 2
1408 fi
1409 fi
1410 done
1411 ;;
1412 esac
1413 done
1414 IFS="$ac_save_IFS"
1415
1416fi
1417 if test "${ac_cv_path_install+set}" = set; then
1418 INSTALL="$ac_cv_path_install"
1419 else
1420 # As a last resort, use the slow shell script. We don't cache a
1421 # path for INSTALL within a source directory, because that will
1422 # break other packages using the cache if that directory is
1423 # removed, or if the path is relative.
1424 INSTALL="$ac_install_sh"
1425 fi
1426fi
1427echo "$ac_t""$INSTALL" 1>&6
1428
1429# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1430# It thinks the first close brace ends the variable substitution.
1431test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1432
1433test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1434
1435test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1436
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001437
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001438# Not every filesystem supports hard links
1439
1440if test -z "$LN" ; then
1441 case $ac_sys_system in
1442 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001443 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001444 *) LN=ln;;
1445 esac
1446fi
1447
Fred Drake109d9862001-07-11 06:27:56 +00001448# Check for --with-pydebug
1449echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001450echo "configure:1451: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001451# Check whether --with-pydebug or --without-pydebug was given.
1452if test "${with_pydebug+set}" = set; then
1453 withval="$with_pydebug"
1454
1455if test "$withval" != no
1456then cat >> confdefs.h <<\EOF
1457#define Py_DEBUG 1
1458EOF
1459 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1460else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1461fi
1462else
1463 echo "$ac_t""no" 1>&6
1464fi
1465
1466
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001467# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001468
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001469if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001470then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001471 case $GCC in
1472 yes)
1473 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001474 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001475 if test "$Py_DEBUG" = 'true' ; then
1476 # Optimization messes up debuggers, so turn it off for
1477 # debug builds.
1478 OPT="-g -Wall -Wstrict-prototypes"
1479 else
1480 OPT="-g -O3 -Wall -Wstrict-prototypes"
1481 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001482 *)
Fred Drake109d9862001-07-11 06:27:56 +00001483 OPT="-O3 -Wall -Wstrict-prototypes";;
1484 esac
1485 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001486 *)
1487 case $ac_sys_system in
1488 UnixWare*)
1489 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1490 *)
1491 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001492 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001493 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001494 case $ac_sys_system in
1495 Darwin*)
1496 OPT="$OPT -no-cpp-precomp";;
1497 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001498fi
1499
Trent Mick635f6fb2000-08-23 21:33:05 +00001500# The current (beta) Monterey compiler dies with optimizations
1501case $ac_sys_system in
1502Monterey*) OPT="";;
1503esac
1504
Guido van Rossum563e7081996-09-10 18:20:48 +00001505if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001506then
1507 OPT="$OPT $ac_arch_flags"
1508fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001509# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001510echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001511echo "configure:1512: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001512# On Suns, sometimes $CPP names a directory.
1513if test -n "$CPP" && test -d "$CPP"; then
1514 CPP=
1515fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001516if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001517if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001518 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001519else
1520 # This must be in double quotes, not single quotes, because CPP may get
1521 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001522 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001523 # On the NeXT, cc -E runs the code through the compiler's parser,
1524 # not just through cpp.
1525 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001526#line 1527 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001527#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001529Syntax Error
1530EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001531ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001532{ (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001533ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1534if test -z "$ac_err"; then
1535 :
1536else
1537 echo "$ac_err" >&5
1538 echo "configure: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1540 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001541 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001542 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001543#line 1544 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001544#include "confdefs.h"
1545#include <assert.h>
1546Syntax Error
1547EOF
1548ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001549{ (eval echo configure:1550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001550ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001551if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001552 :
1553else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001554 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001555 echo "configure: failed program was:" >&5
1556 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001557 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001558 CPP="${CC-cc} -nologo -E"
1559 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001560#line 1561 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001561#include "confdefs.h"
1562#include <assert.h>
1563Syntax Error
1564EOF
1565ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001566{ (eval echo configure:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001567ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1568if test -z "$ac_err"; then
1569 :
1570else
1571 echo "$ac_err" >&5
1572 echo "configure: failed program was:" >&5
1573 cat conftest.$ac_ext >&5
1574 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001575 CPP=/lib/cpp
1576fi
1577rm -f conftest*
1578fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001579rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001580fi
1581rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001582 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001583fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001584 CPP="$ac_cv_prog_CPP"
1585else
1586 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001587fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001588echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001589
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590echo $ac_n "checking for AIX""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001591echo "configure:1592: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001592cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001593#line 1594 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001594#include "confdefs.h"
1595#ifdef _AIX
1596 yes
1597#endif
1598
1599EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1601 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001602 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001603 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001604#define _ALL_SOURCE 1
1605EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001606
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607else
1608 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001609 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001610fi
1611rm -f conftest*
1612
1613
Guido van Rossumf78abae1997-01-21 22:02:36 +00001614ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001615echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001616echo "configure:1617: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001617if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001618 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001619else
1620 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001621#line 1622 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001622#include "confdefs.h"
1623#include <minix/config.h>
1624EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001625ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001626{ (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001627ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001628if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001629 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001631else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001633 echo "configure: failed program was:" >&5
1634 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635 rm -rf conftest*
1636 eval "ac_cv_header_$ac_safe=no"
1637fi
1638rm -f conftest*
1639fi
1640if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001641 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642 MINIX=yes
1643else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001644 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001645MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001646fi
1647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648if test "$MINIX" = yes; then
1649 cat >> confdefs.h <<\EOF
1650#define _POSIX_SOURCE 1
1651EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001652
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653 cat >> confdefs.h <<\EOF
1654#define _POSIX_1_SOURCE 2
1655EOF
1656
1657 cat >> confdefs.h <<\EOF
1658#define _MINIX 1
1659EOF
1660
1661fi
1662
Guido van Rossumda88dad1995-01-26 00:46:29 +00001663
Guido van Rossum91922671997-10-09 20:24:13 +00001664echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001665echo "configure:1666: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001666if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001667 echo $ac_n "(cached) $ac_c" 1>&6
1668else
1669 ac_save_cc="$CC"
1670CC="$CC -OPT:Olimit=0"
1671if test "$cross_compiling" = yes; then
1672 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1673else
1674 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001675#line 1676 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001676#include "confdefs.h"
1677int main() { return 0; }
1678EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001679if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001680then
1681 ac_cv_opt_olimit_ok=yes
1682else
1683 echo "configure: failed program was:" >&5
1684 cat conftest.$ac_ext >&5
1685 rm -fr conftest*
1686 ac_cv_opt_olimit_ok=no
1687fi
1688rm -fr conftest*
1689fi
1690
1691CC="$ac_save_cc"
1692fi
1693
1694echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001695if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001696 case $ac_sys_system in
1697 Darwin*) OPT="$OPT" ;;
1698 *) OPT="$OPT -OPT:Olimit=0";;
1699 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001700else
1701 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001702echo "configure:1703: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001703 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001704 echo $ac_n "(cached) $ac_c" 1>&6
1705else
1706 ac_save_cc="$CC"
1707 CC="$CC -Olimit 1500"
1708 if test "$cross_compiling" = yes; then
1709 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1710else
1711 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001712#line 1713 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001713#include "confdefs.h"
1714int main() { return 0; }
1715EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001716if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001717then
1718 ac_cv_olimit_ok=yes
1719else
1720 echo "configure: failed program was:" >&5
1721 cat conftest.$ac_ext >&5
1722 rm -fr conftest*
1723 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001724fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001725rm -fr conftest*
1726fi
1727
1728 CC="$ac_save_cc"
1729fi
1730
1731 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1732 if test $ac_cv_olimit_ok = yes; then
1733 OPT="$OPT -Olimit 1500"
1734 fi
1735fi
1736
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001737# Check for enable-ipv6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001738echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001739echo "configure:1740: checking whether to enable ipv6" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001740# Check whether --enable-ipv6 or --disable-ipv6 was given.
1741if test "${enable_ipv6+set}" = set; then
1742 enableval="$enable_ipv6"
1743 case "$enableval" in
1744 no)
1745 echo "$ac_t""no" 1>&6
1746 ipv6=no
1747 ;;
1748 *) echo "$ac_t""yes" 1>&6
1749 cat >> confdefs.h <<\EOF
1750#define ENABLE_IPV6 1
1751EOF
1752
1753 ipv6=yes
1754 ;;
1755 esac
1756else
1757 if test "$cross_compiling" = yes; then
1758 echo "$ac_t""no" 1>&6
1759 ipv6=no
1760
1761else
1762 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001763#line 1764 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001764#include "confdefs.h"
Fred Drake109d9862001-07-11 06:27:56 +00001765 /* AF_INET6 available check */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001766#include <sys/types.h>
1767#include <sys/socket.h>
1768main()
1769{
1770 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1771 exit(1);
1772 else
1773 exit(0);
1774}
1775
1776EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001777if { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001778then
1779 echo "$ac_t""yes" 1>&6
1780 cat >> confdefs.h <<\EOF
1781#define ENABLE_IPV6 1
1782EOF
1783
1784 ipv6=yes
1785else
1786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1788 rm -fr conftest*
1789 echo "$ac_t""no" 1>&6
1790 ipv6=no
1791fi
1792rm -fr conftest*
1793fi
1794
1795fi
1796
1797
1798ipv6type=unknown
1799ipv6lib=none
1800ipv6trylibc=no
1801
1802if test "$ipv6" = "yes"; then
1803 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001804echo "configure:1805: checking ipv6 stack type" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001805 for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do
1806 case $i in
1807 inria)
1808 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001809#line 1810 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001810#include "confdefs.h"
1811dnl
1812#include <netinet/in.h>
1813#ifdef IPV6_INRIA_VERSION
1814yes
1815#endif
1816EOF
1817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1818 egrep "yes" >/dev/null 2>&1; then
1819 rm -rf conftest*
1820 ipv6type=$i;
1821 OPT="-DINET6 $OPT"
1822fi
1823rm -f conftest*
1824
1825 ;;
1826 kame)
1827 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001828#line 1829 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001829#include "confdefs.h"
1830dnl
1831#include <netinet/in.h>
1832#ifdef __KAME__
1833yes
1834#endif
1835EOF
1836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1837 egrep "yes" >/dev/null 2>&1; then
1838 rm -rf conftest*
1839 ipv6type=$i;
1840 ipv6lib=inet6
1841 ipv6libdir=/usr/local/v6/lib
1842 ipv6trylibc=yes
1843 OPT="-DINET6 $OPT"
1844fi
1845rm -f conftest*
1846
1847 ;;
1848 linux-glibc)
1849 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001850#line 1851 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001851#include "confdefs.h"
1852dnl
1853#include <features.h>
1854#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
1855yes
1856#endif
1857EOF
1858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1859 egrep "yes" >/dev/null 2>&1; then
1860 rm -rf conftest*
1861 ipv6type=$i;
1862 ipv6trylibc=yes
1863 OPT="-DINET6 $OPT"
1864fi
1865rm -f conftest*
1866
1867 ;;
1868 linux-inet6)
1869 if test -d /usr/inet6; then
1870 ipv6type=$i
1871 ipv6lib=inet6
1872 ipv6libdir=/usr/inet6/lib
1873 OPT="-DINET6 -I/usr/inet6/include $OPT"
1874 fi
1875 ;;
1876 toshiba)
1877 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001878#line 1879 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001879#include "confdefs.h"
1880dnl
1881#include <sys/param.h>
1882#ifdef _TOSHIBA_INET6
1883yes
1884#endif
1885EOF
1886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1887 egrep "yes" >/dev/null 2>&1; then
1888 rm -rf conftest*
1889 ipv6type=$i;
1890 ipv6lib=inet6;
1891 ipv6libdir=/usr/local/v6/lib;
1892 OPT="-DINET6 $OPT"
1893fi
1894rm -f conftest*
1895
1896 ;;
1897 v6d)
1898 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001899#line 1900 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001900#include "confdefs.h"
1901dnl
1902#include </usr/local/v6/include/sys/v6config.h>
1903#ifdef __V6D__
1904yes
1905#endif
1906EOF
1907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1908 egrep "yes" >/dev/null 2>&1; then
1909 rm -rf conftest*
1910 ipv6type=$i;
1911 ipv6lib=v6;
1912 ipv6libdir=/usr/local/v6/lib;
1913 OPT="-I/usr/local/v6/include $OPT"
1914fi
1915rm -f conftest*
1916
1917 ;;
1918 zeta)
1919 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001920#line 1921 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001921#include "confdefs.h"
1922dnl
1923#include <sys/param.h>
1924#ifdef _ZETA_MINAMI_INET6
1925yes
1926#endif
1927EOF
1928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1929 egrep "yes" >/dev/null 2>&1; then
1930 rm -rf conftest*
1931 ipv6type=$i;
1932 ipv6lib=inet6;
1933 ipv6libdir=/usr/local/v6/lib;
1934 OPT="-DINET6 $OPT"
1935fi
1936rm -f conftest*
1937
1938 ;;
1939 esac
1940 if test "$ipv6type" != "unknown"; then
1941 break
1942 fi
1943 done
1944 echo "$ac_t""$ipv6type" 1>&6
1945fi
1946
1947if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
1948 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
1949 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
1950 echo "using lib$ipv6lib"
1951 else
1952 if test $ipv6trylibc = "yes"; then
1953 echo "using libc"
1954 else
1955 echo 'Fatal: no $ipv6lib library found. cannot continue.'
1956 echo "You need to fetch lib$ipv6lib.a from appropriate"
1957 echo 'ipv6 kit and compile beforehand.'
1958 exit 1
1959 fi
1960 fi
1961fi
1962
Martin v. Löwis130fb172001-07-19 11:00:41 +00001963# -Kpthread, if available, provides the right #defines
1964# and linker options to make pthread_create available
1965echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001966echo "configure:1967: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00001967if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1968 echo $ac_n "(cached) $ac_c" 1>&6
1969else
1970 ac_save_cc="$CC"
1971CC="$CC -Kpthread"
1972cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001973#line 1974 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001974#include "confdefs.h"
1975#include <pthread.h>
1976int main() {
1977pthread_create(0,0,0,0)
1978; return 0; }
1979EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001980if { (eval echo configure:1981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001981 rm -rf conftest*
1982 ac_cv_kpthread=yes
1983else
1984 echo "configure: failed program was:" >&5
1985 cat conftest.$ac_ext >&5
1986 rm -rf conftest*
1987 ac_cv_kpthread=no
1988fi
1989rm -f conftest*
1990CC="$ac_save_cc"
1991fi
1992
1993
1994# GCC does not reject -Kpthread as an illegal option, it merely complains that
1995# it is unrecognized
1996if test "$GCC" = "yes"
1997then ac_cv_kpthread="no, we have gcc"
1998fi
1999echo "$ac_t""$ac_cv_kpthread" 1>&6
2000
Guido van Rossum84e7b241996-08-19 21:59:00 +00002001
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002002# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002003echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002004echo "configure:2005: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002005if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002006 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002007else
2008 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002009#line 2010 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002010#include "confdefs.h"
2011#include <stdlib.h>
2012#include <stdarg.h>
2013#include <string.h>
2014#include <float.h>
2015EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002016ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002017{ (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002018ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002019if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002020 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002021 ac_cv_header_stdc=yes
2022else
2023 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002024 echo "configure: failed program was:" >&5
2025 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002026 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027 ac_cv_header_stdc=no
2028fi
2029rm -f conftest*
2030
2031if test $ac_cv_header_stdc = yes; then
2032 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2033cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002034#line 2035 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002035#include "confdefs.h"
2036#include <string.h>
2037EOF
2038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2039 egrep "memchr" >/dev/null 2>&1; then
2040 :
2041else
2042 rm -rf conftest*
2043 ac_cv_header_stdc=no
2044fi
2045rm -f conftest*
2046
2047fi
2048
2049if test $ac_cv_header_stdc = yes; then
2050 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2051cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002052#line 2053 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002053#include "confdefs.h"
2054#include <stdlib.h>
2055EOF
2056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2057 egrep "free" >/dev/null 2>&1; then
2058 :
2059else
2060 rm -rf conftest*
2061 ac_cv_header_stdc=no
2062fi
2063rm -f conftest*
2064
2065fi
2066
2067if test $ac_cv_header_stdc = yes; then
2068 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2069if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002071else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002072 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002073#line 2074 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002074#include "confdefs.h"
2075#include <ctype.h>
2076#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2077#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00002079int main () { int i; for (i = 0; i < 256; i++)
2080if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2081exit (0); }
2082
2083EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002084if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002085then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002086 :
2087else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002088 echo "configure: failed program was:" >&5
2089 cat conftest.$ac_ext >&5
2090 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002092fi
2093rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002095
2096fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002097fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002098
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002099echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002100if test $ac_cv_header_stdc = yes; then
2101 cat >> confdefs.h <<\EOF
2102#define STDC_HEADERS 1
2103EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002104
2105fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002106
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00002107for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00002108signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00002109sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002110sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00002111sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Thomas Wouterse38b2f12001-07-11 22:35:31 +00002112ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002113do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002114ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002115echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002116echo "configure:2117: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002117if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002118 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002119else
2120 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002121#line 2122 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002122#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002123#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00002124EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002125ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002126{ (eval echo configure:2127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002127ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002128if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002129 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002130 eval "ac_cv_header_$ac_safe=yes"
2131else
2132 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002133 echo "configure: failed program was:" >&5
2134 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002135 rm -rf conftest*
2136 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002137fi
2138rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002139fi
2140if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002141 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002142 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002143 cat >> confdefs.h <<EOF
2144#define $ac_tr_hdr 1
2145EOF
2146
2147else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002148 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002149fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002150done
2151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002152ac_header_dirent=no
2153for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2154do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002155ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002156echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002157echo "configure:2158: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002158if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002159 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002160else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002161 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002162#line 2163 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002163#include "confdefs.h"
2164#include <sys/types.h>
2165#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002166int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002167DIR *dirp = 0;
2168; return 0; }
2169EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002170if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002171 rm -rf conftest*
2172 eval "ac_cv_header_dirent_$ac_safe=yes"
2173else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002174 echo "configure: failed program was:" >&5
2175 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002176 rm -rf conftest*
2177 eval "ac_cv_header_dirent_$ac_safe=no"
2178fi
2179rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002180fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002181if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002182 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002183 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002184 cat >> confdefs.h <<EOF
2185#define $ac_tr_hdr 1
2186EOF
2187 ac_header_dirent=$ac_hdr; break
2188else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002189 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002190fi
2191done
2192# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2193if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002194echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002195echo "configure:2196: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002196ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002197if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002198 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002199else
2200 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002201LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002202cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002203#line 2204 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002204#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002205/* Override any gcc2 internal prototype to avoid an error. */
2206/* We use char because int might match the return type of a gcc2
2207 builtin and then its argument prototype would still apply. */
2208char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002209
Guido van Rossumf78abae1997-01-21 22:02:36 +00002210int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002211opendir()
2212; return 0; }
2213EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002214if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002216 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002217else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002218 echo "configure: failed program was:" >&5
2219 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002220 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002221 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002222fi
2223rm -f conftest*
2224LIBS="$ac_save_LIBS"
2225
2226fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002227if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002228 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229 LIBS="$LIBS -ldir"
2230else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002231 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002232fi
2233
2234else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002235echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002236echo "configure:2237: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002237ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002238if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002239 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002240else
2241 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002242LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002244#line 2245 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002246/* Override any gcc2 internal prototype to avoid an error. */
2247/* We use char because int might match the return type of a gcc2
2248 builtin and then its argument prototype would still apply. */
2249char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002250
Guido van Rossumf78abae1997-01-21 22:02:36 +00002251int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252opendir()
2253; return 0; }
2254EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002255if { (eval echo configure:2256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002256 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002257 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002258else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002259 echo "configure: failed program was:" >&5
2260 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002261 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002262 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002263fi
2264rm -f conftest*
2265LIBS="$ac_save_LIBS"
2266
2267fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002268if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002269 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270 LIBS="$LIBS -lx"
2271else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002272 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002273fi
2274
2275fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002276
2277
2278# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002279was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002280echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002281echo "configure:2282: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002282cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002283#line 2284 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002284#include "confdefs.h"
2285#include <time.h>
2286EOF
2287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2288 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002289 rm -rf conftest*
2290 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002291else
2292 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002293 cat >> confdefs.h <<\EOF
2294#define clock_t long
2295EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002296
2297fi
2298rm -f conftest*
2299
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002300echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002301
Guido van Rossum84e7b241996-08-19 21:59:00 +00002302# Add some code to confdefs.h so that the test for off_t works on SCO
2303cat >> confdefs.h <<\EOF
2304#if defined(SCO_DS)
2305#undef _OFF_T
2306#endif
2307EOF
2308
Guido van Rossumef2255b2000-03-10 22:30:29 +00002309# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002310echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002311echo "configure:2312: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002312if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002313 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002314else
2315 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002316#line 2317 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317#include "confdefs.h"
2318#include <sys/types.h>
2319#if STDC_HEADERS
2320#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002321#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002322#endif
2323EOF
2324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002325 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002326 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002327 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002328else
2329 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002330 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002331fi
2332rm -f conftest*
2333
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002334fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002335echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2336if test $ac_cv_type_mode_t = no; then
2337 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338#define mode_t int
2339EOF
2340
2341fi
2342
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002343echo $ac_n "checking for off_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002344echo "configure:2345: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002345if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002346 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002347else
2348 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002349#line 2350 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002350#include "confdefs.h"
2351#include <sys/types.h>
2352#if STDC_HEADERS
2353#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002354#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002355#endif
2356EOF
2357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002358 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002359 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002360 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002361else
2362 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002363 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002364fi
2365rm -f conftest*
2366
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002367fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002368echo "$ac_t""$ac_cv_type_off_t" 1>&6
2369if test $ac_cv_type_off_t = no; then
2370 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002371#define off_t long
2372EOF
2373
2374fi
2375
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002376echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002377echo "configure:2378: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002378if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002379 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002380else
2381 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002382#line 2383 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002383#include "confdefs.h"
2384#include <sys/types.h>
2385#if STDC_HEADERS
2386#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002387#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002388#endif
2389EOF
2390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002391 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002393 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002394else
2395 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002396 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002397fi
2398rm -f conftest*
2399
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002400fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002401echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2402if test $ac_cv_type_pid_t = no; then
2403 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002404#define pid_t int
2405EOF
2406
2407fi
2408
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002409echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002410echo "configure:2411: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002411if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002412 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002413else
2414 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002415#line 2416 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002416#include "confdefs.h"
2417#include <sys/types.h>
2418#include <signal.h>
2419#ifdef signal
2420#undef signal
2421#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002422#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002423extern "C" void (*signal (int, void (*)(int)))(int);
2424#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002425void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002426#endif
2427
Guido van Rossumf78abae1997-01-21 22:02:36 +00002428int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002429int i;
2430; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002431EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002432if { (eval echo configure:2433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002433 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002434 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002435else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002436 echo "configure: failed program was:" >&5
2437 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002438 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002439 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002440fi
2441rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002442fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002443
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002444echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002445cat >> confdefs.h <<EOF
2446#define RETSIGTYPE $ac_cv_type_signal
2447EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002449
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002450echo $ac_n "checking for size_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002451echo "configure:2452: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002452if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002453 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002454else
2455 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002456#line 2457 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002457#include "confdefs.h"
2458#include <sys/types.h>
2459#if STDC_HEADERS
2460#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002461#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002462#endif
2463EOF
2464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002465 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002466 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002467 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002468else
2469 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002470 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002471fi
2472rm -f conftest*
2473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002474fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002475echo "$ac_t""$ac_cv_type_size_t" 1>&6
2476if test $ac_cv_type_size_t = no; then
2477 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002478#define size_t unsigned
2479EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002480
2481fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002482
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002483echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002484echo "configure:2485: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002485if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002486 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002487else
2488 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002489#line 2490 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002490#include "confdefs.h"
2491#include <sys/types.h>
2492EOF
2493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2494 egrep "uid_t" >/dev/null 2>&1; then
2495 rm -rf conftest*
2496 ac_cv_type_uid_t=yes
2497else
2498 rm -rf conftest*
2499 ac_cv_type_uid_t=no
2500fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002501rm -f conftest*
2502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002503fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002504
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002505echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506if test $ac_cv_type_uid_t = no; then
2507 cat >> confdefs.h <<\EOF
2508#define uid_t int
2509EOF
2510
2511 cat >> confdefs.h <<\EOF
2512#define gid_t int
2513EOF
2514
2515fi
2516
Guido van Rossum627b2d71993-12-24 10:39:16 +00002517
Guido van Rossumef2255b2000-03-10 22:30:29 +00002518# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002519echo $ac_n "checking size of int""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002520echo "configure:2521: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002521if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002522 echo $ac_n "(cached) $ac_c" 1>&6
2523else
2524 if test "$cross_compiling" = yes; then
2525 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2526else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002527 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002528#line 2529 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002529#include "confdefs.h"
2530#include <stdio.h>
2531main()
2532{
2533 FILE *f=fopen("conftestval", "w");
2534 if (!f) exit(1);
2535 fprintf(f, "%d\n", sizeof(int));
2536 exit(0);
2537}
2538EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002539if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002540then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002541 ac_cv_sizeof_int=`cat conftestval`
2542else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002543 echo "configure: failed program was:" >&5
2544 cat conftest.$ac_ext >&5
2545 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002546 ac_cv_sizeof_int=0
2547fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002548rm -fr conftest*
2549fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002550
2551fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002552echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2553cat >> confdefs.h <<EOF
2554#define SIZEOF_INT $ac_cv_sizeof_int
2555EOF
2556
2557
2558echo $ac_n "checking size of long""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002559echo "configure:2560: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002560if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002561 echo $ac_n "(cached) $ac_c" 1>&6
2562else
2563 if test "$cross_compiling" = yes; then
2564 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2565else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002566 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002567#line 2568 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002568#include "confdefs.h"
2569#include <stdio.h>
2570main()
2571{
2572 FILE *f=fopen("conftestval", "w");
2573 if (!f) exit(1);
2574 fprintf(f, "%d\n", sizeof(long));
2575 exit(0);
2576}
2577EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002578if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002579then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002580 ac_cv_sizeof_long=`cat conftestval`
2581else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002582 echo "configure: failed program was:" >&5
2583 cat conftest.$ac_ext >&5
2584 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002585 ac_cv_sizeof_long=0
2586fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002587rm -fr conftest*
2588fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002589
2590fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002591echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2592cat >> confdefs.h <<EOF
2593#define SIZEOF_LONG $ac_cv_sizeof_long
2594EOF
2595
2596
Guido van Rossumad678af1998-10-02 14:42:15 +00002597echo $ac_n "checking size of void *""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002598echo "configure:2599: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002599if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002600 echo $ac_n "(cached) $ac_c" 1>&6
2601else
2602 if test "$cross_compiling" = yes; then
2603 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2604else
2605 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002606#line 2607 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002607#include "confdefs.h"
2608#include <stdio.h>
2609main()
2610{
2611 FILE *f=fopen("conftestval", "w");
2612 if (!f) exit(1);
2613 fprintf(f, "%d\n", sizeof(void *));
2614 exit(0);
2615}
2616EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002617if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad678af1998-10-02 14:42:15 +00002618then
2619 ac_cv_sizeof_void_p=`cat conftestval`
2620else
2621 echo "configure: failed program was:" >&5
2622 cat conftest.$ac_ext >&5
2623 rm -fr conftest*
2624 ac_cv_sizeof_void_p=0
2625fi
2626rm -fr conftest*
2627fi
2628
2629fi
2630echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2631cat >> confdefs.h <<EOF
2632#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2633EOF
2634
2635
Guido van Rossumef2255b2000-03-10 22:30:29 +00002636echo $ac_n "checking size of char""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002637echo "configure:2638: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002638if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002639 echo $ac_n "(cached) $ac_c" 1>&6
2640else
2641 if test "$cross_compiling" = yes; then
2642 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2643else
2644 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002645#line 2646 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002646#include "confdefs.h"
2647#include <stdio.h>
2648main()
2649{
2650 FILE *f=fopen("conftestval", "w");
2651 if (!f) exit(1);
2652 fprintf(f, "%d\n", sizeof(char));
2653 exit(0);
2654}
2655EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002656if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002657then
2658 ac_cv_sizeof_char=`cat conftestval`
2659else
2660 echo "configure: failed program was:" >&5
2661 cat conftest.$ac_ext >&5
2662 rm -fr conftest*
2663 ac_cv_sizeof_char=0
2664fi
2665rm -fr conftest*
2666fi
2667
2668fi
2669echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2670cat >> confdefs.h <<EOF
2671#define SIZEOF_CHAR $ac_cv_sizeof_char
2672EOF
2673
2674
2675echo $ac_n "checking size of short""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002676echo "configure:2677: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002677if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002678 echo $ac_n "(cached) $ac_c" 1>&6
2679else
2680 if test "$cross_compiling" = yes; then
2681 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2682else
2683 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002684#line 2685 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002685#include "confdefs.h"
2686#include <stdio.h>
2687main()
2688{
2689 FILE *f=fopen("conftestval", "w");
2690 if (!f) exit(1);
2691 fprintf(f, "%d\n", sizeof(short));
2692 exit(0);
2693}
2694EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002695if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002696then
2697 ac_cv_sizeof_short=`cat conftestval`
2698else
2699 echo "configure: failed program was:" >&5
2700 cat conftest.$ac_ext >&5
2701 rm -fr conftest*
2702 ac_cv_sizeof_short=0
2703fi
2704rm -fr conftest*
2705fi
2706
2707fi
2708echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2709cat >> confdefs.h <<EOF
2710#define SIZEOF_SHORT $ac_cv_sizeof_short
2711EOF
2712
2713
2714echo $ac_n "checking size of float""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002715echo "configure:2716: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002716if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002717 echo $ac_n "(cached) $ac_c" 1>&6
2718else
2719 if test "$cross_compiling" = yes; then
2720 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2721else
2722 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002723#line 2724 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002724#include "confdefs.h"
2725#include <stdio.h>
2726main()
2727{
2728 FILE *f=fopen("conftestval", "w");
2729 if (!f) exit(1);
2730 fprintf(f, "%d\n", sizeof(float));
2731 exit(0);
2732}
2733EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002734if { (eval echo configure:2735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002735then
2736 ac_cv_sizeof_float=`cat conftestval`
2737else
2738 echo "configure: failed program was:" >&5
2739 cat conftest.$ac_ext >&5
2740 rm -fr conftest*
2741 ac_cv_sizeof_float=0
2742fi
2743rm -fr conftest*
2744fi
2745
2746fi
2747echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2748cat >> confdefs.h <<EOF
2749#define SIZEOF_FLOAT $ac_cv_sizeof_float
2750EOF
2751
2752
2753echo $ac_n "checking size of double""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002754echo "configure:2755: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002755if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002756 echo $ac_n "(cached) $ac_c" 1>&6
2757else
2758 if test "$cross_compiling" = yes; then
2759 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2760else
2761 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002762#line 2763 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002763#include "confdefs.h"
2764#include <stdio.h>
2765main()
2766{
2767 FILE *f=fopen("conftestval", "w");
2768 if (!f) exit(1);
2769 fprintf(f, "%d\n", sizeof(double));
2770 exit(0);
2771}
2772EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002773if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002774then
2775 ac_cv_sizeof_double=`cat conftestval`
2776else
2777 echo "configure: failed program was:" >&5
2778 cat conftest.$ac_ext >&5
2779 rm -fr conftest*
2780 ac_cv_sizeof_double=0
2781fi
2782rm -fr conftest*
2783fi
2784
2785fi
2786echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2787cat >> confdefs.h <<EOF
2788#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2789EOF
2790
2791
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002792echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002793echo "configure:2794: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002794if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002795 echo $ac_n "(cached) $ac_c" 1>&6
2796else
2797 if test "$cross_compiling" = yes; then
2798 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2799else
2800 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002801#line 2802 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002802#include "confdefs.h"
2803#include <stdio.h>
2804main()
2805{
2806 FILE *f=fopen("conftestval", "w");
2807 if (!f) exit(1);
2808 fprintf(f, "%d\n", sizeof(fpos_t));
2809 exit(0);
2810}
2811EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002812if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002813then
2814 ac_cv_sizeof_fpos_t=`cat conftestval`
2815else
2816 echo "configure: failed program was:" >&5
2817 cat conftest.$ac_ext >&5
2818 rm -fr conftest*
2819 ac_cv_sizeof_fpos_t=0
2820fi
2821rm -fr conftest*
2822fi
2823
2824fi
2825echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2826cat >> confdefs.h <<EOF
2827#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2828EOF
2829
2830
Guido van Rossum0a516c91994-09-12 10:58:40 +00002831
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002832echo $ac_n "checking for long long support""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002833echo "configure:2834: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002834have_long_long=no
2835cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002836#line 2837 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002837#include "confdefs.h"
2838
2839int main() {
2840long long x; x = (long long)0;
2841; return 0; }
2842EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002843if { (eval echo configure:2844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002844 rm -rf conftest*
2845 cat >> confdefs.h <<\EOF
2846#define HAVE_LONG_LONG 1
2847EOF
2848 have_long_long=yes
2849else
2850 echo "configure: failed program was:" >&5
2851 cat conftest.$ac_ext >&5
2852fi
2853rm -f conftest*
2854echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002855if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002856echo $ac_n "checking size of long long""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002857echo "configure:2858: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002858if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002859 echo $ac_n "(cached) $ac_c" 1>&6
2860else
2861 if test "$cross_compiling" = yes; then
2862 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2863else
2864 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002865#line 2866 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002866#include "confdefs.h"
2867#include <stdio.h>
2868main()
2869{
2870 FILE *f=fopen("conftestval", "w");
2871 if (!f) exit(1);
2872 fprintf(f, "%d\n", sizeof(long long));
2873 exit(0);
2874}
2875EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002876if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002877then
2878 ac_cv_sizeof_long_long=`cat conftestval`
2879else
2880 echo "configure: failed program was:" >&5
2881 cat conftest.$ac_ext >&5
2882 rm -fr conftest*
2883 ac_cv_sizeof_long_long=0
2884fi
2885rm -fr conftest*
2886fi
2887
2888fi
2889echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2890cat >> confdefs.h <<EOF
2891#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2892EOF
2893
2894
2895fi
2896
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002897echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002898echo "configure:2899: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002899have_uintptr_t=no
2900cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002901#line 2902 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002902#include "confdefs.h"
2903
2904int main() {
2905uintptr_t x; x = (uintptr_t)0;
2906; return 0; }
2907EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002908if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002909 rm -rf conftest*
2910 cat >> confdefs.h <<\EOF
2911#define HAVE_UINTPTR_T 1
2912EOF
2913 have_uintptr_t=yes
2914else
2915 echo "configure: failed program was:" >&5
2916 cat conftest.$ac_ext >&5
2917fi
2918rm -f conftest*
2919echo "$ac_t""$have_uintptr_t" 1>&6
2920if test "$have_uintptr_t" = yes ; then
2921echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002922echo "configure:2923: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002923if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002924 echo $ac_n "(cached) $ac_c" 1>&6
2925else
2926 if test "$cross_compiling" = yes; then
2927 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2928else
2929 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002930#line 2931 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002931#include "confdefs.h"
2932#include <stdio.h>
2933main()
2934{
2935 FILE *f=fopen("conftestval", "w");
2936 if (!f) exit(1);
2937 fprintf(f, "%d\n", sizeof(uintptr_t));
2938 exit(0);
2939}
2940EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002941if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002942then
2943 ac_cv_sizeof_uintptr_t=`cat conftestval`
2944else
2945 echo "configure: failed program was:" >&5
2946 cat conftest.$ac_ext >&5
2947 rm -fr conftest*
2948 ac_cv_sizeof_uintptr_t=0
2949fi
2950rm -fr conftest*
2951fi
2952
2953fi
2954echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2955cat >> confdefs.h <<EOF
2956#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2957EOF
2958
2959
2960fi
2961
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002962# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2963echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002964echo "configure:2965: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002965if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002966 echo $ac_n "(cached) $ac_c" 1>&6
2967else
2968 if test "$cross_compiling" = yes; then
2969 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2970else
2971 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002972#line 2973 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002973#include "confdefs.h"
2974#include <stdio.h>
2975#include <sys/types.h>
2976main()
2977{
2978 FILE *f=fopen("conftestval", "w");
2979 if (!f) exit(1);
2980 fprintf(f, "%d\n", sizeof(off_t));
2981 exit(0);
2982}
2983EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002984if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002985then
2986 ac_cv_sizeof_off_t=`cat conftestval`
2987else
2988 echo "configure: failed program was:" >&5
2989 cat conftest.$ac_ext >&5
2990 rm -fr conftest*
2991 ac_cv_sizeof_off_t=0
2992fi
2993rm -fr conftest*
2994fi
2995
2996
2997fi
2998
2999echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
3000cat >> confdefs.h <<EOF
3001#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
3002EOF
3003
3004
3005echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003006echo "configure:3007: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00003007if test "$have_long_long" = yes -a \
3008 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
3009 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003010 cat >> confdefs.h <<\EOF
3011#define HAVE_LARGEFILE_SUPPORT 1
3012EOF
3013
3014 echo "$ac_t""yes" 1>&6
3015else
3016 echo "$ac_t""no" 1>&6
3017fi
3018
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003019# AC_CHECK_SIZEOF() doesn't include <time.h>.
3020echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003021echo "configure:3022: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003022if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003023 echo $ac_n "(cached) $ac_c" 1>&6
3024else
3025 if test "$cross_compiling" = yes; then
3026 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3027else
3028 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003029#line 3030 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003030#include "confdefs.h"
3031#include <stdio.h>
3032#include <time.h>
3033main()
3034{
3035 FILE *f=fopen("conftestval", "w");
3036 if (!f) exit(1);
3037 fprintf(f, "%d\n", sizeof(time_t));
3038 exit(0);
3039}
3040EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003041if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003042then
3043 ac_cv_sizeof_time_t=`cat conftestval`
3044else
3045 echo "configure: failed program was:" >&5
3046 cat conftest.$ac_ext >&5
3047 rm -fr conftest*
3048 ac_cv_sizeof_time_t=0
3049fi
3050rm -fr conftest*
3051fi
3052
3053
3054fi
3055
3056echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
3057cat >> confdefs.h <<EOF
3058#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
3059EOF
3060
3061
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003062
Trent Mick635f6fb2000-08-23 21:33:05 +00003063# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003064ac_save_cc="$CC"
3065if test "$ac_cv_kpthread" = "yes"
3066then CC="$CC -Kpthread"
3067fi
Trent Mick635f6fb2000-08-23 21:33:05 +00003068echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003069echo "configure:3070: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003070have_pthread_t=no
3071cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003072#line 3073 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003073#include "confdefs.h"
3074#include <pthread.h>
3075int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00003076pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00003077; return 0; }
3078EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003079if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00003080 rm -rf conftest*
3081 have_pthread_t=yes
3082else
3083 echo "configure: failed program was:" >&5
3084 cat conftest.$ac_ext >&5
3085fi
3086rm -f conftest*
3087echo "$ac_t""$have_pthread_t" 1>&6
3088if test "$have_pthread_t" = yes ; then
3089 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
3090 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003091echo "configure:3092: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003092 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00003093 echo $ac_n "(cached) $ac_c" 1>&6
3094else
3095 if test "$cross_compiling" = yes; then
3096 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3097else
3098 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003099#line 3100 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003100#include "confdefs.h"
3101#include <stdio.h>
3102 #include <pthread.h>
3103 main()
3104 {
3105 FILE *f=fopen("conftestval", "w");
3106 if (!f) exit(1);
3107 fprintf(f, "%d\n", sizeof(pthread_t));
3108 exit(0);
3109 }
3110EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003111if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Trent Mick635f6fb2000-08-23 21:33:05 +00003112then
3113 ac_cv_sizeof_pthread_t=`cat conftestval`
3114else
3115 echo "configure: failed program was:" >&5
3116 cat conftest.$ac_ext >&5
3117 rm -fr conftest*
3118 ac_cv_sizeof_pthread_t=0
3119fi
3120rm -fr conftest*
3121fi
3122
3123
3124fi
3125
3126 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3127 cat >> confdefs.h <<EOF
3128#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3129EOF
3130
3131fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003132CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003133
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003134# Minor variations in building a framework between NextStep versions 4 and 5
3135
3136case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00003137 Darwin/*)
3138 ns_undef_sym='_environ'
Jack Jansenca06bc62001-08-03 15:32:23 +00003139 LIBTOOL_CRUFT="-framework Foundation -framework Carbon -lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003140 next/4*)
3141 ns_undef_sym='__environ'
3142 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
3143 next/5*)
3144 ns_undef_sym='_environ'
3145 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
3146esac
3147
3148echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003149echo "configure:3150: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003150if test "$with_next_framework"
3151then
Jack Jansenca06bc62001-08-03 15:32:23 +00003152 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003153 # -U __environ is needed since bundles don't have access
3154 # to crt0 when built but will always be linked against it
3155 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
3156 cat >> confdefs.h <<\EOF
3157#define WITH_NEXT_FRAMEWORK 1
3158EOF
3159
3160 echo "$ac_t""yes" 1>&6
3161else
3162 echo "$ac_t""no" 1>&6
3163fi
3164
3165echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003166echo "configure:3167: checking for --with-dyld" >&5
3167case $ac_sys_system/$ac_sys_release in
3168 Darwin/*)
3169 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003170#define WITH_DYLD 1
3171EOF
3172
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003173 echo "$ac_t""always on for Darwin" 1>&6
3174 ;;
3175 *)
3176 if test "$with_next_framework" -o "$with_dyld"
3177 then
3178 if test "$with_dyld"
3179 then
3180 echo "$ac_t""yes" 1>&6
3181 else
3182 echo "$ac_t""required for framework build" 1>&6
3183 fi
3184 cat >> confdefs.h <<\EOF
3185#define WITH_DYLD 1
3186EOF
3187
3188 ns_dyld='set'
3189 else
3190 echo "$ac_t""no" 1>&6
3191 fi ;;
3192esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003193
Guido van Rossum0a516c91994-09-12 10:58:40 +00003194# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003195
3196
3197
3198
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003199
Guido van Rossum0a516c91994-09-12 10:58:40 +00003200# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003201# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003202echo $ac_n "checking SO""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003203echo "configure:3204: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003204if test -z "$SO"
3205then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003206 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003207 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003208 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003209 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003210 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003211fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003212echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003213# LDSHARED is the ld *command* used to create shared library
3214# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003215# (Shared libraries in this instance are shared modules to be loaded into
3216# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003217echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003218echo "configure:3219: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003219if test -z "$LDSHARED"
3220then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003221 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003222 AIX*)
3223 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3224 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3225 ;;
3226 BeOS*)
3227 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3228 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3229 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003230 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003231 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003232 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00003233 SunOS/5*)
3234 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003235 then LDSHARED='$(CC) -shared'
Greg Ward57c9a662000-05-26 12:22:54 +00003236 else LDSHARED="ld -G";
3237 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003238 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003239 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3240 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003241 Darwin/*)
3242 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
3243 if test "$with_next_framework" ; then
3244 LDSHARED="$LDSHARED \$(LDLIBRARY)"
3245 fi ;;
3246 next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003247 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00003248 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003249 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
3250 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00003251 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003252 LDSHARED="$LDSHARED \$(LDLIBRARY)"
3253 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003254 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003255 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003256 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003257 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00003258 NetBSD*)
3259 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3260 then
3261 LDSHARED="cc -shared"
3262 else
3263 LDSHARED="ld -Bshareable"
3264 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003265 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003266 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003267 then
3268 LDSHARED="cc -shared ${LDFLAGS}"
3269 else
3270 LDSHARED="ld -Bshareable ${LDFLAGS}"
3271 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003272 UnixWare*)
3273 if test "$GCC" = "yes"
3274 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003275 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003276 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003277 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003278 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003279 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003280 *) LDSHARED="ld";;
3281 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003282fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003283echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003284BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003285# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003286# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003287echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003288echo "configure:3289: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003289if test -z "$CCSHARED"
3290then
Guido van Rossum07397971997-04-29 21:49:50 +00003291 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003292 SunOS*) if test "$GCC" = yes;
3293 then CCSHARED="-fPIC";
3294 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003295 hp*|HP*) if test "$GCC" = yes;
3296 then CCSHARED="-fpic";
3297 else CCSHARED="+z";
3298 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003299 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003300 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003301 OpenBSD*) CCSHARED="-fpic";;
3302 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003303 UnixWare*)
3304 if test "$GCC" = "yes"
3305 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003306 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003307 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003308 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003309 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003310 IRIX*/6*) case $CC in
3311 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003312 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003313 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003314 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003315 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003316fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003317echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003318# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003319# the python executable -- this is only needed for a few systems
3320echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003321echo "configure:3322: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003322if test -z "$LINKFORSHARED"
3323then
Guido van Rossum07397971997-04-29 21:49:50 +00003324 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003325 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003326 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003327 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003328 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003329 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003330 # -u libsys_s pulls in all symbols in libsys
3331 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
3332 # -u __dummy makes the linker aware of the objc runtime
3333 # in System.framework; otherwise, __objcInit (referenced in
3334 # crt1.o) gets erroneously defined as common, which breaks dynamic
3335 # loading of any modules which reference it in System.framework
3336 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Neil Schemenauer4e425612001-06-19 15:44:15 +00003337 Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003338 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003339 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003340 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003341 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003342 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3343 then
3344 LINKFORSHARED="-Wl,--export-dynamic"
3345 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003346 SunOS/5*) case $CC in
3347 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003348 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003349 then
3350 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003351 fi;;
3352 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003353 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003354fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003355echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003356
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003357
3358echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003359echo "configure:3360: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003360if test ! "$LIBRARY" = "$LDLIBRARY"
3361then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003362 case $ac_sys_system in
3363 CYGWIN*)
3364 # Cygwin needs CCSHARED when building extension DLLs
3365 # but not when building the interpreter DLL.
3366 CFLAGSFORSHARED='';;
3367 *)
3368 CFLAGSFORSHARED='$(CCSHARED)'
3369 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003370fi
3371echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3372
Guido van Rossum627b2d71993-12-24 10:39:16 +00003373# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003374echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003375echo "configure:3376: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003376ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003377if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003378 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003379else
3380 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003381LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003382cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003383#line 3384 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003384#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003385/* Override any gcc2 internal prototype to avoid an error. */
3386/* We use char because int might match the return type of a gcc2
3387 builtin and then its argument prototype would still apply. */
3388char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003389
Guido van Rossumf78abae1997-01-21 22:02:36 +00003390int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003391dlopen()
3392; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003393EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003394if { (eval echo configure:3395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003395 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003396 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003397else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003398 echo "configure: failed program was:" >&5
3399 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003401 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003402fi
3403rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003404LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003405
Guido van Rossum627b2d71993-12-24 10:39:16 +00003406fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003407if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003408 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003409 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3410 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003411 cat >> confdefs.h <<EOF
3412#define $ac_tr_lib 1
3413EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003414
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003415 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003416
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003418 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003419fi
3420 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003421echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003422echo "configure:3423: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003423ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003424if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003425 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003426else
3427 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003428LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003429cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003430#line 3431 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003431#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003432/* Override any gcc2 internal prototype to avoid an error. */
3433/* We use char because int might match the return type of a gcc2
3434 builtin and then its argument prototype would still apply. */
3435char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003436
Guido van Rossumf78abae1997-01-21 22:02:36 +00003437int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003438shl_load()
3439; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003440EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003441if { (eval echo configure:3442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003442 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003443 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003444else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003445 echo "configure: failed program was:" >&5
3446 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003447 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003448 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003449fi
3450rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003451LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003452
Guido van Rossum627b2d71993-12-24 10:39:16 +00003453fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003454if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003455 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003456 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3457 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003458 cat >> confdefs.h <<EOF
3459#define $ac_tr_lib 1
3460EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003461
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003462 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003463
3464else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003465 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003466fi
3467 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003468
3469# checks for system dependent C++ extensions support
3470case "$ac_sys_system" in
3471 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003472echo "configure:3473: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003473 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003474#line 3475 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003475#include "confdefs.h"
3476#include "/usr/lpp/xlC/include/load.h"
3477int main() {
3478loadAndInit("", 0, "")
3479; return 0; }
3480EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003481if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003482 rm -rf conftest*
3483 cat >> confdefs.h <<\EOF
3484#define AIX_GENUINE_CPLUSPLUS 1
3485EOF
3486
3487 echo "$ac_t""yes" 1>&6
3488else
3489 echo "configure: failed program was:" >&5
3490 cat conftest.$ac_ext >&5
3491 rm -rf conftest*
3492 echo "$ac_t""no" 1>&6
3493fi
3494rm -f conftest*;;
3495 *) ;;
3496esac
3497
Guido van Rossum70c7f481998-03-26 18:44:10 +00003498# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3499# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003500# BeOS' sockets are stashed in libnet.
3501case "$ac_sys_system" in
3502IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003503*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003504echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003505echo "configure:3506: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003506ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003507if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003508 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003509else
3510 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003511LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003512cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003513#line 3514 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003514#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003515/* Override any gcc2 internal prototype to avoid an error. */
3516/* We use char because int might match the return type of a gcc2
3517 builtin and then its argument prototype would still apply. */
3518char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003519
Guido van Rossumf78abae1997-01-21 22:02:36 +00003520int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003521t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003522; return 0; }
3523EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003524if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003525 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003526 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003527else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003528 echo "configure: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003530 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003531 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003532fi
3533rm -f conftest*
3534LIBS="$ac_save_LIBS"
3535
3536fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003537if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003538 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003539 LIBS="-lnsl $LIBS"
3540else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003541 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003542fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003543 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003544echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003545echo "configure:3546: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003546ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003547if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003548 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003549else
3550 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003551LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003552cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003553#line 3554 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003554#include "confdefs.h"
3555/* Override any gcc2 internal prototype to avoid an error. */
3556/* We use char because int might match the return type of a gcc2
3557 builtin and then its argument prototype would still apply. */
3558char socket();
3559
3560int main() {
3561socket()
3562; return 0; }
3563EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003564if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003565 rm -rf conftest*
3566 eval "ac_cv_lib_$ac_lib_var=yes"
3567else
3568 echo "configure: failed program was:" >&5
3569 cat conftest.$ac_ext >&5
3570 rm -rf conftest*
3571 eval "ac_cv_lib_$ac_lib_var=no"
3572fi
3573rm -f conftest*
3574LIBS="$ac_save_LIBS"
3575
3576fi
3577if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3578 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003579 LIBS="-lsocket $LIBS"
3580else
3581 echo "$ac_t""no" 1>&6
3582fi
3583 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003584;;
3585esac
3586case "$ac_sys_system" in
3587BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003588echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003589echo "configure:3590: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003590ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003591if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003592 echo $ac_n "(cached) $ac_c" 1>&6
3593else
3594 ac_save_LIBS="$LIBS"
3595LIBS="-lnet $LIBS $LIBS"
3596cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003597#line 3598 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003598#include "confdefs.h"
3599/* Override any gcc2 internal prototype to avoid an error. */
3600/* We use char because int might match the return type of a gcc2
3601 builtin and then its argument prototype would still apply. */
3602char socket();
3603
3604int main() {
3605socket()
3606; return 0; }
3607EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003608if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003609 rm -rf conftest*
3610 eval "ac_cv_lib_$ac_lib_var=yes"
3611else
3612 echo "configure: failed program was:" >&5
3613 cat conftest.$ac_ext >&5
3614 rm -rf conftest*
3615 eval "ac_cv_lib_$ac_lib_var=no"
3616fi
3617rm -f conftest*
3618LIBS="$ac_save_LIBS"
3619
3620fi
3621if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3622 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003623 LIBS="-lnet $LIBS"
3624else
3625 echo "$ac_t""no" 1>&6
3626fi
3627 # BeOS
3628;;
3629esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003630
Guido van Rossuma68acba1996-07-31 17:36:39 +00003631echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003632echo "configure:3633: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003633# Check whether --with-libs or --without-libs was given.
3634if test "${with_libs+set}" = set; then
3635 withval="$with_libs"
3636
3637echo "$ac_t""$withval" 1>&6
3638LIBS="$withval $LIBS"
3639
3640else
3641 echo "$ac_t""no" 1>&6
3642fi
3643
Guido van Rossum7f43da71994-08-01 12:15:30 +00003644
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003645# Determine if signalmodule should be used.
3646
3647
3648echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003649echo "configure:3650: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003650# Check whether --with-signal-module or --without-signal-module was given.
3651if test "${with_signal_module+set}" = set; then
3652 withval="$with_signal_module"
3653 :
3654fi
3655
3656
3657if test -z "$with_signal_module"
3658then with_signal_module="yes"
3659fi
3660echo "$ac_t""$with_signal_module" 1>&6
3661
3662if test "${with_signal_module}" = "yes"; then
3663 USE_SIGNAL_MODULE=""
3664 SIGNAL_OBJS=""
3665else
3666 USE_SIGNAL_MODULE="#"
3667 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3668fi
3669
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003670# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003671
Barry Warsawc0d24d82000-06-29 16:12:00 +00003672USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003673
Guido van Rossumec2f0731997-01-22 20:54:01 +00003674echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003675echo "configure:3676: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003676
3677# Check whether --with-dec-threads or --without-dec-threads was given.
3678if test "${with_dec_threads+set}" = set; then
3679 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003680
3681echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003682LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003683if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003684 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003685fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003686else
3687 echo "$ac_t""no" 1>&6
3688fi
3689
3690
3691echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003692echo "configure:3693: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003693# Check whether --with-threads or --without-threads was given.
3694if test "${with_threads+set}" = set; then
3695 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003696 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003697fi
3698
3699
Barry Warsawc0d24d82000-06-29 16:12:00 +00003700# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003701# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702if test "${with_thread+set}" = set; then
3703 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003704
3705with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003706fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003707
3708
3709if test -z "$with_threads"
3710then with_threads="yes"
3711fi
3712echo "$ac_t""$with_threads" 1>&6
3713
3714if test "$with_threads" = "no"
3715then
3716 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003717elif test "$ac_cv_kpthread" = "yes"
3718then
3719 CC="$CC -Kpthread"
3720 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003721#define WITH_THREAD 1
3722EOF
3723
Martin v. Löwis130fb172001-07-19 11:00:41 +00003724 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003725#define _POSIX_THREADS 1
3726EOF
3727
Martin v. Löwis130fb172001-07-19 11:00:41 +00003728 LIBOBJS="$LIBOBJS thread.o"
3729else
3730 if test ! -z "$with_threads" -a -d "$with_threads"
3731 then LDFLAGS="$LDFLAGS -L$with_threads"
3732 fi
3733 if test ! -z "$withval" -a -d "$withval"
3734 then LDFLAGS="$LDFLAGS -L$withval"
3735 fi
3736 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003737#define _REENTRANT 1
3738EOF
3739
Martin v. Löwis130fb172001-07-19 11:00:41 +00003740 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003741echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003742echo "configure:3743: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003743if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003744 echo $ac_n "(cached) $ac_c" 1>&6
3745else
3746 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003747#line 3748 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003748#include "confdefs.h"
3749#include <mach/cthreads.h>
3750EOF
3751ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003752{ (eval echo configure:3753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003753ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003754if test -z "$ac_err"; then
3755 rm -rf conftest*
3756 eval "ac_cv_header_$ac_safe=yes"
3757else
3758 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003759 echo "configure: failed program was:" >&5
3760 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003761 rm -rf conftest*
3762 eval "ac_cv_header_$ac_safe=no"
3763fi
3764rm -f conftest*
3765fi
3766if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3767 echo "$ac_t""yes" 1>&6
3768 cat >> confdefs.h <<\EOF
3769#define WITH_THREAD 1
3770EOF
3771
Martin v. Löwis130fb172001-07-19 11:00:41 +00003772 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003773#define C_THREADS 1
3774EOF
3775
Martin v. Löwis130fb172001-07-19 11:00:41 +00003776 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003777else
3778 echo "$ac_t""no" 1>&6
3779
Martin v. Löwis130fb172001-07-19 11:00:41 +00003780 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003781echo "configure:3782: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003782 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003783if test "${with_pth+set}" = set; then
3784 withval="$with_pth"
3785
Martin v. Löwis130fb172001-07-19 11:00:41 +00003786 echo "$ac_t""$withval" 1>&6
3787 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003788#define WITH_THREAD 1
3789EOF
3790
Martin v. Löwis130fb172001-07-19 11:00:41 +00003791 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003792#define HAVE_PTH 1
3793EOF
3794
Martin v. Löwis130fb172001-07-19 11:00:41 +00003795 LIBS="-lpth $LIBS"
3796 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003797else
3798
Martin v. Löwis130fb172001-07-19 11:00:41 +00003799 echo "$ac_t""no" 1>&6
3800 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003801echo "configure:3802: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003802ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003803if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003804 echo $ac_n "(cached) $ac_c" 1>&6
3805else
3806 ac_save_LIBS="$LIBS"
3807LIBS="-lpthread $LIBS"
3808cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003809#line 3810 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003810#include "confdefs.h"
3811/* Override any gcc2 internal prototype to avoid an error. */
3812/* We use char because int might match the return type of a gcc2
3813 builtin and then its argument prototype would still apply. */
3814char pthread_create();
3815
3816int main() {
3817pthread_create()
3818; return 0; }
3819EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003820if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003821 rm -rf conftest*
3822 eval "ac_cv_lib_$ac_lib_var=yes"
3823else
3824 echo "configure: failed program was:" >&5
3825 cat conftest.$ac_ext >&5
3826 rm -rf conftest*
3827 eval "ac_cv_lib_$ac_lib_var=no"
3828fi
3829rm -f conftest*
3830LIBS="$ac_save_LIBS"
3831
3832fi
3833if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3834 echo "$ac_t""yes" 1>&6
3835 cat >> confdefs.h <<\EOF
3836#define WITH_THREAD 1
3837EOF
3838
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003839 case $ac_sys_system in
3840 Darwin*) ;;
3841 *) cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003842#define _POSIX_THREADS 1
3843EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003844;;
3845 esac
Martin v. Löwis130fb172001-07-19 11:00:41 +00003846 LIBS="-lpthread $LIBS"
3847 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003848else
3849 echo "$ac_t""no" 1>&6
3850
Martin v. Löwis130fb172001-07-19 11:00:41 +00003851 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003852echo "configure:3853: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003853if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003854 echo $ac_n "(cached) $ac_c" 1>&6
3855else
3856 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003857#line 3858 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003858#include "confdefs.h"
3859/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003860 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003861#include <assert.h>
3862/* Override any gcc2 internal prototype to avoid an error. */
3863/* We use char because int might match the return type of a gcc2
3864 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003865char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003866
3867int main() {
3868
3869/* The GNU C library defines this for functions which it implements
3870 to always fail with ENOSYS. Some functions are actually named
3871 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003872#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003873choke me
3874#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003875pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003876#endif
3877
3878; return 0; }
3879EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003880if { (eval echo configure:3881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003881 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003882 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003883else
3884 echo "configure: failed program was:" >&5
3885 cat conftest.$ac_ext >&5
3886 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003887 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003888fi
3889rm -f conftest*
3890fi
3891
Guido van Rossumea516321998-12-17 18:08:55 +00003892if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003893 echo "$ac_t""yes" 1>&6
3894 cat >> confdefs.h <<\EOF
3895#define WITH_THREAD 1
3896EOF
3897
Martin v. Löwis130fb172001-07-19 11:00:41 +00003898 case $ac_sys_system in
3899 Darwin*) ;;
3900 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003901#define _POSIX_THREADS 1
3902EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003903;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003904 esac
3905 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003906else
3907 echo "$ac_t""no" 1>&6
3908
Martin v. Löwis130fb172001-07-19 11:00:41 +00003909 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003910echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003911echo "configure:3912: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003912if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003913 echo $ac_n "(cached) $ac_c" 1>&6
3914else
3915 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003916#line 3917 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003917#include "confdefs.h"
3918#include <kernel/OS.h>
3919EOF
3920ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003921{ (eval echo configure:3922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003922ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003923if test -z "$ac_err"; then
3924 rm -rf conftest*
3925 eval "ac_cv_header_$ac_safe=yes"
3926else
3927 echo "$ac_err" >&5
3928 echo "configure: failed program was:" >&5
3929 cat conftest.$ac_ext >&5
3930 rm -rf conftest*
3931 eval "ac_cv_header_$ac_safe=no"
3932fi
3933rm -f conftest*
3934fi
3935if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3936 echo "$ac_t""yes" 1>&6
3937 cat >> confdefs.h <<\EOF
3938#define WITH_THREAD 1
3939EOF
3940
Martin v. Löwis130fb172001-07-19 11:00:41 +00003941 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003942#define BEOS_THREADS 1
3943EOF
3944
Martin v. Löwis130fb172001-07-19 11:00:41 +00003945 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003946else
3947 echo "$ac_t""no" 1>&6
3948
Martin v. Löwis130fb172001-07-19 11:00:41 +00003949 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003950echo "configure:3951: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003951ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003952if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003953 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954else
3955 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003956LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003958#line 3959 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003959#include "confdefs.h"
3960/* Override any gcc2 internal prototype to avoid an error. */
3961/* We use char because int might match the return type of a gcc2
3962 builtin and then its argument prototype would still apply. */
3963char pthread_create();
3964
3965int main() {
3966pthread_create()
3967; return 0; }
3968EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003969if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003970 rm -rf conftest*
3971 eval "ac_cv_lib_$ac_lib_var=yes"
3972else
3973 echo "configure: failed program was:" >&5
3974 cat conftest.$ac_ext >&5
3975 rm -rf conftest*
3976 eval "ac_cv_lib_$ac_lib_var=no"
3977fi
3978rm -f conftest*
3979LIBS="$ac_save_LIBS"
3980
3981fi
3982if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3983 echo "$ac_t""yes" 1>&6
3984 cat >> confdefs.h <<\EOF
3985#define WITH_THREAD 1
3986EOF
3987
Martin v. Löwis130fb172001-07-19 11:00:41 +00003988 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003989#define _POSIX_THREADS 1
3990EOF
3991
Martin v. Löwis130fb172001-07-19 11:00:41 +00003992 LIBS="$LIBS -lpthreads"
3993 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003994else
3995 echo "$ac_t""no" 1>&6
3996
Martin v. Löwis130fb172001-07-19 11:00:41 +00003997 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003998echo "configure:3999: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003999ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004000if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00004001 echo $ac_n "(cached) $ac_c" 1>&6
4002else
4003 ac_save_LIBS="$LIBS"
4004LIBS="-lc_r $LIBS"
4005cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004006#line 4007 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00004007#include "confdefs.h"
4008/* Override any gcc2 internal prototype to avoid an error. */
4009/* We use char because int might match the return type of a gcc2
4010 builtin and then its argument prototype would still apply. */
4011char pthread_create();
4012
4013int main() {
4014pthread_create()
4015; return 0; }
4016EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004017if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00004018 rm -rf conftest*
4019 eval "ac_cv_lib_$ac_lib_var=yes"
4020else
4021 echo "configure: failed program was:" >&5
4022 cat conftest.$ac_ext >&5
4023 rm -rf conftest*
4024 eval "ac_cv_lib_$ac_lib_var=no"
4025fi
4026rm -f conftest*
4027LIBS="$ac_save_LIBS"
4028
4029fi
4030if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4031 echo "$ac_t""yes" 1>&6
4032 cat >> confdefs.h <<\EOF
4033#define WITH_THREAD 1
4034EOF
4035
Martin v. Löwis130fb172001-07-19 11:00:41 +00004036 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004037#define _POSIX_THREADS 1
4038EOF
4039
Martin v. Löwis130fb172001-07-19 11:00:41 +00004040 LIBS="$LIBS -lc_r"
4041 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004042else
4043 echo "$ac_t""no" 1>&6
4044
Martin v. Löwis130fb172001-07-19 11:00:41 +00004045 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004046echo "configure:4047: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00004047ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004048if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004049 echo $ac_n "(cached) $ac_c" 1>&6
4050else
4051 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004052LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004053cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004054#line 4055 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004055#include "confdefs.h"
4056/* Override any gcc2 internal prototype to avoid an error. */
4057/* We use char because int might match the return type of a gcc2
4058 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00004059char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004060
4061int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00004062__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004063; return 0; }
4064EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004065if { (eval echo configure:4066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004066 rm -rf conftest*
4067 eval "ac_cv_lib_$ac_lib_var=yes"
4068else
4069 echo "configure: failed program was:" >&5
4070 cat conftest.$ac_ext >&5
4071 rm -rf conftest*
4072 eval "ac_cv_lib_$ac_lib_var=no"
4073fi
4074rm -f conftest*
4075LIBS="$ac_save_LIBS"
4076
4077fi
4078if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4079 echo "$ac_t""yes" 1>&6
4080 cat >> confdefs.h <<\EOF
4081#define WITH_THREAD 1
4082EOF
4083
Martin v. Löwis130fb172001-07-19 11:00:41 +00004084 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004085#define _POSIX_THREADS 1
4086EOF
4087
Martin v. Löwis130fb172001-07-19 11:00:41 +00004088 LIBS="$LIBS -lthread"
4089 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004090else
4091 echo "$ac_t""no" 1>&6
4092
Martin v. Löwis130fb172001-07-19 11:00:41 +00004093 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004094echo "configure:4095: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004095ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4096if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4097 echo $ac_n "(cached) $ac_c" 1>&6
4098else
4099 ac_save_LIBS="$LIBS"
4100LIBS="-lpthread $LIBS"
4101cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004102#line 4103 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004103#include "confdefs.h"
4104/* Override any gcc2 internal prototype to avoid an error. */
4105/* We use char because int might match the return type of a gcc2
4106 builtin and then its argument prototype would still apply. */
4107char __pthread_create_system();
4108
4109int main() {
4110__pthread_create_system()
4111; return 0; }
4112EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004113if { (eval echo configure:4114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004114 rm -rf conftest*
4115 eval "ac_cv_lib_$ac_lib_var=yes"
4116else
4117 echo "configure: failed program was:" >&5
4118 cat conftest.$ac_ext >&5
4119 rm -rf conftest*
4120 eval "ac_cv_lib_$ac_lib_var=no"
4121fi
4122rm -f conftest*
4123LIBS="$ac_save_LIBS"
4124
4125fi
4126if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4127 echo "$ac_t""yes" 1>&6
4128 cat >> confdefs.h <<\EOF
4129#define WITH_THREAD 1
4130EOF
4131
Martin v. Löwis130fb172001-07-19 11:00:41 +00004132 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004133#define _POSIX_THREADS 1
4134EOF
4135
Martin v. Löwis130fb172001-07-19 11:00:41 +00004136 LIBS="$LIBS -lpthread"
4137 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004138else
4139 echo "$ac_t""no" 1>&6
4140
Martin v. Löwis130fb172001-07-19 11:00:41 +00004141 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004142echo "configure:4143: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00004143ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004144if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004145 echo $ac_n "(cached) $ac_c" 1>&6
4146else
4147 ac_save_LIBS="$LIBS"
4148LIBS="-lcma $LIBS"
4149cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004150#line 4151 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004151#include "confdefs.h"
4152/* Override any gcc2 internal prototype to avoid an error. */
4153/* We use char because int might match the return type of a gcc2
4154 builtin and then its argument prototype would still apply. */
4155char pthread_create();
4156
4157int main() {
4158pthread_create()
4159; return 0; }
4160EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004161if { (eval echo configure:4162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004162 rm -rf conftest*
4163 eval "ac_cv_lib_$ac_lib_var=yes"
4164else
4165 echo "configure: failed program was:" >&5
4166 cat conftest.$ac_ext >&5
4167 rm -rf conftest*
4168 eval "ac_cv_lib_$ac_lib_var=no"
4169fi
4170rm -f conftest*
4171LIBS="$ac_save_LIBS"
4172
4173fi
4174if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4175 echo "$ac_t""yes" 1>&6
4176 cat >> confdefs.h <<\EOF
4177#define WITH_THREAD 1
4178EOF
4179
Martin v. Löwis130fb172001-07-19 11:00:41 +00004180 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004181#define _POSIX_THREADS 1
4182EOF
4183
Martin v. Löwis130fb172001-07-19 11:00:41 +00004184 LIBS="$LIBS -lcma"
4185 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004186else
4187 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004188
Martin v. Löwis130fb172001-07-19 11:00:41 +00004189 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004190fi
4191
Martin v. Löwis130fb172001-07-19 11:00:41 +00004192
Guido van Rossum627b2d71993-12-24 10:39:16 +00004193fi
4194
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004195fi
4196
Guido van Rossum0be3e491997-05-22 20:33:33 +00004197fi
4198
Guido van Rossum49545951997-12-02 19:28:29 +00004199fi
4200
Guido van Rossumb93a8621998-05-07 13:27:32 +00004201fi
4202
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004203fi
4204
Guido van Rossumad678af1998-10-02 14:42:15 +00004205fi
4206
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004207fi
4208
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004209fi
4210
Guido van Rossum0be3e491997-05-22 20:33:33 +00004211
Martin v. Löwis130fb172001-07-19 11:00:41 +00004212 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004213echo "configure:4214: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004214ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004215if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004216 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217else
4218 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004219LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004221#line 4222 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004222#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004223/* Override any gcc2 internal prototype to avoid an error. */
4224/* We use char because int might match the return type of a gcc2
4225 builtin and then its argument prototype would still apply. */
4226char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004227
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229usconfig()
4230; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004231EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004232if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004233 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004234 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004235else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 echo "configure: failed program was:" >&5
4237 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004239 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240fi
4241rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242LIBS="$ac_save_LIBS"
4243
4244fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004245if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004246 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247 cat >> confdefs.h <<\EOF
4248#define WITH_THREAD 1
4249EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250
Martin v. Löwis130fb172001-07-19 11:00:41 +00004251 LIBS="$LIBS -lmpc"
4252 LIBOBJS="$LIBOBJS thread.o"
4253 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004254else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004255 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004256fi
4257
Martin v. Löwis130fb172001-07-19 11:00:41 +00004258 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004259echo "configure:4260: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004260ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004261if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004262 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263else
4264 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004265LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004267#line 4268 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004269/* Override any gcc2 internal prototype to avoid an error. */
4270/* We use char because int might match the return type of a gcc2
4271 builtin and then its argument prototype would still apply. */
4272char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004273
Guido van Rossumf78abae1997-01-21 22:02:36 +00004274int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275thr_create()
4276; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004277EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004278if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004279 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004280 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004282 echo "configure: failed program was:" >&5
4283 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004285 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004286fi
4287rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288LIBS="$ac_save_LIBS"
4289
4290fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004291if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004292 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293 cat >> confdefs.h <<\EOF
4294#define WITH_THREAD 1
4295EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004296
Martin v. Löwis130fb172001-07-19 11:00:41 +00004297 LIBS="$LIBS -lthread"
4298 LIBOBJS="$LIBOBJS thread.o"
4299 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004300else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004301 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004302fi
4303
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004304
Martin v. Löwis130fb172001-07-19 11:00:41 +00004305 if test "$USE_THREAD_MODULE" != "#"
4306 then
4307 # If the above checks didn't disable threads, (at least) OSF1
4308 # needs this '-threads' argument during linking.
4309 case $ac_sys_system in
4310 OSF1) LDLAST=-threads;;
4311 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004312 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004313fi
4314
Barry Warsawef82cd72000-06-30 16:21:01 +00004315# Check for GC support
4316
4317USE_GC_MODULE=""
4318echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004319echo "configure:4320: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004320# Check whether --with-cycle-gc or --without-cycle-gc was given.
4321if test "${with_cycle_gc+set}" = set; then
4322 withval="$with_cycle_gc"
4323 :
4324fi
4325
4326
4327if test -z "$with_cycle_gc"
4328then with_cycle_gc="yes"
4329fi
4330if test "$with_cycle_gc" = "no"
4331then
4332 USE_GC_MODULE="#"
4333else
4334 cat >> confdefs.h <<\EOF
4335#define WITH_CYCLE_GC 1
4336EOF
4337
4338fi
4339echo "$ac_t""$with_cycle_gc" 1>&6
4340
Neil Schemenauera35c6882001-02-27 04:45:05 +00004341# Check for Python-specific malloc support
4342echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004343echo "configure:4344: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004344# Check whether --with-pymalloc or --without-pymalloc was given.
4345if test "${with_pymalloc+set}" = set; then
4346 withval="$with_pymalloc"
4347
4348if test "$withval" != no
4349then cat >> confdefs.h <<\EOF
4350#define WITH_PYMALLOC 1
4351EOF
4352 echo "$ac_t""yes" 1>&6
4353else echo "$ac_t""no" 1>&6
4354fi
4355else
4356 echo "$ac_t""no" 1>&6
4357fi
4358
4359
Barry Warsawef82cd72000-06-30 16:21:01 +00004360# Check for --with-wctype-functions
4361echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004362echo "configure:4363: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004363# Check whether --with-wctype-functions or --without-wctype-functions was given.
4364if test "${with_wctype_functions+set}" = set; then
4365 withval="$with_wctype_functions"
4366
4367if test "$withval" != no
4368then cat >> confdefs.h <<\EOF
4369#define WANT_WCTYPE_FUNCTIONS 1
4370EOF
4371 echo "$ac_t""yes" 1>&6
4372else echo "$ac_t""no" 1>&6
4373fi
4374else
4375 echo "$ac_t""no" 1>&6
4376fi
4377
4378
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004379# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004380
4381DLINCLDIR=/
4382
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004383echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004384echo "configure:4385: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004385# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004386if test "${with_sgi_dl+set}" = set; then
4387 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004388
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004389echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390cat >> confdefs.h <<\EOF
4391#define WITH_SGI_DL 1
4392EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004393
Guido van Rossume97ee181999-12-20 21:27:22 +00004394DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004395dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004396if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004397then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004399fi
4400DLINCLDIR=${dldir}
4401LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004402else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004403 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004404fi
4405
4406
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004407echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004408echo "configure:4409: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004410if test "${with_dl_dld+set}" = set; then
4411 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004412
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004413echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004414cat >> confdefs.h <<\EOF
4415#define WITH_DL_DLD 1
4416EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004417
Guido van Rossume97ee181999-12-20 21:27:22 +00004418DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004419dldir=`echo "$withval" | sed 's/,.*//'`
4420dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004421if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004422then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004424fi
4425DLINCLDIR=${dldir}
4426LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004427else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004428 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004429fi
4430
4431
Guido van Rossume97ee181999-12-20 21:27:22 +00004432# the dlopen() function means we might want to use dynload_shlib.o. some
4433# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004434for ac_func in dlopen
4435do
4436echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004437echo "configure:4438: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004438if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004439 echo $ac_n "(cached) $ac_c" 1>&6
4440else
4441 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004442#line 4443 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004443#include "confdefs.h"
4444/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004445 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004446#include <assert.h>
4447/* Override any gcc2 internal prototype to avoid an error. */
4448/* We use char because int might match the return type of a gcc2
4449 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004450char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004451
4452int main() {
4453
4454/* The GNU C library defines this for functions which it implements
4455 to always fail with ENOSYS. Some functions are actually named
4456 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004457#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004458choke me
4459#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004460$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004461#endif
4462
4463; return 0; }
4464EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004465if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004466 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004467 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004468else
4469 echo "configure: failed program was:" >&5
4470 cat conftest.$ac_ext >&5
4471 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004472 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004473fi
4474rm -f conftest*
4475fi
4476
Thomas Wouters3a584202000-08-05 23:28:51 +00004477if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004478 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004479 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4480 cat >> confdefs.h <<EOF
4481#define $ac_tr_func 1
4482EOF
4483
Guido van Rossume97ee181999-12-20 21:27:22 +00004484else
4485 echo "$ac_t""no" 1>&6
4486fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004487done
Guido van Rossume97ee181999-12-20 21:27:22 +00004488
4489
4490# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4491# loading of modules.
4492
4493echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004494echo "configure:4495: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004495if test -z "$DYNLOADFILE"
4496then
4497 case $ac_sys_system/$ac_sys_release in
4498 AIX*) DYNLOADFILE="dynload_aix.o";;
4499 BeOS*) DYNLOADFILE="dynload_beos.o";;
4500 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004501 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004502 *)
4503 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4504 # out any dynamic loading
4505 if test "$ac_cv_func_dlopen" = yes
4506 then DYNLOADFILE="dynload_shlib.o"
4507 else DYNLOADFILE="dynload_stub.o"
4508 fi
4509 ;;
4510 esac
4511fi
4512echo "$ac_t""$DYNLOADFILE" 1>&6
4513if test "$DYNLOADFILE" != "dynload_stub.o"
4514then
4515 cat >> confdefs.h <<\EOF
4516#define HAVE_DYNAMIC_LOADING 1
4517EOF
4518
4519fi
4520
Neil Schemenauer4e425612001-06-19 15:44:15 +00004521# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4522
4523
4524echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004525echo "configure:4526: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004526if test -z "$MACHDEP_OBJS"
4527then
4528 case $ac_sys_system/$ac_sys_release in
4529 Darwin/*)
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004530 MACHDEP_OBJS="Python/mactoolboxglue.o"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004531 cat >> confdefs.h <<\EOF
4532#define USE_TOOLBOX_OBJECT_GLUE 1
4533EOF
4534
4535 ;;
4536 *) MACHDEP_OBJS="";;
4537 esac
4538fi
4539echo "$ac_t""$DYNLOADFILE" 1>&6
4540
Guido van Rossum627b2d71993-12-24 10:39:16 +00004541# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004542for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004543 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004544 getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004545 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004546 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004547 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004548 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004549 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004550 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004551 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004552 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004553do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004554echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004555echo "configure:4556: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004556if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004557 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004558else
4559 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004560#line 4561 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004561#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004562/* System header to define __stub macros and hopefully few prototypes,
4563 which can conflict with char $ac_func(); below. */
4564#include <assert.h>
4565/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004566/* We use char because int might match the return type of a gcc2
4567 builtin and then its argument prototype would still apply. */
4568char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004569
Guido van Rossumf78abae1997-01-21 22:02:36 +00004570int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571
Guido van Rossum627b2d71993-12-24 10:39:16 +00004572/* The GNU C library defines this for functions which it implements
4573 to always fail with ENOSYS. Some functions are actually named
4574 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004575#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004576choke me
4577#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004578$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004579#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004580
Guido van Rossum7f43da71994-08-01 12:15:30 +00004581; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004582EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004583if { (eval echo configure:4584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004584 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004585 eval "ac_cv_func_$ac_func=yes"
4586else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004587 echo "configure: failed program was:" >&5
4588 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004589 rm -rf conftest*
4590 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004591fi
4592rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004593fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004594
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004595if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004596 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004597 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004598 cat >> confdefs.h <<EOF
4599#define $ac_tr_func 1
4600EOF
4601
4602else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004603 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004605done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004606
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004607
Fred Drake8cef4cf2000-06-28 16:40:38 +00004608# check for openpty and forkpty
4609
4610for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004611do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004612echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004613echo "configure:4614: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004614if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004615 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616else
4617 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004618#line 4619 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004619#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004620/* System header to define __stub macros and hopefully few prototypes,
4621 which can conflict with char $ac_func(); below. */
4622#include <assert.h>
4623/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004624/* We use char because int might match the return type of a gcc2
4625 builtin and then its argument prototype would still apply. */
4626char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004627
Guido van Rossumf78abae1997-01-21 22:02:36 +00004628int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629
Guido van Rossum627b2d71993-12-24 10:39:16 +00004630/* The GNU C library defines this for functions which it implements
4631 to always fail with ENOSYS. Some functions are actually named
4632 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004634choke me
4635#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004636$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004637#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004638
Guido van Rossum7f43da71994-08-01 12:15:30 +00004639; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004640EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004641if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004642 rm -rf conftest*
4643 eval "ac_cv_func_$ac_func=yes"
4644else
4645 echo "configure: failed program was:" >&5
4646 cat conftest.$ac_ext >&5
4647 rm -rf conftest*
4648 eval "ac_cv_func_$ac_func=no"
4649fi
4650rm -f conftest*
4651fi
4652
4653if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4654 echo "$ac_t""yes" 1>&6
4655 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4656 cat >> confdefs.h <<EOF
4657#define $ac_tr_func 1
4658EOF
4659
4660else
4661 echo "$ac_t""no" 1>&6
4662echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004663echo "configure:4664: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004664ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004665if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004666 echo $ac_n "(cached) $ac_c" 1>&6
4667else
4668 ac_save_LIBS="$LIBS"
4669LIBS="-lutil $LIBS"
4670cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004671#line 4672 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004672#include "confdefs.h"
4673/* Override any gcc2 internal prototype to avoid an error. */
4674/* We use char because int might match the return type of a gcc2
4675 builtin and then its argument prototype would still apply. */
4676char openpty();
4677
4678int main() {
4679openpty()
4680; return 0; }
4681EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004682if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004683 rm -rf conftest*
4684 eval "ac_cv_lib_$ac_lib_var=yes"
4685else
4686 echo "configure: failed program was:" >&5
4687 cat conftest.$ac_ext >&5
4688 rm -rf conftest*
4689 eval "ac_cv_lib_$ac_lib_var=no"
4690fi
4691rm -f conftest*
4692LIBS="$ac_save_LIBS"
4693
4694fi
4695if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4696 echo "$ac_t""yes" 1>&6
4697 cat >> confdefs.h <<\EOF
4698#define HAVE_OPENPTY 1
4699EOF
4700 LIBS="$LIBS -lutil"
4701else
4702 echo "$ac_t""no" 1>&6
4703fi
4704
4705fi
4706done
4707
4708for ac_func in forkpty
4709do
4710echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004711echo "configure:4712: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004712if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004713 echo $ac_n "(cached) $ac_c" 1>&6
4714else
4715 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004716#line 4717 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004717#include "confdefs.h"
4718/* System header to define __stub macros and hopefully few prototypes,
4719 which can conflict with char $ac_func(); below. */
4720#include <assert.h>
4721/* Override any gcc2 internal prototype to avoid an error. */
4722/* We use char because int might match the return type of a gcc2
4723 builtin and then its argument prototype would still apply. */
4724char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004725
4726int main() {
4727
4728/* The GNU C library defines this for functions which it implements
4729 to always fail with ENOSYS. Some functions are actually named
4730 something starting with __ and the normal name is an alias. */
4731#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4732choke me
4733#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004734$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004735#endif
4736
4737; return 0; }
4738EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004739if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004740 rm -rf conftest*
4741 eval "ac_cv_func_$ac_func=yes"
4742else
4743 echo "configure: failed program was:" >&5
4744 cat conftest.$ac_ext >&5
4745 rm -rf conftest*
4746 eval "ac_cv_func_$ac_func=no"
4747fi
4748rm -f conftest*
4749fi
4750
4751if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4752 echo "$ac_t""yes" 1>&6
4753 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4754 cat >> confdefs.h <<EOF
4755#define $ac_tr_func 1
4756EOF
4757
4758else
4759 echo "$ac_t""no" 1>&6
4760echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004761echo "configure:4762: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004762ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004763if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004764 echo $ac_n "(cached) $ac_c" 1>&6
4765else
4766 ac_save_LIBS="$LIBS"
4767LIBS="-lutil $LIBS"
4768cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004769#line 4770 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004770#include "confdefs.h"
4771/* Override any gcc2 internal prototype to avoid an error. */
4772/* We use char because int might match the return type of a gcc2
4773 builtin and then its argument prototype would still apply. */
4774char forkpty();
4775
4776int main() {
4777forkpty()
4778; return 0; }
4779EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004780if { (eval echo configure:4781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004781 rm -rf conftest*
4782 eval "ac_cv_lib_$ac_lib_var=yes"
4783else
4784 echo "configure: failed program was:" >&5
4785 cat conftest.$ac_ext >&5
4786 rm -rf conftest*
4787 eval "ac_cv_lib_$ac_lib_var=no"
4788fi
4789rm -f conftest*
4790LIBS="$ac_save_LIBS"
4791
4792fi
4793if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4794 echo "$ac_t""yes" 1>&6
4795 cat >> confdefs.h <<\EOF
4796#define HAVE_FORKPTY 1
4797EOF
4798 LIBS="$LIBS -lutil"
4799else
4800 echo "$ac_t""no" 1>&6
4801fi
4802
4803fi
4804done
4805
4806
4807# check for long file support functions
4808for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4809do
4810echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004811echo "configure:4812: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004812if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004813 echo $ac_n "(cached) $ac_c" 1>&6
4814else
4815 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004816#line 4817 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004817#include "confdefs.h"
4818/* System header to define __stub macros and hopefully few prototypes,
4819 which can conflict with char $ac_func(); below. */
4820#include <assert.h>
4821/* Override any gcc2 internal prototype to avoid an error. */
4822/* We use char because int might match the return type of a gcc2
4823 builtin and then its argument prototype would still apply. */
4824char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004825
4826int main() {
4827
4828/* The GNU C library defines this for functions which it implements
4829 to always fail with ENOSYS. Some functions are actually named
4830 something starting with __ and the normal name is an alias. */
4831#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4832choke me
4833#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004834$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004835#endif
4836
4837; return 0; }
4838EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004839if { (eval echo configure:4840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004840 rm -rf conftest*
4841 eval "ac_cv_func_$ac_func=yes"
4842else
4843 echo "configure: failed program was:" >&5
4844 cat conftest.$ac_ext >&5
4845 rm -rf conftest*
4846 eval "ac_cv_func_$ac_func=no"
4847fi
4848rm -f conftest*
4849fi
4850
4851if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4852 echo "$ac_t""yes" 1>&6
4853 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4854 cat >> confdefs.h <<EOF
4855#define $ac_tr_func 1
4856EOF
4857
4858else
4859 echo "$ac_t""no" 1>&6
4860fi
4861done
4862
4863
4864for ac_func in dup2 getcwd strdup strerror memmove
4865do
4866echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004867echo "configure:4868: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004868if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004869 echo $ac_n "(cached) $ac_c" 1>&6
4870else
4871 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004872#line 4873 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004873#include "confdefs.h"
4874/* System header to define __stub macros and hopefully few prototypes,
4875 which can conflict with char $ac_func(); below. */
4876#include <assert.h>
4877/* Override any gcc2 internal prototype to avoid an error. */
4878/* We use char because int might match the return type of a gcc2
4879 builtin and then its argument prototype would still apply. */
4880char $ac_func();
4881
4882int main() {
4883
4884/* The GNU C library defines this for functions which it implements
4885 to always fail with ENOSYS. Some functions are actually named
4886 something starting with __ and the normal name is an alias. */
4887#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4888choke me
4889#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004890$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004891#endif
4892
4893; return 0; }
4894EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004895if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004896 rm -rf conftest*
4897 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004898else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004899 echo "configure: failed program was:" >&5
4900 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004901 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004903fi
4904rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004905fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004906
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004907if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004908 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004909 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4910 cat >> confdefs.h <<EOF
4911#define $ac_tr_func 1
4912EOF
4913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004914else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004915 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004916LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004917fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004918done
4919
Guido van Rossumf78abae1997-01-21 22:02:36 +00004920
Thomas Wouters3a584202000-08-05 23:28:51 +00004921for ac_func in getpgrp
4922do
4923echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004924echo "configure:4925: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004925if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004926 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004927else
4928 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004929#line 4930 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004930#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004931/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004932 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004933#include <assert.h>
4934/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004935/* We use char because int might match the return type of a gcc2
4936 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004937char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004938
Guido van Rossumf78abae1997-01-21 22:02:36 +00004939int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004940
Guido van Rossum627b2d71993-12-24 10:39:16 +00004941/* The GNU C library defines this for functions which it implements
4942 to always fail with ENOSYS. Some functions are actually named
4943 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004944#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004945choke me
4946#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004947$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004948#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004949
4950; return 0; }
4951EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004952if { (eval echo configure:4953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004954 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004955else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004956 echo "configure: failed program was:" >&5
4957 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004958 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004959 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960fi
4961rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004962fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004963
Thomas Wouters3a584202000-08-05 23:28:51 +00004964if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004965 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004966 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4967 cat >> confdefs.h <<EOF
4968#define $ac_tr_func 1
4969EOF
4970 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004971#line 4972 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004972#include "confdefs.h"
4973#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004974int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004976; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004977EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004978if { (eval echo configure:4979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004979 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004980 cat >> confdefs.h <<\EOF
4981#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004982EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004983
Guido van Rossumf78abae1997-01-21 22:02:36 +00004984else
4985 echo "configure: failed program was:" >&5
4986 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004987fi
4988rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004989else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004990 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004991fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004992done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004993
Thomas Wouters3a584202000-08-05 23:28:51 +00004994for ac_func in setpgrp
4995do
4996echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004997echo "configure:4998: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004998if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004999 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005000else
5001 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005002#line 5003 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005003#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005004/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005005 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005006#include <assert.h>
5007/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005008/* We use char because int might match the return type of a gcc2
5009 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005010char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005011
Guido van Rossumf78abae1997-01-21 22:02:36 +00005012int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005013
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005014/* The GNU C library defines this for functions which it implements
5015 to always fail with ENOSYS. Some functions are actually named
5016 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005017#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005018choke me
5019#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005020$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005021#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005022
5023; return 0; }
5024EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005025if { (eval echo configure:5026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005026 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005027 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005028else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005029 echo "configure: failed program was:" >&5
5030 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005031 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005032 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005033fi
5034rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005035fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005036
Thomas Wouters3a584202000-08-05 23:28:51 +00005037if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005038 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005039 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5040 cat >> confdefs.h <<EOF
5041#define $ac_tr_func 1
5042EOF
5043 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005044#line 5045 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005045#include "confdefs.h"
5046#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005047int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005048setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005049; return 0; }
5050EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005051if { (eval echo configure:5052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005052 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005053 cat >> confdefs.h <<\EOF
5054#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005055EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005056
Guido van Rossumf78abae1997-01-21 22:02:36 +00005057else
5058 echo "configure: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005060fi
5061rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005062else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005063 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005064fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005065done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005066
Thomas Wouters3a584202000-08-05 23:28:51 +00005067for ac_func in gettimeofday
5068do
5069echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005070echo "configure:5071: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005071if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005072 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005073else
5074 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005075#line 5076 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005076#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005077/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005078 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005079#include <assert.h>
5080/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005081/* We use char because int might match the return type of a gcc2
5082 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005083char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005084
Guido van Rossumf78abae1997-01-21 22:02:36 +00005085int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005086
5087/* The GNU C library defines this for functions which it implements
5088 to always fail with ENOSYS. Some functions are actually named
5089 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005090#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091choke me
5092#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005093$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005094#endif
5095
5096; return 0; }
5097EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005098if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005099 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005100 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005102 echo "configure: failed program was:" >&5
5103 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005104 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005105 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005106fi
5107rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005108fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005109
Thomas Wouters3a584202000-08-05 23:28:51 +00005110if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005111 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005112 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5113 cat >> confdefs.h <<EOF
5114#define $ac_tr_func 1
5115EOF
5116 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005117#line 5118 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005118#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005119#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005120int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005121gettimeofday((struct timeval*)0,(struct timezone*)0);
5122; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005123EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005124if { (eval echo configure:5125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005125 :
5126else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005127 echo "configure: failed program was:" >&5
5128 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005129 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005130 cat >> confdefs.h <<\EOF
5131#define GETTIMEOFDAY_NO_TZ 1
5132EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005133
5134fi
5135rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005136else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005137 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005138fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005139done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005140
5141
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005142for ac_func in getaddrinfo
5143do
5144echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005145echo "configure:5146: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005146if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5147 echo $ac_n "(cached) $ac_c" 1>&6
5148else
5149 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005150#line 5151 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005151#include "confdefs.h"
5152/* System header to define __stub macros and hopefully few prototypes,
5153 which can conflict with char $ac_func(); below. */
5154#include <assert.h>
5155/* Override any gcc2 internal prototype to avoid an error. */
5156/* We use char because int might match the return type of a gcc2
5157 builtin and then its argument prototype would still apply. */
5158char $ac_func();
5159
5160int main() {
5161
5162/* The GNU C library defines this for functions which it implements
5163 to always fail with ENOSYS. Some functions are actually named
5164 something starting with __ and the normal name is an alias. */
5165#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5166choke me
5167#else
5168$ac_func();
5169#endif
5170
5171; return 0; }
5172EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005173if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005174 rm -rf conftest*
5175 eval "ac_cv_func_$ac_func=yes"
5176else
5177 echo "configure: failed program was:" >&5
5178 cat conftest.$ac_ext >&5
5179 rm -rf conftest*
5180 eval "ac_cv_func_$ac_func=no"
5181fi
5182rm -f conftest*
5183fi
5184
5185if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5186 echo "$ac_t""yes" 1>&6
5187 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5188 cat >> confdefs.h <<EOF
5189#define $ac_tr_func 1
5190EOF
5191 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005192echo "configure:5193: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005193if test "$cross_compiling" = yes; then
5194 echo "$ac_t""buggy" 1>&6
5195buggygetaddrinfo=yes
5196else
5197 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005198#line 5199 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005199#include "confdefs.h"
5200
5201#include <sys/types.h>
5202#include <netdb.h>
5203#include <string.h>
5204#include <sys/socket.h>
5205#include <netinet/in.h>
5206
5207main()
5208{
5209 int passive, gaierr, inet4 = 0, inet6 = 0;
5210 struct addrinfo hints, *ai, *aitop;
5211 char straddr[INET6_ADDRSTRLEN], strport[16];
5212
5213 for (passive = 0; passive <= 1; passive++) {
5214 memset(&hints, 0, sizeof(hints));
5215 hints.ai_family = AF_UNSPEC;
5216 hints.ai_flags = passive ? AI_PASSIVE : 0;
5217 hints.ai_socktype = SOCK_STREAM;
5218 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5219 (void)gai_strerror(gaierr);
5220 goto bad;
5221 }
5222 for (ai = aitop; ai; ai = ai->ai_next) {
5223 if (ai->ai_addr == NULL ||
5224 ai->ai_addrlen == 0 ||
5225 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5226 straddr, sizeof(straddr), strport, sizeof(strport),
5227 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5228 goto bad;
5229 }
5230 switch (ai->ai_family) {
5231 case AF_INET:
5232 if (strcmp(strport, "54321") != 0) {
5233 goto bad;
5234 }
5235 if (passive) {
5236 if (strcmp(straddr, "0.0.0.0") != 0) {
5237 goto bad;
5238 }
5239 } else {
5240 if (strcmp(straddr, "127.0.0.1") != 0) {
5241 goto bad;
5242 }
5243 }
5244 inet4++;
5245 break;
5246 case AF_INET6:
5247 if (strcmp(strport, "54321") != 0) {
5248 goto bad;
5249 }
5250 if (passive) {
5251 if (strcmp(straddr, "::") != 0) {
5252 goto bad;
5253 }
5254 } else {
5255 if (strcmp(straddr, "::1") != 0) {
5256 goto bad;
5257 }
5258 }
5259 inet6++;
5260 break;
5261 case AF_UNSPEC:
5262 goto bad;
5263 break;
5264 default:
5265 /* another family support? */
5266 break;
5267 }
5268 }
5269 }
5270
5271 if (!(inet4 == 0 || inet4 == 2))
5272 goto bad;
5273 if (!(inet6 == 0 || inet6 == 2))
5274 goto bad;
5275
5276 if (aitop)
5277 freeaddrinfo(aitop);
5278 exit(0);
5279
5280 bad:
5281 if (aitop)
5282 freeaddrinfo(aitop);
5283 exit(1);
5284}
5285
5286EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005287if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005288then
5289 echo "$ac_t""good" 1>&6
5290buggygetaddrinfo=no
5291else
5292 echo "configure: failed program was:" >&5
5293 cat conftest.$ac_ext >&5
5294 rm -fr conftest*
5295 echo "$ac_t""buggy" 1>&6
5296buggygetaddrinfo=yes
5297fi
5298rm -fr conftest*
5299fi
5300
5301else
5302 echo "$ac_t""no" 1>&6
5303buggygetaddrinfo=yes
5304fi
5305done
5306
5307
5308if test "$buggygetaddrinfo" = "yes"; then
5309 if test "$ipv6" = "yes"; then
5310 echo 'Fatal: You must get working getaddrinfo() function.'
5311 echo ' or you can specify "--disable-ipv6"'.
5312 exit 1
5313 fi
5314fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005315for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005316do
5317echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005318echo "configure:5319: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005319if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5320 echo $ac_n "(cached) $ac_c" 1>&6
5321else
5322 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005323#line 5324 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005324#include "confdefs.h"
5325/* System header to define __stub macros and hopefully few prototypes,
5326 which can conflict with char $ac_func(); below. */
5327#include <assert.h>
5328/* Override any gcc2 internal prototype to avoid an error. */
5329/* We use char because int might match the return type of a gcc2
5330 builtin and then its argument prototype would still apply. */
5331char $ac_func();
5332
5333int main() {
5334
5335/* The GNU C library defines this for functions which it implements
5336 to always fail with ENOSYS. Some functions are actually named
5337 something starting with __ and the normal name is an alias. */
5338#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5339choke me
5340#else
5341$ac_func();
5342#endif
5343
5344; return 0; }
5345EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005346if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005347 rm -rf conftest*
5348 eval "ac_cv_func_$ac_func=yes"
5349else
5350 echo "configure: failed program was:" >&5
5351 cat conftest.$ac_ext >&5
5352 rm -rf conftest*
5353 eval "ac_cv_func_$ac_func=no"
5354fi
5355rm -f conftest*
5356fi
5357
5358if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5359 echo "$ac_t""yes" 1>&6
5360 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5361 cat >> confdefs.h <<EOF
5362#define $ac_tr_func 1
5363EOF
5364
5365else
5366 echo "$ac_t""no" 1>&6
5367fi
5368done
5369
5370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005371# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005372echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005373echo "configure:5374: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005374if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005375 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005376else
5377 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005378#line 5379 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005379#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005380#include <sys/types.h>
5381#include <sys/time.h>
5382#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005383int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005384struct tm *tp;
5385; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005386EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005387if { (eval echo configure:5388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005388 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005390else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005391 echo "configure: failed program was:" >&5
5392 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005393 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005394 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005395fi
5396rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005398
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005399echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005400if test $ac_cv_header_time = yes; then
5401 cat >> confdefs.h <<\EOF
5402#define TIME_WITH_SYS_TIME 1
5403EOF
5404
5405fi
5406
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005407echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005408echo "configure:5409: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005409if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005410 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005411else
5412 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005413#line 5414 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005414#include "confdefs.h"
5415#include <sys/types.h>
5416#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005417int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005418struct tm *tp; tp->tm_sec;
5419; return 0; }
5420EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005421if { (eval echo configure:5422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005422 rm -rf conftest*
5423 ac_cv_struct_tm=time.h
5424else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005425 echo "configure: failed program was:" >&5
5426 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005427 rm -rf conftest*
5428 ac_cv_struct_tm=sys/time.h
5429fi
5430rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005431fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005432
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005433echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005434if test $ac_cv_struct_tm = sys/time.h; then
5435 cat >> confdefs.h <<\EOF
5436#define TM_IN_SYS_TIME 1
5437EOF
5438
5439fi
5440
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005441echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005442echo "configure:5443: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005443if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005444 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005445else
5446 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005447#line 5448 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005448#include "confdefs.h"
5449#include <sys/types.h>
5450#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005451int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005452struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005453; return 0; }
5454EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005455if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005456 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005457 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005458else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005459 echo "configure: failed program was:" >&5
5460 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005461 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005462 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005463fi
5464rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005465fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005466
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005467echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5468if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005469 cat >> confdefs.h <<\EOF
5470#define HAVE_TM_ZONE 1
5471EOF
5472
5473else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005474 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005475echo "configure:5476: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005476if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005477 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005478else
5479 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005480#line 5481 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005481#include "confdefs.h"
5482#include <time.h>
5483#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005485#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005486int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005487atoi(*tzname);
5488; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005489EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005490if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005491 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005492 ac_cv_var_tzname=yes
5493else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005494 echo "configure: failed program was:" >&5
5495 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005496 rm -rf conftest*
5497 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005498fi
5499rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005500fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005501
5502echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005503 if test $ac_cv_var_tzname = yes; then
5504 cat >> confdefs.h <<\EOF
5505#define HAVE_TZNAME 1
5506EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005508 fi
5509fi
5510
5511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005512echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005513echo "configure:5514: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005514if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005515 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005516else
5517 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005518#line 5519 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005519#include "confdefs.h"
5520#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005521int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005522return altzone;
5523; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005524EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005525if { (eval echo configure:5526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005526 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005527 ac_cv_header_time_altzone=yes
5528else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005529 echo "configure: failed program was:" >&5
5530 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005531 rm -rf conftest*
5532 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005533fi
5534rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535fi
5536
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005537echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005538if test $ac_cv_header_time_altzone = yes; then
5539 cat >> confdefs.h <<\EOF
5540#define HAVE_ALTZONE 1
5541EOF
5542
5543fi
5544
Guido van Rossumda88dad1995-01-26 00:46:29 +00005545was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005546echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005547echo "configure:5548: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005549#line 5550 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005550#include "confdefs.h"
5551
5552#include <sys/types.h>
5553#include <sys/select.h>
5554#include <sys/time.h>
5555
Guido van Rossumf78abae1997-01-21 22:02:36 +00005556int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005557;
5558; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005559EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005560if { (eval echo configure:5561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005561 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005562 cat >> confdefs.h <<\EOF
5563#define SYS_SELECT_WITH_SYS_TIME 1
5564EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005565 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005566else
5567 echo "configure: failed program was:" >&5
5568 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005569fi
5570rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005571echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005572
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005573echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005574echo "configure:5575: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005575if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5576 echo $ac_n "(cached) $ac_c" 1>&6
5577else
5578 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005579#line 5580 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005580#include "confdefs.h"
5581
5582# include <netdb.h>
5583int main() {
5584struct addrinfo a
5585; return 0; }
5586EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005587if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005588 rm -rf conftest*
5589 ac_cv_struct_addrinfo=yes
5590else
5591 echo "configure: failed program was:" >&5
5592 cat conftest.$ac_ext >&5
5593 rm -rf conftest*
5594 ac_cv_struct_addrinfo=no
5595fi
5596rm -f conftest*
5597fi
5598
5599echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5600if test $ac_cv_struct_addrinfo = yes; then
5601 cat >> confdefs.h <<\EOF
5602#define HAVE_ADDRINFO 1
5603EOF
5604
5605fi
5606
5607echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005608echo "configure:5609: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005609if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5610 echo $ac_n "(cached) $ac_c" 1>&6
5611else
5612 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005613#line 5614 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005614#include "confdefs.h"
5615
5616# include <sys/types.h>
5617# include <sys/socket.h>
5618int main() {
5619struct sockaddr_storage s
5620; return 0; }
5621EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005622if { (eval echo configure:5623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005623 rm -rf conftest*
5624 ac_cv_struct_sockaddr_storage=yes
5625else
5626 echo "configure: failed program was:" >&5
5627 cat conftest.$ac_ext >&5
5628 rm -rf conftest*
5629 ac_cv_struct_sockaddr_storage=no
5630fi
5631rm -f conftest*
5632fi
5633
5634echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5635if test $ac_cv_struct_sockaddr_storage = yes; then
5636 cat >> confdefs.h <<\EOF
5637#define HAVE_SOCKADDR_STORAGE 1
5638EOF
5639
5640fi
5641
Guido van Rossum627b2d71993-12-24 10:39:16 +00005642# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005643
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005644echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005645echo "configure:5646: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005646if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005647 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648else
5649 if test "$GCC" = yes; then
5650 # GCC predefines this symbol on systems where it applies.
5651cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005652#line 5653 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005653#include "confdefs.h"
5654#ifdef __CHAR_UNSIGNED__
5655 yes
5656#endif
5657
5658EOF
5659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5660 egrep "yes" >/dev/null 2>&1; then
5661 rm -rf conftest*
5662 ac_cv_c_char_unsigned=yes
5663else
5664 rm -rf conftest*
5665 ac_cv_c_char_unsigned=no
5666fi
5667rm -f conftest*
5668
5669else
5670if test "$cross_compiling" = yes; then
5671 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5672else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005673 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005674#line 5675 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005675#include "confdefs.h"
5676/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005677#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005678#define volatile
5679#endif
5680main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005681 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005682}
5683EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005684if { (eval echo configure:5685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00005685then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005686 ac_cv_c_char_unsigned=yes
5687else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005688 echo "configure: failed program was:" >&5
5689 cat conftest.$ac_ext >&5
5690 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005691 ac_cv_c_char_unsigned=no
5692fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005693rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005694fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005695
5696fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005697fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005698
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005699echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005700if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5701 cat >> confdefs.h <<\EOF
5702#define __CHAR_UNSIGNED__ 1
5703EOF
5704
5705fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005706
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005707echo $ac_n "checking for working const""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005708echo "configure:5709: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005709if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005710 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005711else
5712 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005713#line 5714 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005714#include "confdefs.h"
5715
Guido van Rossumf78abae1997-01-21 22:02:36 +00005716int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005717
5718/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005719typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005720/* SunOS 4.1.1 cc rejects this. */
5721char const *const *ccp;
5722char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723/* NEC SVR4.0.2 mips cc rejects this. */
5724struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005725static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005726/* AIX XL C 1.02.0.0 rejects this.
5727 It does not let you subtract one const X* pointer from another in an arm
5728 of an if-expression whose if-part is not a constant expression */
5729const char *g = "string";
5730ccp = &g + (g ? g-g : 0);
5731/* HPUX 7.0 cc rejects these. */
5732++ccp;
5733p = (char**) ccp;
5734ccp = (char const *const *) p;
5735{ /* SCO 3.2v4 cc rejects this. */
5736 char *t;
5737 char const *s = 0 ? (char *) 0 : (char const *) 0;
5738
5739 *t++ = 0;
5740}
5741{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005742 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005743 const int *foo = &x[0];
5744 ++foo;
5745}
5746{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5747 typedef const int *iptr;
5748 iptr p = 0;
5749 ++p;
5750}
5751{ /* AIX XL C 1.02.0.0 rejects this saying
5752 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5753 struct s { int j; const int *ap[3]; };
5754 struct s *b; b->j = 5;
5755}
5756{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5757 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005758}
5759
5760; return 0; }
5761EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005762if { (eval echo configure:5763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005763 rm -rf conftest*
5764 ac_cv_c_const=yes
5765else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005766 echo "configure: failed program was:" >&5
5767 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005768 rm -rf conftest*
5769 ac_cv_c_const=no
5770fi
5771rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005772fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005773
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005774echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005775if test $ac_cv_c_const = no; then
5776 cat >> confdefs.h <<\EOF
5777#define const
5778EOF
5779
5780fi
5781
5782
Guido van Rossumda88dad1995-01-26 00:46:29 +00005783works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005784echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005785echo "configure:5786: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005786cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005787#line 5788 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005788#include "confdefs.h"
5789
Guido van Rossumf78abae1997-01-21 22:02:36 +00005790int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005791volatile int x; x = 0;
5792; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005793EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005794if { (eval echo configure:5795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005795 rm -rf conftest*
5796 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005797else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005798 echo "configure: failed program was:" >&5
5799 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801 cat >> confdefs.h <<\EOF
5802#define volatile
5803EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005804
5805fi
5806rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005807echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005808
Guido van Rossumda88dad1995-01-26 00:46:29 +00005809works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005810echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005811echo "configure:5812: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005813#line 5814 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005814#include "confdefs.h"
5815
Guido van Rossumf78abae1997-01-21 22:02:36 +00005816int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005817signed char c;
5818; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005819EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005820if { (eval echo configure:5821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005821 rm -rf conftest*
5822 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005823else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005824 echo "configure: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005826 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005827 cat >> confdefs.h <<\EOF
5828#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005829EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005830
5831fi
5832rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005833echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005834
Guido van Rossumda88dad1995-01-26 00:46:29 +00005835have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005836echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005837echo "configure:5838: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005838cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005839#line 5840 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005840#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005841int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005842int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005843return foo(10);
5844; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005845EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005846if { (eval echo configure:5847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005847 rm -rf conftest*
5848 cat >> confdefs.h <<\EOF
5849#define HAVE_PROTOTYPES 1
5850EOF
5851 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005852else
5853 echo "configure: failed program was:" >&5
5854 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005855fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005857echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005858
Guido van Rossumda88dad1995-01-26 00:46:29 +00005859works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005860echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005861echo "configure:5862: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005862cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005863#line 5864 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005864#include "confdefs.h"
5865
5866#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005867int foo(int x, ...) {
5868 va_list va;
5869 va_start(va, x);
5870 va_arg(va, int);
5871 va_arg(va, char *);
5872 va_arg(va, double);
5873 return 0;
5874}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005875
Guido van Rossumf78abae1997-01-21 22:02:36 +00005876int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005877return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005879EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005880if { (eval echo configure:5881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005881 rm -rf conftest*
5882 cat >> confdefs.h <<\EOF
5883#define HAVE_STDARG_PROTOTYPES 1
5884EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005885 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005886else
5887 echo "configure: failed program was:" >&5
5888 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005889fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005890rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005891echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005892
Guido van Rossumda88dad1995-01-26 00:46:29 +00005893if test "$have_prototypes" = yes; then
5894bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005895echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005896echo "configure:5897: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005897cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005898#line 5899 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005899#include "confdefs.h"
5900#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005901int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902char **t;execve("@",t,t);
5903; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005904EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005905if { (eval echo configure:5906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005906 :
5907else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005908 echo "configure: failed program was:" >&5
5909 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005910 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005911 cat >> confdefs.h <<\EOF
5912#define BAD_EXEC_PROTOTYPES 1
5913EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005914 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005915fi
5916rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005917echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005918fi
5919
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005920# check if sockaddr has sa_len member
5921echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005922echo "configure:5923: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005923cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005924#line 5925 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005925#include "confdefs.h"
5926#include <sys/types.h>
5927#include <sys/socket.h>
5928int main() {
5929struct sockaddr x;
5930x.sa_len = 0;
5931; return 0; }
5932EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005933if { (eval echo configure:5934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005934 rm -rf conftest*
5935 echo "$ac_t""yes" 1>&6
5936 cat >> confdefs.h <<\EOF
5937#define HAVE_SOCKADDR_SA_LEN 1
5938EOF
5939
5940else
5941 echo "configure: failed program was:" >&5
5942 cat conftest.$ac_ext >&5
5943 rm -rf conftest*
5944 echo "$ac_t""no" 1>&6
5945fi
5946rm -f conftest*
5947
Guido van Rossumda88dad1995-01-26 00:46:29 +00005948bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005949echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005950echo "configure:5951: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005951if test "$cross_compiling" = yes; then
5952 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5953else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005954 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005955#line 5956 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005956#include "confdefs.h"
5957
5958struct s { int a; int b; };
5959static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960int foobar() {
5961 static int random;
5962 random = (int) &foo;
5963 return random;
5964}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005965static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005966main() {
5967 exit(!((int)&foo == foobar()));
5968}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005969
5970EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005971if { (eval echo configure:5972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00005972then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005973 :
5974else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005975 echo "configure: failed program was:" >&5
5976 cat conftest.$ac_ext >&5
5977 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005978 cat >> confdefs.h <<\EOF
5979#define BAD_STATIC_FORWARD 1
5980EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005981 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005982fi
5983rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005984fi
5985
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005986echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005987
Guido van Rossumda88dad1995-01-26 00:46:29 +00005988va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005989echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005990echo "configure:5991: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005991cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005992#line 5993 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005993#include "confdefs.h"
5994
5995#ifdef HAVE_STDARG_PROTOTYPES
5996#include <stdarg.h>
5997#else
5998#include <varargs.h>
5999#endif
6000
Guido van Rossumf78abae1997-01-21 22:02:36 +00006001int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006002va_list list1, list2; list1 = list2;
6003; return 0; }
6004EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006005if { (eval echo configure:6006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006006 :
6007else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006008 echo "configure: failed program was:" >&5
6009 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006010 rm -rf conftest*
6011 cat >> confdefs.h <<\EOF
6012#define VA_LIST_IS_ARRAY 1
6013EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006014 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006015fi
6016rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006017echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006018
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006019# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6020echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006021echo "configure:6022: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006022if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006023 echo $ac_n "(cached) $ac_c" 1>&6
6024else
6025 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006026#line 6027 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006027#include "confdefs.h"
6028/* System header to define __stub macros and hopefully few prototypes,
6029 which can conflict with char gethostbyname_r(); below. */
6030#include <assert.h>
6031/* Override any gcc2 internal prototype to avoid an error. */
6032/* We use char because int might match the return type of a gcc2
6033 builtin and then its argument prototype would still apply. */
6034char gethostbyname_r();
6035
6036int main() {
6037
6038/* The GNU C library defines this for functions which it implements
6039 to always fail with ENOSYS. Some functions are actually named
6040 something starting with __ and the normal name is an alias. */
6041#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6042choke me
6043#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006044gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006045#endif
6046
6047; return 0; }
6048EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006049if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006050 rm -rf conftest*
6051 eval "ac_cv_func_gethostbyname_r=yes"
6052else
6053 echo "configure: failed program was:" >&5
6054 cat conftest.$ac_ext >&5
6055 rm -rf conftest*
6056 eval "ac_cv_func_gethostbyname_r=no"
6057fi
6058rm -f conftest*
6059fi
6060
6061if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6062 echo "$ac_t""yes" 1>&6
6063
6064 cat >> confdefs.h <<\EOF
6065#define HAVE_GETHOSTBYNAME_R 1
6066EOF
6067
6068 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006069echo "configure:6070: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006070 OLD_CFLAGS=$CFLAGS
6071 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6072 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006073#line 6074 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006074#include "confdefs.h"
6075
6076# include <netdb.h>
6077
6078int main() {
6079
6080 char *name;
6081 struct hostent *he, *res;
6082 char buffer[2048];
6083 int buflen = 2048;
6084 int h_errnop;
6085
6086 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6087
6088; return 0; }
6089EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006090if { (eval echo configure:6091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006091 rm -rf conftest*
6092
6093 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006094#define HAVE_GETHOSTBYNAME_R 1
6095EOF
6096
6097 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006098#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6099EOF
6100
6101 echo "$ac_t""yes" 1>&6
6102
6103else
6104 echo "configure: failed program was:" >&5
6105 cat conftest.$ac_ext >&5
6106 rm -rf conftest*
6107
6108 echo "$ac_t""no" 1>&6
6109 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006110echo "configure:6111: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006111 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006112#line 6113 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006113#include "confdefs.h"
6114
6115# include <netdb.h>
6116
6117int main() {
6118
6119 char *name;
6120 struct hostent *he;
6121 char buffer[2048];
6122 int buflen = 2048;
6123 int h_errnop;
6124
6125 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6126
6127; return 0; }
6128EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006129if { (eval echo configure:6130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006130 rm -rf conftest*
6131
6132 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006133#define HAVE_GETHOSTBYNAME_R 1
6134EOF
6135
6136 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006137#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6138EOF
6139
6140 echo "$ac_t""yes" 1>&6
6141
6142else
6143 echo "configure: failed program was:" >&5
6144 cat conftest.$ac_ext >&5
6145 rm -rf conftest*
6146
6147 echo "$ac_t""no" 1>&6
6148 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006149echo "configure:6150: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006150 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006151#line 6152 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006152#include "confdefs.h"
6153
6154# include <netdb.h>
6155
6156int main() {
6157
6158 char *name;
6159 struct hostent *he;
6160 struct hostent_data data;
6161
6162 (void) gethostbyname_r(name, he, &data);
6163
6164; return 0; }
6165EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006166if { (eval echo configure:6167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006167 rm -rf conftest*
6168
6169 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006170#define HAVE_GETHOSTBYNAME_R 1
6171EOF
6172
6173 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006174#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6175EOF
6176
6177 echo "$ac_t""yes" 1>&6
6178
6179else
6180 echo "configure: failed program was:" >&5
6181 cat conftest.$ac_ext >&5
6182 rm -rf conftest*
6183
6184 echo "$ac_t""no" 1>&6
6185
6186fi
6187rm -f conftest*
6188
6189fi
6190rm -f conftest*
6191
6192fi
6193rm -f conftest*
6194 CFLAGS=$OLD_CFLAGS
6195
6196else
6197 echo "$ac_t""no" 1>&6
6198
Thomas Wouters3a584202000-08-05 23:28:51 +00006199 for ac_func in gethostbyname
6200do
6201echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006202echo "configure:6203: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006203if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006204 echo $ac_n "(cached) $ac_c" 1>&6
6205else
6206 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006207#line 6208 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006208#include "confdefs.h"
6209/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006210 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006211#include <assert.h>
6212/* Override any gcc2 internal prototype to avoid an error. */
6213/* We use char because int might match the return type of a gcc2
6214 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006215char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006216
6217int main() {
6218
6219/* The GNU C library defines this for functions which it implements
6220 to always fail with ENOSYS. Some functions are actually named
6221 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006222#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006223choke me
6224#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006225$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006226#endif
6227
6228; return 0; }
6229EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006230if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006231 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006232 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006233else
6234 echo "configure: failed program was:" >&5
6235 cat conftest.$ac_ext >&5
6236 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006237 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006238fi
6239rm -f conftest*
6240fi
6241
Thomas Wouters3a584202000-08-05 23:28:51 +00006242if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006243 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006244 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6245 cat >> confdefs.h <<EOF
6246#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006247EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006248
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006249else
6250 echo "$ac_t""no" 1>&6
6251fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006252done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006253
6254
6255fi
6256
6257
6258
6259
6260
6261
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006262
Guido van Rossum627b2d71993-12-24 10:39:16 +00006263# checks for system services
6264# (none yet)
6265
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006267echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006268echo "configure:6269: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006269if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006270 echo $ac_n "(cached) $ac_c" 1>&6
6271else
6272 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006273#line 6274 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006274#include "confdefs.h"
6275/* System header to define __stub macros and hopefully few prototypes,
6276 which can conflict with char __fpu_control(); below. */
6277#include <assert.h>
6278/* Override any gcc2 internal prototype to avoid an error. */
6279/* We use char because int might match the return type of a gcc2
6280 builtin and then its argument prototype would still apply. */
6281char __fpu_control();
6282
6283int main() {
6284
6285/* The GNU C library defines this for functions which it implements
6286 to always fail with ENOSYS. Some functions are actually named
6287 something starting with __ and the normal name is an alias. */
6288#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6289choke me
6290#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006291__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006292#endif
6293
6294; return 0; }
6295EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006296if { (eval echo configure:6297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006297 rm -rf conftest*
6298 eval "ac_cv_func___fpu_control=yes"
6299else
6300 echo "configure: failed program was:" >&5
6301 cat conftest.$ac_ext >&5
6302 rm -rf conftest*
6303 eval "ac_cv_func___fpu_control=no"
6304fi
6305rm -f conftest*
6306fi
6307
6308if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6309 echo "$ac_t""yes" 1>&6
6310 :
6311else
6312 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006313echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006314echo "configure:6315: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006315ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006316if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006317 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006318else
6319 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006320LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006321cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006322#line 6323 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006323#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006324/* Override any gcc2 internal prototype to avoid an error. */
6325/* We use char because int might match the return type of a gcc2
6326 builtin and then its argument prototype would still apply. */
6327char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006328
Guido van Rossumf78abae1997-01-21 22:02:36 +00006329int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006330__fpu_control()
6331; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006332EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006333if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006334 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006335 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006336else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006337 echo "configure: failed program was:" >&5
6338 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006339 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006340 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006341fi
6342rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006343LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006344
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006345fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006346if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006347 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006348 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6349 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006350 cat >> confdefs.h <<EOF
6351#define $ac_tr_lib 1
6352EOF
6353
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006354 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006355
6356else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006357 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006358fi
6359
6360
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006361fi
6362
6363
Guido van Rossum7f253911997-05-09 02:42:48 +00006364# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006365echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006366echo "configure:6367: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006367# Check whether --with-fpectl or --without-fpectl was given.
6368if test "${with_fpectl+set}" = set; then
6369 withval="$with_fpectl"
6370
6371if test "$withval" != no
6372then cat >> confdefs.h <<\EOF
6373#define WANT_SIGFPE_HANDLER 1
6374EOF
6375 echo "$ac_t""yes" 1>&6
6376else echo "$ac_t""no" 1>&6
6377fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006378else
6379 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006380fi
6381
6382
Guido van Rossum7f43da71994-08-01 12:15:30 +00006383# check for --with-libm=...
6384
Guido van Rossum563e7081996-09-10 18:20:48 +00006385case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006386Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006387next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006388BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006389*) LIBM=-lm
6390esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006391echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006392echo "configure:6393: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006393# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006394if test "${with_libm+set}" = set; then
6395 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006396
Guido van Rossum7f253911997-05-09 02:42:48 +00006397if test "$withval" = no
6398then LIBM=
6399 echo "$ac_t""force LIBM empty" 1>&6
6400elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006401then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006402 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006403else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006404fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006405else
6406 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006407fi
6408
6409
6410# check for --with-libc=...
6411
Guido van Rossum7f253911997-05-09 02:42:48 +00006412echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006413echo "configure:6414: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006414# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006415if test "${with_libc+set}" = set; then
6416 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006417
Guido van Rossum7f253911997-05-09 02:42:48 +00006418if test "$withval" = no
6419then LIBC=
6420 echo "$ac_t""force LIBC empty" 1>&6
6421elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006422then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006423 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006424else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006425fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006426else
6427 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006428fi
6429
6430
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006431# check for hypot() in math library
6432LIBS_SAVE=$LIBS
6433LIBS="$LIBS $LIBM"
6434for ac_func in hypot
6435do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006436echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006437echo "configure:6438: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006438if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006439 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006440else
6441 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006442#line 6443 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006443#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006444/* System header to define __stub macros and hopefully few prototypes,
6445 which can conflict with char $ac_func(); below. */
6446#include <assert.h>
6447/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006448/* We use char because int might match the return type of a gcc2
6449 builtin and then its argument prototype would still apply. */
6450char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006451
Guido van Rossumf78abae1997-01-21 22:02:36 +00006452int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006453
6454/* The GNU C library defines this for functions which it implements
6455 to always fail with ENOSYS. Some functions are actually named
6456 something starting with __ and the normal name is an alias. */
6457#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6458choke me
6459#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006460$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006461#endif
6462
6463; return 0; }
6464EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006465if { (eval echo configure:6466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006466 rm -rf conftest*
6467 eval "ac_cv_func_$ac_func=yes"
6468else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006469 echo "configure: failed program was:" >&5
6470 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006471 rm -rf conftest*
6472 eval "ac_cv_func_$ac_func=no"
6473fi
6474rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006475fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006476
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006477if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6478 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006479 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6480 cat >> confdefs.h <<EOF
6481#define $ac_tr_func 1
6482EOF
6483
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006484else
6485 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006486LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006487fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006488done
6489
Guido van Rossumf78abae1997-01-21 22:02:36 +00006490
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006491LIBS=$LIBS_SAVE
6492
Guido van Rossumad713701997-07-10 22:42:38 +00006493# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006494echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006495echo "configure:6496: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006496if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006497 echo $ac_n "(cached) $ac_c" 1>&6
6498else
6499 if test "$cross_compiling" = yes; then
6500 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6501else
6502 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006503#line 6504 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006504#include "confdefs.h"
6505#include <stdio.h>
6506#ifdef HAVE_STDLIB
6507#include <stdlib.h>
6508#else
6509char *malloc(), *realloc();
6510int *free();
6511#endif
6512main() {
6513 char *p;
6514 p = malloc(0);
6515 if (p == NULL) exit(1);
6516 p = realloc(p, 0);
6517 if (p == NULL) exit(1);
6518 free(p);
6519 exit(0);
6520}
6521EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006522if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad713701997-07-10 22:42:38 +00006523then
6524 ac_cv_malloc_zero=nonnull
6525else
6526 echo "configure: failed program was:" >&5
6527 cat conftest.$ac_ext >&5
6528 rm -fr conftest*
6529 ac_cv_malloc_zero=null
6530fi
6531rm -fr conftest*
6532fi
6533
6534fi
6535
6536echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6537if test "$ac_cv_malloc_zero" = null
6538then
6539 cat >> confdefs.h <<\EOF
6540#define MALLOC_ZERO_RETURNS_NULL 1
6541EOF
6542
6543fi
6544
Guido van Rossumef2255b2000-03-10 22:30:29 +00006545# check for wchar.h
6546ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6547echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006548echo "configure:6549: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006549if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006550 echo $ac_n "(cached) $ac_c" 1>&6
6551else
6552 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006553#line 6554 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006554#include "confdefs.h"
6555#include <wchar.h>
6556EOF
6557ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006558{ (eval echo configure:6559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006559ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6560if test -z "$ac_err"; then
6561 rm -rf conftest*
6562 eval "ac_cv_header_$ac_safe=yes"
6563else
6564 echo "$ac_err" >&5
6565 echo "configure: failed program was:" >&5
6566 cat conftest.$ac_ext >&5
6567 rm -rf conftest*
6568 eval "ac_cv_header_$ac_safe=no"
6569fi
6570rm -f conftest*
6571fi
6572if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6573 echo "$ac_t""yes" 1>&6
6574 cat >> confdefs.h <<\EOF
6575#define HAVE_WCHAR_H 1
6576EOF
6577 wchar_h="yes"
6578else
6579 echo "$ac_t""no" 1>&6
6580wchar_h="no"
6581
6582fi
6583
6584
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006585# determine wchar_t size
6586if test "$wchar_h" = yes
6587then
6588 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006589echo "configure:6590: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006590if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6591 echo $ac_n "(cached) $ac_c" 1>&6
6592else
6593 if test "$cross_compiling" = yes; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006594 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6595else
6596 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006597#line 6598 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006598#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006599#include <stdio.h>
6600main()
6601{
6602 FILE *f=fopen("conftestval", "w");
6603 if (!f) exit(1);
6604 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006605 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006606}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006607EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006608if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00006609then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006610 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006611else
6612 echo "configure: failed program was:" >&5
6613 cat conftest.$ac_ext >&5
6614 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006615 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006616fi
6617rm -fr conftest*
6618fi
6619
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006620fi
6621echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6622cat >> confdefs.h <<EOF
6623#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6624EOF
6625
6626
6627fi
6628
6629echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006630echo "configure:6631: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006631# Check whether --enable-unicode or --disable-unicode was given.
6632if test "${enable_unicode+set}" = set; then
6633 enableval="$enable_unicode"
6634 :
6635else
6636 enable_unicode=yes
6637fi
6638
6639
6640if test $enable_unicode = yes
6641then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006642 # Without any arguments, Py_UNICODE defaults to two-byte mode
6643 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006644fi
6645
6646case "$enable_unicode" in
6647ucs2) unicode_size="2"
6648 cat >> confdefs.h <<\EOF
6649#define Py_UNICODE_SIZE 2
6650EOF
6651
6652 ;;
6653ucs4) unicode_size="4"
6654 cat >> confdefs.h <<\EOF
6655#define Py_UNICODE_SIZE 4
6656EOF
6657
6658 ;;
6659esac
6660
6661if test "$enable_unicode" = "no"
6662then
6663 echo "$ac_t""not used" 1>&6
6664else
6665 cat >> confdefs.h <<\EOF
6666#define Py_USING_UNICODE 1
6667EOF
6668
6669 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6670 then
6671 PY_UNICODE_TYPE="wchar_t"
6672 cat >> confdefs.h <<\EOF
6673#define HAVE_USABLE_WCHAR_T 1
6674EOF
6675
6676 cat >> confdefs.h <<\EOF
6677#define PY_UNICODE_TYPE wchar_t
6678EOF
6679
6680 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6681 then
6682 PY_UNICODE_TYPE="unsigned short"
6683 cat >> confdefs.h <<\EOF
6684#define PY_UNICODE_TYPE unsigned short
6685EOF
6686
6687 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6688 then
6689 PY_UNICODE_TYPE="unsigned long"
6690 cat >> confdefs.h <<\EOF
6691#define PY_UNICODE_TYPE unsigned long
6692EOF
6693
6694 else
6695 PY_UNICODE_TYPE="no type found"
6696 fi
6697 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6698fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006699
6700# check for endianness
6701echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006702echo "configure:6703: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006703if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006704 echo $ac_n "(cached) $ac_c" 1>&6
6705else
6706 ac_cv_c_bigendian=unknown
6707# See if sys/param.h defines the BYTE_ORDER macro.
6708cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006709#line 6710 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006710#include "confdefs.h"
6711#include <sys/types.h>
6712#include <sys/param.h>
6713int main() {
6714
6715#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6716 bogus endian macros
6717#endif
6718; return 0; }
6719EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006720if { (eval echo configure:6721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006721 rm -rf conftest*
6722 # It does; now see whether it defined to BIG_ENDIAN or not.
6723cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006724#line 6725 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006725#include "confdefs.h"
6726#include <sys/types.h>
6727#include <sys/param.h>
6728int main() {
6729
6730#if BYTE_ORDER != BIG_ENDIAN
6731 not big endian
6732#endif
6733; return 0; }
6734EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006735if { (eval echo configure:6736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736 rm -rf conftest*
6737 ac_cv_c_bigendian=yes
6738else
6739 echo "configure: failed program was:" >&5
6740 cat conftest.$ac_ext >&5
6741 rm -rf conftest*
6742 ac_cv_c_bigendian=no
6743fi
6744rm -f conftest*
6745else
6746 echo "configure: failed program was:" >&5
6747 cat conftest.$ac_ext >&5
6748fi
6749rm -f conftest*
6750if test $ac_cv_c_bigendian = unknown; then
6751if test "$cross_compiling" = yes; then
6752 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6753else
6754 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006755#line 6756 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006756#include "confdefs.h"
6757main () {
6758 /* Are we little or big endian? From Harbison&Steele. */
6759 union
6760 {
6761 long l;
6762 char c[sizeof (long)];
6763 } u;
6764 u.l = 1;
6765 exit (u.c[sizeof (long) - 1] == 1);
6766}
6767EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006768if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00006769then
6770 ac_cv_c_bigendian=no
6771else
6772 echo "configure: failed program was:" >&5
6773 cat conftest.$ac_ext >&5
6774 rm -fr conftest*
6775 ac_cv_c_bigendian=yes
6776fi
6777rm -fr conftest*
6778fi
6779
6780fi
6781fi
6782
6783echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6784if test $ac_cv_c_bigendian = yes; then
6785 cat >> confdefs.h <<\EOF
6786#define WORDS_BIGENDIAN 1
6787EOF
6788
6789fi
6790
6791
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006792# Check whether right shifting a negative integer extends the sign bit
6793# or fills with zeros (like the Cray J90, according to Tim Peters).
6794echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006795echo "configure:6796: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006796if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006797 echo $ac_n "(cached) $ac_c" 1>&6
6798else
6799
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006800if test "$cross_compiling" = yes; then
6801 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6802else
6803 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006804#line 6805 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006805#include "confdefs.h"
6806
6807int main()
6808{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006809 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006810}
6811
6812EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006813if { (eval echo configure:6814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Vladimir Marangozova6180282000-07-12 05:05:06 +00006814then
6815 ac_cv_rshift_extends_sign=yes
6816else
6817 echo "configure: failed program was:" >&5
6818 cat conftest.$ac_ext >&5
6819 rm -fr conftest*
6820 ac_cv_rshift_extends_sign=no
6821fi
6822rm -fr conftest*
6823fi
6824
6825fi
6826
6827echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6828if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006829then
6830 cat >> confdefs.h <<\EOF
6831#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6832EOF
6833
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006834fi
6835
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006836# check for getc_unlocked and related locking functions
6837echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006838echo "configure:6839: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006839if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6840 echo $ac_n "(cached) $ac_c" 1>&6
6841else
6842
6843cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006844#line 6845 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006845#include "confdefs.h"
6846#include <stdio.h>
6847int main() {
6848
6849 FILE *f = fopen("/dev/null", "r");
6850 flockfile(f);
6851 getc_unlocked(f);
6852 funlockfile(f);
6853
6854; return 0; }
6855EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006856if { (eval echo configure:6857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006857 rm -rf conftest*
6858 ac_cv_have_getc_unlocked=yes
6859else
6860 echo "configure: failed program was:" >&5
6861 cat conftest.$ac_ext >&5
6862 rm -rf conftest*
6863 ac_cv_have_getc_unlocked=no
6864fi
6865rm -f conftest*
6866fi
6867
6868echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6869if test "$ac_cv_have_getc_unlocked" = yes
6870then
6871 cat >> confdefs.h <<\EOF
6872#define HAVE_GETC_UNLOCKED 1
6873EOF
6874
6875fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006876
Guido van Rossum353ae582001-07-10 16:45:32 +00006877# check for readline 4.2
6878echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006879echo "configure:6880: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00006880ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
6881if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6882 echo $ac_n "(cached) $ac_c" 1>&6
6883else
6884 ac_save_LIBS="$LIBS"
6885LIBS="-lreadline -ltermcap $LIBS"
6886cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006887#line 6888 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00006888#include "confdefs.h"
6889/* Override any gcc2 internal prototype to avoid an error. */
6890/* We use char because int might match the return type of a gcc2
6891 builtin and then its argument prototype would still apply. */
6892char rl_completion_matches();
6893
6894int main() {
6895rl_completion_matches()
6896; return 0; }
6897EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006898if { (eval echo configure:6899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00006899 rm -rf conftest*
6900 eval "ac_cv_lib_$ac_lib_var=yes"
6901else
6902 echo "configure: failed program was:" >&5
6903 cat conftest.$ac_ext >&5
6904 rm -rf conftest*
6905 eval "ac_cv_lib_$ac_lib_var=no"
6906fi
6907rm -f conftest*
6908LIBS="$ac_save_LIBS"
6909
6910fi
6911if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6912 echo "$ac_t""yes" 1>&6
6913 cat >> confdefs.h <<\EOF
6914#define HAVE_RL_COMPLETION_MATCHES 1
6915EOF
6916
6917else
6918 echo "$ac_t""no" 1>&6
6919fi
6920
6921
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006922echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006923echo "configure:6924: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006924if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
6925 echo $ac_n "(cached) $ac_c" 1>&6
6926else
6927
6928if test "$cross_compiling" = yes; then
6929 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6930else
6931 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006932#line 6933 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006933#include "confdefs.h"
6934
6935int main()
6936{
6937 int val1 = nice(1);
6938 if (val1 != -1 && val1 == nice(2))
6939 exit(0);
6940 exit(1);
6941}
6942
6943EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006944if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006945then
6946 ac_cv_broken_nice=yes
6947else
6948 echo "configure: failed program was:" >&5
6949 cat conftest.$ac_ext >&5
6950 rm -fr conftest*
6951 ac_cv_broken_nice=no
6952fi
6953rm -fr conftest*
6954fi
6955
6956fi
6957
6958echo "$ac_t""$ac_cv_broken_nice" 1>&6
6959if test "$ac_cv_broken_nice" = yes
6960then
6961 cat >> confdefs.h <<\EOF
6962#define HAVE_BROKEN_NICE 1
6963EOF
6964
6965fi
6966
Guido van Rossum95713eb2000-05-18 20:53:31 +00006967# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6968# Add sys/socket.h to confdefs.h
6969cat >> confdefs.h <<\EOF
6970#ifdef HAVE_SYS_SOCKET_H
6971#include <sys/socket.h>
6972#endif
6973EOF
6974echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006975echo "configure:6976: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006976if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006977 echo $ac_n "(cached) $ac_c" 1>&6
6978else
6979 cat > conftest.$ac_ext <<EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00006980#line 6981 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006981#include "confdefs.h"
6982#include <sys/types.h>
6983#if STDC_HEADERS
6984#include <stdlib.h>
6985#include <stddef.h>
6986#endif
6987EOF
6988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6989 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6990 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006991 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006992else
6993 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006994 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006995fi
6996rm -f conftest*
6997
6998fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006999echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7000if test $ac_cv_type_socklen_t = no; then
7001 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007002#define socklen_t int
7003EOF
7004
7005fi
7006
7007
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007008# Add Python/ prefix to LIBOBJS
7009libobjs=$LIBOBJS
7010LIBOBJS=
7011for obj in $libobjs; do
7012 LIBOBJS="$LIBOBJS Python/$obj"
7013done
7014
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007015#AC_MSG_CHECKING(for Modules/Setup)
7016#if test ! -f Modules/Setup ; then
7017# if test ! -d Modules ; then
7018# mkdir Modules
7019# fi
7020# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7021# AC_MSG_RESULT(creating)
7022#else
7023# AC_MSG_RESULT(already exists)
7024#fi
7025
7026
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007027SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007028echo $ac_n "checking for build directories""... $ac_c" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007029echo "configure:7030: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007030for dir in $SRCDIRS; do
7031 if test ! -d $dir; then
7032 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007033 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007034done
7035echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007036
Guido van Rossum627b2d71993-12-24 10:39:16 +00007037# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007039cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007040# This file is a shell script that caches the results of configure
7041# tests run on this system so they can be shared between configure
7042# scripts and configure runs. It is not useful on other systems.
7043# If it contains results you don't want to keep, you may remove or edit it.
7044#
7045# By default, configure uses ./config.cache as the cache file,
7046# creating it if it does not exist already. You can give configure
7047# the --cache-file=FILE option to use a different cache file; that is
7048# what configure does when it calls configure scripts in
7049# subdirectories, so they share the cache.
7050# Giving --cache-file=/dev/null disables caching, for debugging configure.
7051# config.status only pays attention to the cache file if you give it the
7052# --recheck option to rerun configure.
7053#
7054EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007055# The following way of writing the cache mishandles newlines in values,
7056# but we know of no workaround that is simple, portable, and efficient.
7057# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007058# Ultrix sh set writes to stderr and can't be redirected directly,
7059# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007061 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007062 *ac_space=\ *)
7063 # `set' does not quote correctly, so add quotes (double-quote substitution
7064 # turns \\\\ into \\, and sed turns \\ into \).
7065 sed -n \
7066 -e "s/'/'\\\\''/g" \
7067 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7068 ;;
7069 *)
7070 # `set' quotes correctly as required by POSIX, so do not add quotes.
7071 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7072 ;;
7073 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007074if cmp -s $cache_file confcache; then
7075 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007076else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007077 if test -w $cache_file; then
7078 echo "updating cache $cache_file"
7079 cat confcache > $cache_file
7080 else
7081 echo "not updating unwritable cache $cache_file"
7082 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007083fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007084rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007085
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007086trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007087
7088test "x$prefix" = xNONE && prefix=$ac_default_prefix
7089# Let make expand exec_prefix.
7090test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007091
Guido van Rossum7f43da71994-08-01 12:15:30 +00007092# Any assignment to VPATH causes Sun make to only execute
7093# the first set of double-colon rules, so remove it if not needed.
7094# If there is a colon in the path, we need to keep it.
7095if test "x$srcdir" = x.; then
7096 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7097fi
7098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007099trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007100
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007101DEFS=-DHAVE_CONFIG_H
7102
7103# Without the "./", some shells look in PATH for config.status.
7104: ${CONFIG_STATUS=./config.status}
7105
7106echo creating $CONFIG_STATUS
7107rm -f $CONFIG_STATUS
7108cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007109#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007110# Generated automatically by configure.
7111# Run this file to recreate the current configuration.
7112# This directory was configured as follows,
7113# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7114#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007115# $0 $ac_configure_args
7116#
7117# Compiler output produced by configure, useful for debugging
7118# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007120ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007121for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007122do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007123 case "\$ac_option" in
7124 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007125 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7126 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007127 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007128 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007129 exit 0 ;;
7130 -help | --help | --hel | --he | --h)
7131 echo "\$ac_cs_usage"; exit 0 ;;
7132 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007133 esac
7134done
7135
Guido van Rossum7f43da71994-08-01 12:15:30 +00007136ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007137ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007138
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007139trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007140EOF
7141cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007142
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007143# Protect against being on the right side of a sed subst in config.status.
7144sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7145 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007146$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007147$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007148s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007149s%@CFLAGS@%$CFLAGS%g
7150s%@CPPFLAGS@%$CPPFLAGS%g
7151s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007152s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007153s%@DEFS@%$DEFS%g
7154s%@LDFLAGS@%$LDFLAGS%g
7155s%@LIBS@%$LIBS%g
7156s%@exec_prefix@%$exec_prefix%g
7157s%@prefix@%$prefix%g
7158s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007159s%@bindir@%$bindir%g
7160s%@sbindir@%$sbindir%g
7161s%@libexecdir@%$libexecdir%g
7162s%@datadir@%$datadir%g
7163s%@sysconfdir@%$sysconfdir%g
7164s%@sharedstatedir@%$sharedstatedir%g
7165s%@localstatedir@%$localstatedir%g
7166s%@libdir@%$libdir%g
7167s%@includedir@%$includedir%g
7168s%@oldincludedir@%$oldincludedir%g
7169s%@infodir@%$infodir%g
7170s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007171s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007172s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007173s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007174s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007175s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007176s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007177s%@CC@%$CC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007178s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007179s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007180s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007181s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007182s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007183s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007184s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007185s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007186s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007187s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007188s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007189s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007190s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007191s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007192s%@SO@%$SO%g
7193s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007194s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007195s%@CCSHARED@%$CCSHARED%g
7196s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007197s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007198s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7199s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007200s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007201s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00007202s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007203s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007204s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007205s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007206s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007207s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7208s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7209s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007210s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007211s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007212s%@LIBM@%$LIBM%g
7213s%@LIBC@%$LIBC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007214s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007215
7216CEOF
7217EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007218
7219cat >> $CONFIG_STATUS <<\EOF
7220
7221# Split the substitutions into bite-sized pieces for seds with
7222# small command number limits, like on Digital OSF/1 and HP-UX.
7223ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7224ac_file=1 # Number of current file.
7225ac_beg=1 # First line for current file.
7226ac_end=$ac_max_sed_cmds # Line after last line for current file.
7227ac_more_lines=:
7228ac_sed_cmds=""
7229while $ac_more_lines; do
7230 if test $ac_beg -gt 1; then
7231 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7232 else
7233 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7234 fi
7235 if test ! -s conftest.s$ac_file; then
7236 ac_more_lines=false
7237 rm -f conftest.s$ac_file
7238 else
7239 if test -z "$ac_sed_cmds"; then
7240 ac_sed_cmds="sed -f conftest.s$ac_file"
7241 else
7242 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7243 fi
7244 ac_file=`expr $ac_file + 1`
7245 ac_beg=$ac_end
7246 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7247 fi
7248done
7249if test -z "$ac_sed_cmds"; then
7250 ac_sed_cmds=cat
7251fi
7252EOF
7253
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007254cat >> $CONFIG_STATUS <<EOF
7255
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007256CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007257EOF
7258cat >> $CONFIG_STATUS <<\EOF
7259for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007260 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007261 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007262 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007263 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7264 *) ac_file_in="${ac_file}.in" ;;
7265 esac
7266
Guido van Rossumf78abae1997-01-21 22:02:36 +00007267 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007268
7269 # Remove last slash and all that follows it. Not all systems have dirname.
7270 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7271 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7272 # The file is in a subdirectory.
7273 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007274 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007275 # A "../" for each directory in $ac_dir_suffix.
7276 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7277 else
7278 ac_dir_suffix= ac_dots=
7279 fi
7280
7281 case "$ac_given_srcdir" in
7282 .) srcdir=.
7283 if test -z "$ac_dots"; then top_srcdir=.
7284 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7285 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7286 *) # Relative path.
7287 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7288 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7289 esac
7290
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007291 case "$ac_given_INSTALL" in
7292 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7293 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7294 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007295
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007296 echo creating "$ac_file"
7297 rm -f "$ac_file"
7298 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7299 case "$ac_file" in
7300 *Makefile*) ac_comsub="1i\\
7301# $configure_input" ;;
7302 *) ac_comsub= ;;
7303 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007304
7305 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306 sed -e "$ac_comsub
7307s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007308s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007309s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007310s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007311" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007312fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007313rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007314
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007315# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7316# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007317#
7318# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007319ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7320ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007321ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007322ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007323# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007324ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7325ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007326ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007327ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007328# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007329ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7330ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007331ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007332ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007333
Guido van Rossumf78abae1997-01-21 22:02:36 +00007334if test "${CONFIG_HEADERS+set}" != set; then
7335EOF
7336cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007337 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007338EOF
7339cat >> $CONFIG_STATUS <<\EOF
7340fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007341for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007342 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007343 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007344 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007345 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7346 *) ac_file_in="${ac_file}.in" ;;
7347 esac
7348
Guido van Rossum7f43da71994-08-01 12:15:30 +00007349 echo creating $ac_file
7350
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007352 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7353 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007354
7355EOF
7356
7357# Transform confdefs.h into a sed script conftest.vals that substitutes
7358# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007359# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007360# Protect against being in an unquoted here document in config.status.
7361rm -f conftest.vals
7362cat > conftest.hdr <<\EOF
7363s/[\\&%]/\\&/g
7364s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007365s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007366s%ac_d%ac_u%gp
7367s%ac_u%ac_e%gp
7368EOF
7369sed -n -f conftest.hdr confdefs.h > conftest.vals
7370rm -f conftest.hdr
7371
7372# This sed command replaces #undef with comments. This is necessary, for
7373# example, in the case of _POSIX_SOURCE, which is predefined and required
7374# on some systems where configure will not decide to define it.
7375cat >> conftest.vals <<\EOF
7376s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7377EOF
7378
7379# Break up conftest.vals because some shells have a limit on
7380# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007381
7382rm -f conftest.tail
7383while :
7384do
7385 ac_lines=`grep -c . conftest.vals`
7386 # grep -c gives empty output for an empty file on some AIX systems.
7387 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7388 # Write a limited-size here document to conftest.frag.
7389 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7390 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7391 echo 'CEOF
7392 sed -f conftest.frag conftest.in > conftest.out
7393 rm -f conftest.in
7394 mv conftest.out conftest.in
7395' >> $CONFIG_STATUS
7396 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7397 rm -f conftest.vals
7398 mv conftest.tail conftest.vals
7399done
7400rm -f conftest.vals
7401
7402cat >> $CONFIG_STATUS <<\EOF
7403 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007404 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007405 cat conftest.in >> conftest.h
7406 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007407 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007408 echo "$ac_file is unchanged"
7409 rm -f conftest.h
7410 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007411 # Remove last slash and all that follows it. Not all systems have dirname.
7412 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7413 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7414 # The file is in a subdirectory.
7415 test ! -d "$ac_dir" && mkdir "$ac_dir"
7416 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007417 rm -f $ac_file
7418 mv conftest.h $ac_file
7419 fi
7420fi; done
7421
Guido van Rossumf78abae1997-01-21 22:02:36 +00007422EOF
7423cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007424
Guido van Rossumf78abae1997-01-21 22:02:36 +00007425EOF
7426cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007427
7428exit 0
7429EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007430chmod +x $CONFIG_STATUS
7431rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007432test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007433
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007434
7435echo "creating Setup"
7436if test ! -f Modules/Setup
7437then
7438 cp $srcdir/Modules/Setup.dist Modules/Setup
7439fi
7440
7441echo "creating Setup.local"
7442if test ! -f Modules/Setup.local
7443then
7444 echo "# Edit this file for local setup changes" >Modules/Setup.local
7445fi
7446
7447echo "creating Makefile"
7448$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7449 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007450 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007451mv config.c Modules