blob: 7e3d3536c09b912633dc328b84cd657aa200859f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Eric S. Raymonda8885402001-01-17 08:25:11 +00003# From configure.in Revision: 1.189
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
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) 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
Guido van Rossumff555e32000-09-22 15:38:21 +000027 --with-suffix=.exe set executable suffix"
28ac_help="$ac_help
Skip Montanarocb853262000-08-30 22:29:48 +000029 --with-pydebug build with Py_DEBUG defined"
30ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000031 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000032ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000041 --with(out)-cycle-gc disable/enable garbage collection"
42ac_help="$ac_help
Barry Warsawa57b89b2001-01-15 17:07:21 +000043 --with(out)-dbm disable/enable dbm module"
44ac_help="$ac_help
Fred Drakea50d6ec2000-08-31 16:13:20 +000045 --with(out)-libdb disable/enable bsddb module"
46ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000047 --with-wctype-functions use wctype.h functions"
48ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000049 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000051 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000052ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000053 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000054ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000055 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000057 --with-libc=STRING C library"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +000058ac_help="$ac_help
59 --with-check-import-case enable imported module name case checking"
Guido van Rossum627b2d71993-12-24 10:39:16 +000060
Guido van Rossum7f43da71994-08-01 12:15:30 +000061# Initialize some variables set by options.
62# The variables have the same names as the options, with
63# dashes changed to underlines.
64build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000065cache_file=./config.cache
66exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000067host=NONE
68no_create=
69nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000070no_recursion=
71prefix=NONE
72program_prefix=NONE
73program_suffix=NONE
74program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000075silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000076site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000077srcdir=
78target=NONE
79verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000080x_includes=NONE
81x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000082bindir='${exec_prefix}/bin'
83sbindir='${exec_prefix}/sbin'
84libexecdir='${exec_prefix}/libexec'
85datadir='${prefix}/share'
86sysconfdir='${prefix}/etc'
87sharedstatedir='${prefix}/com'
88localstatedir='${prefix}/var'
89libdir='${exec_prefix}/lib'
90includedir='${prefix}/include'
91oldincludedir='/usr/include'
92infodir='${prefix}/info'
93mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000094
95# Initialize some other variables.
96subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000097MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000098SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000099# Maximum number of lines to put in a shell here document.
100ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000101
102ac_prev=
103for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000104do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105
Guido van Rossum7f43da71994-08-01 12:15:30 +0000106 # If the previous option needs an argument, assign it.
107 if test -n "$ac_prev"; then
108 eval "$ac_prev=\$ac_option"
109 ac_prev=
110 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000111 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000112
Guido van Rossum7f43da71994-08-01 12:15:30 +0000113 case "$ac_option" in
114 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
115 *) ac_optarg= ;;
116 esac
117
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000118 # Accept the important Cygnus configure options, so we can diagnose typos.
119
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120 case "$ac_option" in
121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000122 -bindir | --bindir | --bindi | --bind | --bin | --bi)
123 ac_prev=bindir ;;
124 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
125 bindir="$ac_optarg" ;;
126
127 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000128 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000129 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000130 build="$ac_optarg" ;;
131
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000132 -cache-file | --cache-file | --cache-fil | --cache-fi \
133 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
134 ac_prev=cache_file ;;
135 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
136 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
137 cache_file="$ac_optarg" ;;
138
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000139 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
140 ac_prev=datadir ;;
141 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
142 | --da=*)
143 datadir="$ac_optarg" ;;
144
Guido van Rossum7f43da71994-08-01 12:15:30 +0000145 -disable-* | --disable-*)
146 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000147 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000149 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000150 fi
151 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
152 eval "enable_${ac_feature}=no" ;;
153
154 -enable-* | --enable-*)
155 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000156 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000157 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000158 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000159 fi
160 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
161 case "$ac_option" in
162 *=*) ;;
163 *) ac_optarg=yes ;;
164 esac
165 eval "enable_${ac_feature}='$ac_optarg'" ;;
166
Guido van Rossum7f43da71994-08-01 12:15:30 +0000167 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
168 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
169 | --exec | --exe | --ex)
170 ac_prev=exec_prefix ;;
171 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
172 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
173 | --exec=* | --exe=* | --ex=*)
174 exec_prefix="$ac_optarg" ;;
175
176 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000177 # Obsolete; use --with-gas.
178 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000179
180 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000181 # Omit some internal or obsolete options to make the list less imposing.
182 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000183 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000184Usage: configure [options] [host]
185Options: [defaults in brackets after descriptions]
186Configuration:
187 --cache-file=FILE cache test results in FILE
188 --help print this message
189 --no-create do not create output files
190 --quiet, --silent do not print \`checking...' messages
191 --version print the version of autoconf that created configure
192Directory and file names:
193 --prefix=PREFIX install architecture-independent files in PREFIX
194 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000195 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000196 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000197 --bindir=DIR user executables in DIR [EPREFIX/bin]
198 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
199 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
200 --datadir=DIR read-only architecture-independent data in DIR
201 [PREFIX/share]
202 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
203 --sharedstatedir=DIR modifiable architecture-independent data in DIR
204 [PREFIX/com]
205 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
206 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
207 --includedir=DIR C header files in DIR [PREFIX/include]
208 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
209 --infodir=DIR info documentation in DIR [PREFIX/info]
210 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000211 --srcdir=DIR find the sources in DIR [configure dir or ..]
212 --program-prefix=PREFIX prepend PREFIX to installed program names
213 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000214 --program-transform-name=PROGRAM
215 run sed PROGRAM on installed program names
216EOF
217 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000218Host type:
219 --build=BUILD configure for building on BUILD [BUILD=HOST]
220 --host=HOST configure for HOST [guessed]
221 --target=TARGET configure for TARGET [TARGET=HOST]
222Features and packages:
223 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
224 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
225 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
226 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
227 --x-includes=DIR X include files are in DIR
228 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000229EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000230 if test -n "$ac_help"; then
231 echo "--enable and --with options recognized:$ac_help"
232 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000233 exit 0 ;;
234
235 -host | --host | --hos | --ho)
236 ac_prev=host ;;
237 -host=* | --host=* | --hos=* | --ho=*)
238 host="$ac_optarg" ;;
239
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000240 -includedir | --includedir | --includedi | --included | --include \
241 | --includ | --inclu | --incl | --inc)
242 ac_prev=includedir ;;
243 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
244 | --includ=* | --inclu=* | --incl=* | --inc=*)
245 includedir="$ac_optarg" ;;
246
247 -infodir | --infodir | --infodi | --infod | --info | --inf)
248 ac_prev=infodir ;;
249 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
250 infodir="$ac_optarg" ;;
251
252 -libdir | --libdir | --libdi | --libd)
253 ac_prev=libdir ;;
254 -libdir=* | --libdir=* | --libdi=* | --libd=*)
255 libdir="$ac_optarg" ;;
256
257 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
258 | --libexe | --libex | --libe)
259 ac_prev=libexecdir ;;
260 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
261 | --libexe=* | --libex=* | --libe=*)
262 libexecdir="$ac_optarg" ;;
263
264 -localstatedir | --localstatedir | --localstatedi | --localstated \
265 | --localstate | --localstat | --localsta | --localst \
266 | --locals | --local | --loca | --loc | --lo)
267 ac_prev=localstatedir ;;
268 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
269 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
270 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
271 localstatedir="$ac_optarg" ;;
272
273 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
274 ac_prev=mandir ;;
275 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
276 mandir="$ac_optarg" ;;
277
Guido van Rossum7f43da71994-08-01 12:15:30 +0000278 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000279 # Obsolete; use --without-fp.
280 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281
282 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
283 | --no-cr | --no-c)
284 no_create=yes ;;
285
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000286 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
287 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
288 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000289
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000290 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
291 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
292 | --oldin | --oldi | --old | --ol | --o)
293 ac_prev=oldincludedir ;;
294 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
295 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
296 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
297 oldincludedir="$ac_optarg" ;;
298
Guido van Rossum7f43da71994-08-01 12:15:30 +0000299 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
300 ac_prev=prefix ;;
301 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
302 prefix="$ac_optarg" ;;
303
304 -program-prefix | --program-prefix | --program-prefi | --program-pref \
305 | --program-pre | --program-pr | --program-p)
306 ac_prev=program_prefix ;;
307 -program-prefix=* | --program-prefix=* | --program-prefi=* \
308 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
309 program_prefix="$ac_optarg" ;;
310
311 -program-suffix | --program-suffix | --program-suffi | --program-suff \
312 | --program-suf | --program-su | --program-s)
313 ac_prev=program_suffix ;;
314 -program-suffix=* | --program-suffix=* | --program-suffi=* \
315 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
316 program_suffix="$ac_optarg" ;;
317
318 -program-transform-name | --program-transform-name \
319 | --program-transform-nam | --program-transform-na \
320 | --program-transform-n | --program-transform- \
321 | --program-transform | --program-transfor \
322 | --program-transfo | --program-transf \
323 | --program-trans | --program-tran \
324 | --progr-tra | --program-tr | --program-t)
325 ac_prev=program_transform_name ;;
326 -program-transform-name=* | --program-transform-name=* \
327 | --program-transform-nam=* | --program-transform-na=* \
328 | --program-transform-n=* | --program-transform-=* \
329 | --program-transform=* | --program-transfor=* \
330 | --program-transfo=* | --program-transf=* \
331 | --program-trans=* | --program-tran=* \
332 | --progr-tra=* | --program-tr=* | --program-t=*)
333 program_transform_name="$ac_optarg" ;;
334
335 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
336 | -silent | --silent | --silen | --sile | --sil)
337 silent=yes ;;
338
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000339 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
340 ac_prev=sbindir ;;
341 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
342 | --sbi=* | --sb=*)
343 sbindir="$ac_optarg" ;;
344
345 -sharedstatedir | --sharedstatedir | --sharedstatedi \
346 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
347 | --sharedst | --shareds | --shared | --share | --shar \
348 | --sha | --sh)
349 ac_prev=sharedstatedir ;;
350 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
351 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
352 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
353 | --sha=* | --sh=*)
354 sharedstatedir="$ac_optarg" ;;
355
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000356 -site | --site | --sit)
357 ac_prev=site ;;
358 -site=* | --site=* | --sit=*)
359 site="$ac_optarg" ;;
360
Guido van Rossum7f43da71994-08-01 12:15:30 +0000361 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
362 ac_prev=srcdir ;;
363 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
364 srcdir="$ac_optarg" ;;
365
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000366 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
367 | --syscon | --sysco | --sysc | --sys | --sy)
368 ac_prev=sysconfdir ;;
369 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
370 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
371 sysconfdir="$ac_optarg" ;;
372
Guido van Rossum7f43da71994-08-01 12:15:30 +0000373 -target | --target | --targe | --targ | --tar | --ta | --t)
374 ac_prev=target ;;
375 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
376 target="$ac_optarg" ;;
377
378 -v | -verbose | --verbose | --verbos | --verbo | --verb)
379 verbose=yes ;;
380
381 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000382 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000383 exit 0 ;;
384
385 -with-* | --with-*)
386 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000387 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000388 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000389 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000390 fi
391 ac_package=`echo $ac_package| sed 's/-/_/g'`
392 case "$ac_option" in
393 *=*) ;;
394 *) ac_optarg=yes ;;
395 esac
396 eval "with_${ac_package}='$ac_optarg'" ;;
397
398 -without-* | --without-*)
399 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000401 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000402 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 fi
404 ac_package=`echo $ac_package| sed 's/-/_/g'`
405 eval "with_${ac_package}=no" ;;
406
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000407 --x)
408 # Obsolete; use --with-x.
409 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000410
411 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
412 | --x-incl | --x-inc | --x-in | --x-i)
413 ac_prev=x_includes ;;
414 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
415 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
416 x_includes="$ac_optarg" ;;
417
418 -x-libraries | --x-libraries | --x-librarie | --x-librari \
419 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
420 ac_prev=x_libraries ;;
421 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
422 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
423 x_libraries="$ac_optarg" ;;
424
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000425 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000426 ;;
427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000429 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000431 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000432 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433 { 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 +0000434 fi
435 nonopt="$ac_option"
436 ;;
437
438 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000439done
440
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000442 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000443fi
444
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000445trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000446
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000447# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000449# 1 file creation
450# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000451# 3 some systems may open it to /dev/tty
452# 4 used on the Kubota Titan
453# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000454# 5 compiler messages saved in config.log
455if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000456 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000457else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000458 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000459fi
460exec 5>./config.log
461
462echo "\
463This file contains any messages produced by compilers while
464running configure, to aid debugging if configure makes a mistake.
465" 1>&5
466
467# Strip out --no-create and --no-recursion so they do not pile up.
468# Also quote any args containing shell metacharacters.
469ac_configure_args=
470for ac_arg
471do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 case "$ac_arg" in
473 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
474 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000475 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
476 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
477 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
478 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
479 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480 esac
481done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000482
483# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000484# Only set these to C if already set. These must not be set unconditionally
485# because not all systems understand e.g. LANG=C (notably SCO).
486# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
487# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000489if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
490if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
491if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000492
Guido van Rossum7f43da71994-08-01 12:15:30 +0000493# confdefs.h avoids OS command line length limits that DEFS can exceed.
494rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495# AIX cpp loses on an empty file, so make sure it contains at least a newline.
496echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000497
498# A filename unique to this package, relative to the directory that
499# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000500ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501
502# Find the source files, if location was not specified.
503if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000505 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000506 ac_prog=$0
507 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
508 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
509 srcdir=$ac_confdir
510 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511 srcdir=..
512 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000513else
514 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000515fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000516if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000517 if test "$ac_srcdir_defaulted" = yes; then
518 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000519 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000520 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000521 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000523srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
524
525# Prefer explicitly selected file to automatically selected ones.
526if test -z "$CONFIG_SITE"; then
527 if test "x$prefix" != xNONE; then
528 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
529 else
530 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
531 fi
532fi
533for ac_site_file in $CONFIG_SITE; do
534 if test -r "$ac_site_file"; then
535 echo "loading site script $ac_site_file"
536 . "$ac_site_file"
537 fi
538done
539
540if test -r "$cache_file"; then
541 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000542 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000543else
544 echo "creating cache $cache_file"
545 > $cache_file
546fi
547
Guido van Rossum7f43da71994-08-01 12:15:30 +0000548ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000549# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000551ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000552ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000553cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000554
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000555ac_exeext=
556ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000557if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
558 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
559 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
560 ac_n= ac_c='
561' ac_t=' '
562 else
563 ac_n=-n ac_c= ac_t=
564 fi
565else
566 ac_n= ac_c='\c' ac_t=
567fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000568
Guido van Rossum0a516c91994-09-12 10:58:40 +0000569
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000570
Guido van Rossum627b2d71993-12-24 10:39:16 +0000571
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000572# Set VERSION so we only need to edit in one place (i.e., here)
573
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000574VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000575
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000576# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000577if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000578
579 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000580echo "configure:581: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000582if test "${with_next_archs+set}" = set; then
583 withval="$with_next_archs"
584
Guido van Rossum563e7081996-09-10 18:20:48 +0000585 if test -n "$withval"; then
586 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
587 # GCC does not currently support multi archs on the NeXT
588 with_gcc=no
589 fi
590 echo "$ac_t""$with_next_archs" 1>&6
591
592else
593 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000594fi
595
Guido van Rossum563e7081996-09-10 18:20:48 +0000596
597 if test -z "$MACHDEP"
598 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000599 ac_sys_system=`uname -s`
600 if test "$ac_sys_system" = "Darwin" ; then
601 ac_sys_release=`uname -r`
602 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000603 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000604 sed -e 's/://' -e 's/\./_/'` && \
605 ac_sys_system=next && ac_sys_release=$4
606 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000607
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000608 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000609 fi
610fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000611
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000612# Check whether --with-next-framework or --without-next-framework was given.
613if test "${with_next_framework+set}" = set; then
614 withval="$with_next_framework"
615 :
616fi
617
618# Check whether --with-dyld or --without-dyld was given.
619if test "${with_dyld+set}" = set; then
620 withval="$with_dyld"
621 :
622fi
623
Guido van Rossum91922671997-10-09 20:24:13 +0000624
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625# Set name for machine-dependent library files
626
627echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000628echo "configure:629: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000629if test -z "$MACHDEP"
630then
Guido van Rossum563e7081996-09-10 18:20:48 +0000631 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000632 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000633 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000634 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000635 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000636 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000637 ac_md_system=`echo $ac_sys_system |
638 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
639 ac_md_release=`echo $ac_sys_release |
640 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000641 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000642
Guido van Rossum07397971997-04-29 21:49:50 +0000643 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000644 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000645 esac
646fi
Guido van Rossum91922671997-10-09 20:24:13 +0000647
648#
649# SGI compilers allow the specification of the both the ABI and the
650# ISA on the command line. Depending on the values of these switches,
651# different and often incompatable code will be generated.
652#
653# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
654# thus supply support for various ABI/ISA combinations. The MACHDEP
655# variable is also adjusted.
656#
657
658if test ! -z "$SGI_ABI"
659then
660 CC="cc $SGI_ABI"
661 LDFLAGS="$SGI_ABI $LDFLAGS"
662 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
663fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000664echo "$ac_t""$MACHDEP" 1>&6
665
Guido van Rossum91922671997-10-09 20:24:13 +0000666#
667# CCC is the command that compiles C++ programs
668#
669# Not all make programs have this predefined.
670#
Guido van Rossum95012191999-12-16 17:50:52 +0000671#AC_SUBST(SET_CCC)
672#AC_MSG_CHECKING(CCC)
673#if test -z "$CCC"
674#then
675# case $ac_sys_system in
676# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
677# Linux*) SET_CCC="CCC= g++";;
678# *) SET_CCC=""
679# esac
680#else
681# SET_CCC="CCC= ${CCC}"
682#fi
683#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000684
685
Guido van Rossum627b2d71993-12-24 10:39:16 +0000686# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000687echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000688echo "configure:689: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000689# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000690if test "${with_gcc+set}" = set; then
691 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000692
693 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000694 no) CC=cc
695 without_gcc=yes;;
696 yes) CC=gcc
697 without_gcc=no;;
698 *) CC=$withval
699 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000700 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000701else
Guido van Rossume77438c1995-09-13 18:59:59 +0000702
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000703 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000704 OSF1) CC=cc
705 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000707 case $BE_HOST_CPU in
708 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000709 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000710 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000711 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
712 CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000713 LDFLAGS="$LDFLAGS -nodup"
714
715 AR="$PWD/BeOS/ar-fake"
716 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000717 ;;
718 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000719 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000720 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000721 OPT=-O
722 # Really should use srcdir instead of PWD
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000723 AR="$PWD/BeOS/ar-fake"
724 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000725 ;;
726 *)
Fred Drake5790be12000-10-09 17:06:13 +0000727 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000728 ;;
729 esac
730 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000731 Monterey*)
732 RANLIB=:
733 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000734 *) without_gcc=no;;
735 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000736fi
737
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000738echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000739
Guido van Rossum95012191999-12-16 17:50:52 +0000740
741
742MAINOBJ=python.o
743echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000744echo "configure:745: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000745# Check whether --with-cxx or --without-cxx was given.
746if test "${with_cxx+set}" = set; then
747 withval="$with_cxx"
748
Martin v. Löwis22352952000-12-13 17:37:02 +0000749 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000750 case $withval in
751 no) CXX=
752 with_cxx=no;;
753 *) CXX=$withval
754 MAINOBJ=ccpython.o
755 with_cxx=$withval;;
756 esac
757else
758
759 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000760 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000761
762fi
763
764echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000765
766
767if test "$check_cxx" = "yes"
768then
769 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
770do
771# Extract the first word of "$ac_prog", so it can be a program name with args.
772set dummy $ac_prog; ac_word=$2
773echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000774echo "configure:775: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000775if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 if test -n "$CXX"; then
779 ac_cv_prog_CXX="$CXX" # Let the user override the test.
780else
781 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
782 ac_dummy="$PATH"
783 for ac_dir in $ac_dummy; do
784 test -z "$ac_dir" && ac_dir=.
785 if test -f $ac_dir/$ac_word; then
786 ac_cv_prog_CXX="$ac_prog"
787 break
788 fi
789 done
790 IFS="$ac_save_ifs"
791fi
792fi
793CXX="$ac_cv_prog_CXX"
794if test -n "$CXX"; then
795 echo "$ac_t""$CXX" 1>&6
796else
797 echo "$ac_t""no" 1>&6
798fi
799
800test -n "$CXX" && break
801done
802test -n "$CXX" || CXX="notfound"
803
804 if test "$CXX" = "notfound"
805 then
806 CXX=
807 else
808 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000809echo "configure:810: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000810
811ac_ext=C
812# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
813ac_cpp='$CXXCPP $CPPFLAGS'
814ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
815ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
816cross_compiling=$ac_cv_prog_cxx_cross
817
818cat > conftest.$ac_ext << EOF
819
Barry Warsawa57b89b2001-01-15 17:07:21 +0000820#line 821 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000821#include "confdefs.h"
822
823int main(){return(0);}
824EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +0000825if { (eval echo configure:826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000826 ac_cv_prog_cxx_works=yes
827 # If we can't run a trivial program, we are probably using a cross compiler.
828 if (./conftest; exit) 2>/dev/null; then
829 ac_cv_prog_cxx_cross=no
830 else
831 ac_cv_prog_cxx_cross=yes
832 fi
833else
834 echo "configure: failed program was:" >&5
835 cat conftest.$ac_ext >&5
836 ac_cv_prog_cxx_works=no
837fi
838rm -fr conftest*
839ac_ext=c
840# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
841ac_cpp='$CPP $CPPFLAGS'
842ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
843ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
844cross_compiling=$ac_cv_prog_cc_cross
845
846echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
847if test $ac_cv_prog_cxx_works = no; then
848 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
849fi
850echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000851echo "configure:852: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000852echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
853cross_compiling=$ac_cv_prog_cxx_cross
854
855 fi
856fi
857
Guido van Rossume1262332000-09-22 19:41:56 +0000858SET_CXX="CXX=$CXX"
Guido van Rossum95012191999-12-16 17:50:52 +0000859
Martin v. Löwis22352952000-12-13 17:37:02 +0000860
Guido van Rossum95012191999-12-16 17:50:52 +0000861#AC_MSG_CHECKING(CCC)
862#if test -z "$CCC"
863#then
864# case $ac_sys_system in
865# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
866# Linux*) SET_CCC="CCC= g++";;
867# *) SET_CCC=""
868# esac
869#else
870# SET_CCC="CCC= ${CCC}"
871#fi
872#AC_MSG_RESULT($SET_CCC)
873
Guido van Rossum8b131c51995-03-09 14:10:13 +0000874# If the user switches compilers, we can't believe the cache
875if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
876then
877 { echo "configure: error: cached CC is different -- throw away $cache_file
878(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
879fi
880
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881# Extract the first word of "gcc", so it can be a program name with args.
882set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000883echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000884echo "configure:885: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000885if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000886 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887else
888 if test -n "$CC"; then
889 ac_cv_prog_CC="$CC" # Let the user override the test.
890else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
892 ac_dummy="$PATH"
893 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894 test -z "$ac_dir" && ac_dir=.
895 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000897 break
898 fi
899 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000901fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902fi
903CC="$ac_cv_prog_CC"
904if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000905 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000907 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910if test -z "$CC"; then
911 # Extract the first word of "cc", so it can be a program name with args.
912set dummy cc; ac_word=$2
913echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000914echo "configure:915: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000915if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916 echo $ac_n "(cached) $ac_c" 1>&6
917else
918 if test -n "$CC"; then
919 ac_cv_prog_CC="$CC" # Let the user override the test.
920else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000921 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000923 ac_dummy="$PATH"
924 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 test -z "$ac_dir" && ac_dir=.
926 if test -f $ac_dir/$ac_word; then
927 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
928 ac_prog_rejected=yes
929 continue
930 fi
931 ac_cv_prog_CC="cc"
932 break
933 fi
934 done
935 IFS="$ac_save_ifs"
936if test $ac_prog_rejected = yes; then
937 # We found a bogon in the path, so make sure we never use it.
938 set dummy $ac_cv_prog_CC
939 shift
940 if test $# -gt 0; then
941 # We chose a different compiler from the bogus one.
942 # However, it has the same basename, so the bogon will be chosen
943 # first if we set CC to just the basename; use the full file name.
944 shift
945 set dummy "$ac_dir/$ac_word" "$@"
946 shift
947 ac_cv_prog_CC="$@"
948 fi
949fi
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
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000959 if test -z "$CC"; then
960 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000961 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000962 # Extract the first word of "cl", so it can be a program name with args.
963set dummy cl; ac_word=$2
964echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000965echo "configure:966: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000966if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000967 echo $ac_n "(cached) $ac_c" 1>&6
968else
969 if test -n "$CC"; then
970 ac_cv_prog_CC="$CC" # Let the user override the test.
971else
972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
973 ac_dummy="$PATH"
974 for ac_dir in $ac_dummy; do
975 test -z "$ac_dir" && ac_dir=.
976 if test -f $ac_dir/$ac_word; then
977 ac_cv_prog_CC="cl"
978 break
979 fi
980 done
981 IFS="$ac_save_ifs"
982fi
983fi
984CC="$ac_cv_prog_CC"
985if test -n "$CC"; then
986 echo "$ac_t""$CC" 1>&6
987else
988 echo "$ac_t""no" 1>&6
989fi
990 ;;
991 esac
992 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000993 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
994fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000996echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +0000997echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000998
999ac_ext=c
1000# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1001ac_cpp='$CPP $CPPFLAGS'
1002ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001003ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +00001004cross_compiling=$ac_cv_prog_cc_cross
1005
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001006cat > conftest.$ac_ext << EOF
1007
Barry Warsawa57b89b2001-01-15 17:07:21 +00001008#line 1009 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +00001009#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001010
Guido van Rossumf78abae1997-01-21 22:02:36 +00001011main(){return(0);}
1012EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001013if { (eval echo configure:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001014 ac_cv_prog_cc_works=yes
1015 # If we can't run a trivial program, we are probably using a cross compiler.
1016 if (./conftest; exit) 2>/dev/null; then
1017 ac_cv_prog_cc_cross=no
1018 else
1019 ac_cv_prog_cc_cross=yes
1020 fi
1021else
1022 echo "configure: failed program was:" >&5
1023 cat conftest.$ac_ext >&5
1024 ac_cv_prog_cc_works=no
1025fi
1026rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001027ac_ext=c
1028# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1029ac_cpp='$CPP $CPPFLAGS'
1030ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1031ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1032cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +00001033
1034echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1035if test $ac_cv_prog_cc_works = no; then
1036 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1037fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001038echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001039echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001040echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1041cross_compiling=$ac_cv_prog_cc_cross
1042
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001043echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001044echo "configure:1045: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001045if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001046 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047else
1048 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001050 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001051#endif
1052EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001053if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 ac_cv_prog_gcc=yes
1055else
1056 ac_cv_prog_gcc=no
1057fi
1058fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001060echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062if test $ac_cv_prog_gcc = yes; then
1063 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001064else
1065 GCC=
1066fi
1067
1068ac_test_CFLAGS="${CFLAGS+set}"
1069ac_save_CFLAGS="$CFLAGS"
1070CFLAGS=
1071echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001072echo "configure:1073: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001073if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001074 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075else
1076 echo 'void f(){}' > conftest.c
1077if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001078 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001080 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001081fi
1082rm -f conftest*
1083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085
Guido van Rossumf78abae1997-01-21 22:02:36 +00001086echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001087if test "$ac_test_CFLAGS" = set; then
1088 CFLAGS="$ac_save_CFLAGS"
1089elif test $ac_cv_prog_cc_g = yes; then
1090 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001091 CFLAGS="-g -O2"
1092 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001093 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001094 fi
1095else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001096 if test "$GCC" = yes; then
1097 CFLAGS="-O2"
1098 else
1099 CFLAGS=
1100 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101fi
1102
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001103
Guido van Rossumff555e32000-09-22 15:38:21 +00001104echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001105echo "configure:1106: checking for --with-suffix" >&5
Guido van Rossumff555e32000-09-22 15:38:21 +00001106# Check whether --with-suffix or --without-suffix was given.
1107if test "${with_suffix+set}" = set; then
1108 withval="$with_suffix"
1109
1110 case $withval in
1111 no) EXE=;;
1112 yes) EXE=.exe;;
1113 *) EXE=$withval;;
1114 esac
1115fi
1116
1117echo "$ac_t""$EXE" 1>&6
1118
Guido van Rossumdd997f71998-10-07 19:58:26 +00001119case $MACHDEP in
1120bsdos*)
1121 case $CC in
1122 gcc) CC="$CC -D_HAVE_BSDI";;
1123 esac;;
1124esac
1125
Guido van Rossum24b1e751997-08-21 02:29:16 +00001126case $ac_sys_system in
1127hp*|HP*)
1128 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001129 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001130 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001131Monterey*)
1132 case $CC in
1133 cc) CC="$CC -Wl,-Bexport";;
1134 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001135esac
1136
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001137# LDLIBRARY is the name of the library to link against (as opposed to the
1138# name of the library into which to insert object files). On systems
1139# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001140# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1141# shared (i.e., DLL) library.
1142
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001143
1144
1145LDLIBRARY=''
Guido van Rossumaef734b2001-01-10 21:09:12 +00001146SET_DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001147
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001148# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001149# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001150# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001151
1152echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001153echo "configure:1154: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001154if test -z "$LINKCC" -a ! -z "$CXX"
1155then
1156 LINKCC="$CXX"
1157fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001158if test -z "$LINKCC"
1159then
1160 case $ac_sys_system in
1161 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001162 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001163 dgux*)
1164 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001165 Monterey64*)
1166 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001167 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001168 esac
1169fi
1170echo "$ac_t""$LINKCC" 1>&6
1171
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001172echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001173echo "configure:1174: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001174
1175# NeXT framework builds require that the 'ar' library be converted into
1176# a bundle using libtool.
1177if test "$with_next_framework"
1178then
1179 LDLIBRARY='libpython$(VERSION).dylib'
1180fi
1181
1182# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001183case $MACHDEP in
1184dguxR4)
1185 LDLIBRARY='libpython$(VERSION).so'
1186 OPT="$OPT -pic"
1187 ;;
1188beos*)
1189 LDLIBRARY='libpython$(VERSION).so'
1190 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001191cygwin*)
1192 LDLIBRARY='libpython$(VERSION).dll.a'
1193 SET_DLLLIBRARY='DLLLIBRARY= $(basename $(LDLIBRARY))'
1194 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001195esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001196echo "$ac_t""$LDLIBRARY" 1>&6
1197
1198# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1199if test -z "$LDLIBRARY"
1200then
1201 LDLIBRARY='libpython$(VERSION).a'
1202 MAKE_LDLIBRARY="true"
1203else
Guido van Rossumaef734b2001-01-10 21:09:12 +00001204 case $MACHDEP in
1205 cygwin*) MAKE_LDLIBRARY='$(MAKE) -C Modules ../$(DLLLIBRARY)';;
1206 *) MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)';;
1207 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001208fi
1209
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210# Extract the first word of "ranlib", so it can be a program name with args.
1211set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001212echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001213echo "configure:1214: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001214if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001215 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
1217 if test -n "$RANLIB"; then
1218 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1219else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001220 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1221 ac_dummy="$PATH"
1222 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 test -z "$ac_dir" && ac_dir=.
1224 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226 break
1227 fi
1228 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232fi
1233RANLIB="$ac_cv_prog_RANLIB"
1234if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001235 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001237 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001239
1240
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241for ac_prog in ar aal
1242do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243# Extract the first word of "$ac_prog", so it can be a program name with args.
1244set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001245echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001246echo "configure:1247: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001247if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001248 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249else
1250 if test -n "$AR"; then
1251 ac_cv_prog_AR="$AR" # Let the user override the test.
1252else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001253 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1254 ac_dummy="$PATH"
1255 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 test -z "$ac_dir" && ac_dir=.
1257 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001258 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 break
1260 fi
1261 done
1262 IFS="$ac_save_ifs"
1263fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001264fi
1265AR="$ac_cv_prog_AR"
1266if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001267 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001269 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271
1272test -n "$AR" && break
1273done
1274test -n "$AR" || AR="ar"
1275
1276
Guido van Rossumda88dad1995-01-26 00:46:29 +00001277
1278
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001279# Install just never works :-(
1280if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001281then
1282 INSTALL=cp
1283 INSTALL_PROGRAM=cp
1284 INSTALL_DATA=cp
1285else
1286 INSTALL_PROGRAM="$INSTALL"
1287 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001288fi
1289
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001290# Not every filesystem supports hard links
1291
1292if test -z "$LN" ; then
1293 case $ac_sys_system in
1294 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001295 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001296 *) LN=ln;;
1297 esac
1298fi
1299
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001300# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001302if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001304 case $GCC in
1305 yes)
1306 case $ac_cv_prog_cc_g in
Greg Warda1c4da22000-11-07 15:44:21 +00001307 yes) OPT="-g -O2 -Wall -Wstrict-prototypes -fPIC";;
1308 *) OPT="-O2 -Wall -Wstrict-prototypes -fPIC";;
Guido van Rossumedca74a1997-07-18 23:29:40 +00001309 esac
1310 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001311 *) OPT="-O";;
1312 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001313fi
1314
Trent Mick635f6fb2000-08-23 21:33:05 +00001315# The current (beta) Monterey compiler dies with optimizations
1316case $ac_sys_system in
1317Monterey*) OPT="";;
1318esac
1319
Guido van Rossumaef734b2001-01-10 21:09:12 +00001320# Cygwin does not need PIC compiler option so remove it to prevent warnings
1321case $ac_sys_system in
1322CYGWIN*) OPT="`echo $OPT | sed 's/ *-fPIC//'`";;
1323esac
1324
Guido van Rossum563e7081996-09-10 18:20:48 +00001325if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001326then
1327 OPT="$OPT $ac_arch_flags"
1328fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001330echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001331echo "configure:1332: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332# On Suns, sometimes $CPP names a directory.
1333if test -n "$CPP" && test -d "$CPP"; then
1334 CPP=
1335fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001337if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001338 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339else
1340 # This must be in double quotes, not single quotes, because CPP may get
1341 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343 # On the NeXT, cc -E runs the code through the compiler's parser,
1344 # not just through cpp.
1345 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001346#line 1347 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001348#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001349Syntax Error
1350EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001351ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Barry Warsawa57b89b2001-01-15 17:07:21 +00001352{ (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001353ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1354if test -z "$ac_err"; then
1355 :
1356else
1357 echo "$ac_err" >&5
1358 echo "configure: failed program was:" >&5
1359 cat conftest.$ac_ext >&5
1360 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001361 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001362 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001363#line 1364 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001364#include "confdefs.h"
1365#include <assert.h>
1366Syntax Error
1367EOF
1368ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Barry Warsawa57b89b2001-01-15 17:07:21 +00001369{ (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001370ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 :
1373else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001375 echo "configure: failed program was:" >&5
1376 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001378 CPP="${CC-cc} -nologo -E"
1379 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001380#line 1381 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001381#include "confdefs.h"
1382#include <assert.h>
1383Syntax Error
1384EOF
1385ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Barry Warsawa57b89b2001-01-15 17:07:21 +00001386{ (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001387ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1388if test -z "$ac_err"; then
1389 :
1390else
1391 echo "$ac_err" >&5
1392 echo "configure: failed program was:" >&5
1393 cat conftest.$ac_ext >&5
1394 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001395 CPP=/lib/cpp
1396fi
1397rm -f conftest*
1398fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001399rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001400fi
1401rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001403fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001404 CPP="$ac_cv_prog_CPP"
1405else
1406 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001407fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001408echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001409
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001410echo $ac_n "checking for AIX""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001411echo "configure:1412: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001412cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001413#line 1414 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001414#include "confdefs.h"
1415#ifdef _AIX
1416 yes
1417#endif
1418
1419EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1421 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001422 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001423 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001424#define _ALL_SOURCE 1
1425EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001426
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001427else
1428 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001429 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001430fi
1431rm -f conftest*
1432
1433
Guido van Rossumf78abae1997-01-21 22:02:36 +00001434ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001435echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001436echo "configure:1437: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001437if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001438 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001439else
1440 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001441#line 1442 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001442#include "confdefs.h"
1443#include <minix/config.h>
1444EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001445ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Barry Warsawa57b89b2001-01-15 17:07:21 +00001446{ (eval echo configure:1447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001447ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001448if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001449 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001451else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001452 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001453 echo "configure: failed program was:" >&5
1454 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455 rm -rf conftest*
1456 eval "ac_cv_header_$ac_safe=no"
1457fi
1458rm -f conftest*
1459fi
1460if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001461 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001462 MINIX=yes
1463else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001464 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001465MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001466fi
1467
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001468if test "$MINIX" = yes; then
1469 cat >> confdefs.h <<\EOF
1470#define _POSIX_SOURCE 1
1471EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001472
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001473 cat >> confdefs.h <<\EOF
1474#define _POSIX_1_SOURCE 2
1475EOF
1476
1477 cat >> confdefs.h <<\EOF
1478#define _MINIX 1
1479EOF
1480
1481fi
1482
Guido van Rossumda88dad1995-01-26 00:46:29 +00001483
Guido van Rossum91922671997-10-09 20:24:13 +00001484echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001485echo "configure:1486: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001486if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001487 echo $ac_n "(cached) $ac_c" 1>&6
1488else
1489 ac_save_cc="$CC"
1490CC="$CC -OPT:Olimit=0"
1491if test "$cross_compiling" = yes; then
1492 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1493else
1494 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001495#line 1496 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001496#include "confdefs.h"
1497int main() { return 0; }
1498EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001499if { (eval echo configure:1500: \"$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 +00001500then
1501 ac_cv_opt_olimit_ok=yes
1502else
1503 echo "configure: failed program was:" >&5
1504 cat conftest.$ac_ext >&5
1505 rm -fr conftest*
1506 ac_cv_opt_olimit_ok=no
1507fi
1508rm -fr conftest*
1509fi
1510
1511CC="$ac_save_cc"
1512fi
1513
1514echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001515if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001516 case $ac_sys_system in
1517 Darwin*) OPT="$OPT" ;;
1518 *) OPT="$OPT -OPT:Olimit=0";;
1519 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001520else
1521 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001522echo "configure:1523: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001523 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001524 echo $ac_n "(cached) $ac_c" 1>&6
1525else
1526 ac_save_cc="$CC"
1527 CC="$CC -Olimit 1500"
1528 if test "$cross_compiling" = yes; then
1529 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1530else
1531 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001532#line 1533 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001533#include "confdefs.h"
1534int main() { return 0; }
1535EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001536if { (eval echo configure:1537: \"$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 +00001537then
1538 ac_cv_olimit_ok=yes
1539else
1540 echo "configure: failed program was:" >&5
1541 cat conftest.$ac_ext >&5
1542 rm -fr conftest*
1543 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001544fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001545rm -fr conftest*
1546fi
1547
1548 CC="$ac_save_cc"
1549fi
1550
1551 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1552 if test $ac_cv_olimit_ok = yes; then
1553 OPT="$OPT -Olimit 1500"
1554 fi
1555fi
1556
Guido van Rossum84e7b241996-08-19 21:59:00 +00001557
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001558# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001559echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001560echo "configure:1561: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001561if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001562 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001563else
1564 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001565#line 1566 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566#include "confdefs.h"
1567#include <stdlib.h>
1568#include <stdarg.h>
1569#include <string.h>
1570#include <float.h>
1571EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001572ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Barry Warsawa57b89b2001-01-15 17:07:21 +00001573{ (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001574ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001575if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001576 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577 ac_cv_header_stdc=yes
1578else
1579 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001580 echo "configure: failed program was:" >&5
1581 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001582 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583 ac_cv_header_stdc=no
1584fi
1585rm -f conftest*
1586
1587if test $ac_cv_header_stdc = yes; then
1588 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1589cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001590#line 1591 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001591#include "confdefs.h"
1592#include <string.h>
1593EOF
1594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1595 egrep "memchr" >/dev/null 2>&1; then
1596 :
1597else
1598 rm -rf conftest*
1599 ac_cv_header_stdc=no
1600fi
1601rm -f conftest*
1602
1603fi
1604
1605if test $ac_cv_header_stdc = yes; then
1606 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1607cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001608#line 1609 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609#include "confdefs.h"
1610#include <stdlib.h>
1611EOF
1612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1613 egrep "free" >/dev/null 2>&1; then
1614 :
1615else
1616 rm -rf conftest*
1617 ac_cv_header_stdc=no
1618fi
1619rm -f conftest*
1620
1621fi
1622
1623if test $ac_cv_header_stdc = yes; then
1624 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1625if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001626 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001627else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001628 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001629#line 1630 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001630#include "confdefs.h"
1631#include <ctype.h>
1632#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1633#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001635int main () { int i; for (i = 0; i < 256; i++)
1636if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1637exit (0); }
1638
1639EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001640if { (eval echo configure:1641: \"$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 +00001641then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642 :
1643else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001644 echo "configure: failed program was:" >&5
1645 cat conftest.$ac_ext >&5
1646 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001647 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001648fi
1649rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001651
1652fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001655echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001656if test $ac_cv_header_stdc = yes; then
1657 cat >> confdefs.h <<\EOF
1658#define STDC_HEADERS 1
1659EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001660
1661fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001662
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001663for 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 +00001664signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001665sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001666sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001667sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1668ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001669do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001670ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001671echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001672echo "configure:1673: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001673if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001674 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001675else
1676 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001677#line 1678 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001678#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001679#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001680EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001681ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Barry Warsawa57b89b2001-01-15 17:07:21 +00001682{ (eval echo configure:1683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001683ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001684if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001685 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686 eval "ac_cv_header_$ac_safe=yes"
1687else
1688 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001689 echo "configure: failed program was:" >&5
1690 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691 rm -rf conftest*
1692 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001693fi
1694rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001695fi
1696if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001697 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001698 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699 cat >> confdefs.h <<EOF
1700#define $ac_tr_hdr 1
1701EOF
1702
1703else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001704 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001706done
1707
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708ac_header_dirent=no
1709for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1710do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001711ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001712echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001713echo "configure:1714: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001714if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001715 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001716else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001718#line 1719 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001719#include "confdefs.h"
1720#include <sys/types.h>
1721#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001722int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001723DIR *dirp = 0;
1724; return 0; }
1725EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001726if { (eval echo configure:1727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727 rm -rf conftest*
1728 eval "ac_cv_header_dirent_$ac_safe=yes"
1729else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001730 echo "configure: failed program was:" >&5
1731 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001732 rm -rf conftest*
1733 eval "ac_cv_header_dirent_$ac_safe=no"
1734fi
1735rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001736fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001737if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001738 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001739 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001740 cat >> confdefs.h <<EOF
1741#define $ac_tr_hdr 1
1742EOF
1743 ac_header_dirent=$ac_hdr; break
1744else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001745 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001746fi
1747done
1748# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1749if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001750echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001751echo "configure:1752: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001752ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001753if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001754 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755else
1756 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001757LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001758cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001759#line 1760 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001760#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001761/* Override any gcc2 internal prototype to avoid an error. */
1762/* We use char because int might match the return type of a gcc2
1763 builtin and then its argument prototype would still apply. */
1764char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765
Guido van Rossumf78abae1997-01-21 22:02:36 +00001766int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767opendir()
1768; return 0; }
1769EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001770if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001771 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001772 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001773else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001774 echo "configure: failed program was:" >&5
1775 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001776 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001777 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779rm -f conftest*
1780LIBS="$ac_save_LIBS"
1781
1782fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001783if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001784 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001785 LIBS="$LIBS -ldir"
1786else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001787 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788fi
1789
1790else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001791echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001792echo "configure:1793: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001793ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001794if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001795 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796else
1797 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001798LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001800#line 1801 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001802/* Override any gcc2 internal prototype to avoid an error. */
1803/* We use char because int might match the return type of a gcc2
1804 builtin and then its argument prototype would still apply. */
1805char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossumf78abae1997-01-21 22:02:36 +00001807int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808opendir()
1809; return 0; }
1810EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001811if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001813 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001814else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001815 echo "configure: failed program was:" >&5
1816 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001818 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001819fi
1820rm -f conftest*
1821LIBS="$ac_save_LIBS"
1822
1823fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001824if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001825 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001826 LIBS="$LIBS -lx"
1827else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001828 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001829fi
1830
1831fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001832
1833
1834# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001835was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001836echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001837echo "configure:1838: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001838cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001839#line 1840 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840#include "confdefs.h"
1841#include <time.h>
1842EOF
1843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1844 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001845 rm -rf conftest*
1846 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001847else
1848 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001849 cat >> confdefs.h <<\EOF
1850#define clock_t long
1851EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001852
1853fi
1854rm -f conftest*
1855
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001856echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001857
Guido van Rossum84e7b241996-08-19 21:59:00 +00001858# Add some code to confdefs.h so that the test for off_t works on SCO
1859cat >> confdefs.h <<\EOF
1860#if defined(SCO_DS)
1861#undef _OFF_T
1862#endif
1863EOF
1864
Guido van Rossumef2255b2000-03-10 22:30:29 +00001865# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001866echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001867echo "configure:1868: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001868if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001869 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001870else
1871 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001872#line 1873 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001873#include "confdefs.h"
1874#include <sys/types.h>
1875#if STDC_HEADERS
1876#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001877#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878#endif
1879EOF
1880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001881 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 +00001882 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001883 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001884else
1885 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001886 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001887fi
1888rm -f conftest*
1889
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001891echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1892if test $ac_cv_type_mode_t = no; then
1893 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001894#define mode_t int
1895EOF
1896
1897fi
1898
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001899echo $ac_n "checking for off_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001900echo "configure:1901: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001901if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001902 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001903else
1904 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001905#line 1906 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001906#include "confdefs.h"
1907#include <sys/types.h>
1908#if STDC_HEADERS
1909#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001910#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001911#endif
1912EOF
1913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001914 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 +00001915 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001916 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001917else
1918 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001919 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001920fi
1921rm -f conftest*
1922
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001924echo "$ac_t""$ac_cv_type_off_t" 1>&6
1925if test $ac_cv_type_off_t = no; then
1926 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001927#define off_t long
1928EOF
1929
1930fi
1931
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001932echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001933echo "configure:1934: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001934if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001935 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001936else
1937 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001938#line 1939 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939#include "confdefs.h"
1940#include <sys/types.h>
1941#if STDC_HEADERS
1942#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001943#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001944#endif
1945EOF
1946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001947 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 +00001948 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001949 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001950else
1951 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001952 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001953fi
1954rm -f conftest*
1955
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001956fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001957echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1958if test $ac_cv_type_pid_t = no; then
1959 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001960#define pid_t int
1961EOF
1962
1963fi
1964
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001965echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00001966echo "configure:1967: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001967if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001968 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001969else
1970 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001971#line 1972 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001972#include "confdefs.h"
1973#include <sys/types.h>
1974#include <signal.h>
1975#ifdef signal
1976#undef signal
1977#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001978#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001979extern "C" void (*signal (int, void (*)(int)))(int);
1980#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001981void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001982#endif
1983
Guido van Rossumf78abae1997-01-21 22:02:36 +00001984int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001985int i;
1986; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001987EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00001988if { (eval echo configure:1989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001989 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001990 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001991else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001992 echo "configure: failed program was:" >&5
1993 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001994 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001995 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001996fi
1997rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001998fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001999
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002000echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002001cat >> confdefs.h <<EOF
2002#define RETSIGTYPE $ac_cv_type_signal
2003EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002006echo $ac_n "checking for size_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002007echo "configure:2008: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002008if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002009 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002010else
2011 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002012#line 2013 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002013#include "confdefs.h"
2014#include <sys/types.h>
2015#if STDC_HEADERS
2016#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002017#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002018#endif
2019EOF
2020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002021 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 +00002022 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002023 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002024else
2025 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002026 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002027fi
2028rm -f conftest*
2029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002030fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002031echo "$ac_t""$ac_cv_type_size_t" 1>&6
2032if test $ac_cv_type_size_t = no; then
2033 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034#define size_t unsigned
2035EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002036
2037fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002038
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002039echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002040echo "configure:2041: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002041if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002042 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002043else
2044 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002045#line 2046 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002046#include "confdefs.h"
2047#include <sys/types.h>
2048EOF
2049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2050 egrep "uid_t" >/dev/null 2>&1; then
2051 rm -rf conftest*
2052 ac_cv_type_uid_t=yes
2053else
2054 rm -rf conftest*
2055 ac_cv_type_uid_t=no
2056fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002057rm -f conftest*
2058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002059fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002060
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002061echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002062if test $ac_cv_type_uid_t = no; then
2063 cat >> confdefs.h <<\EOF
2064#define uid_t int
2065EOF
2066
2067 cat >> confdefs.h <<\EOF
2068#define gid_t int
2069EOF
2070
2071fi
2072
Guido van Rossum627b2d71993-12-24 10:39:16 +00002073
Guido van Rossumef2255b2000-03-10 22:30:29 +00002074# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002075echo $ac_n "checking size of int""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002076echo "configure:2077: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002077if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002078 echo $ac_n "(cached) $ac_c" 1>&6
2079else
2080 if test "$cross_compiling" = yes; then
2081 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2082else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002083 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002084#line 2085 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002085#include "confdefs.h"
2086#include <stdio.h>
2087main()
2088{
2089 FILE *f=fopen("conftestval", "w");
2090 if (!f) exit(1);
2091 fprintf(f, "%d\n", sizeof(int));
2092 exit(0);
2093}
2094EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002095if { (eval echo configure:2096: \"$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 +00002096then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002097 ac_cv_sizeof_int=`cat conftestval`
2098else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002099 echo "configure: failed program was:" >&5
2100 cat conftest.$ac_ext >&5
2101 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002102 ac_cv_sizeof_int=0
2103fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002104rm -fr conftest*
2105fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002106
2107fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002108echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2109cat >> confdefs.h <<EOF
2110#define SIZEOF_INT $ac_cv_sizeof_int
2111EOF
2112
2113
2114echo $ac_n "checking size of long""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002115echo "configure:2116: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002116if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002117 echo $ac_n "(cached) $ac_c" 1>&6
2118else
2119 if test "$cross_compiling" = yes; then
2120 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2121else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002122 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002123#line 2124 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002124#include "confdefs.h"
2125#include <stdio.h>
2126main()
2127{
2128 FILE *f=fopen("conftestval", "w");
2129 if (!f) exit(1);
2130 fprintf(f, "%d\n", sizeof(long));
2131 exit(0);
2132}
2133EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002134if { (eval echo configure:2135: \"$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 +00002135then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002136 ac_cv_sizeof_long=`cat conftestval`
2137else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002138 echo "configure: failed program was:" >&5
2139 cat conftest.$ac_ext >&5
2140 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002141 ac_cv_sizeof_long=0
2142fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002143rm -fr conftest*
2144fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002145
2146fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002147echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2148cat >> confdefs.h <<EOF
2149#define SIZEOF_LONG $ac_cv_sizeof_long
2150EOF
2151
2152
Guido van Rossumad678af1998-10-02 14:42:15 +00002153echo $ac_n "checking size of void *""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002154echo "configure:2155: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002155if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002156 echo $ac_n "(cached) $ac_c" 1>&6
2157else
2158 if test "$cross_compiling" = yes; then
2159 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2160else
2161 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002162#line 2163 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002163#include "confdefs.h"
2164#include <stdio.h>
2165main()
2166{
2167 FILE *f=fopen("conftestval", "w");
2168 if (!f) exit(1);
2169 fprintf(f, "%d\n", sizeof(void *));
2170 exit(0);
2171}
2172EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002173if { (eval echo configure:2174: \"$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 +00002174then
2175 ac_cv_sizeof_void_p=`cat conftestval`
2176else
2177 echo "configure: failed program was:" >&5
2178 cat conftest.$ac_ext >&5
2179 rm -fr conftest*
2180 ac_cv_sizeof_void_p=0
2181fi
2182rm -fr conftest*
2183fi
2184
2185fi
2186echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2187cat >> confdefs.h <<EOF
2188#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2189EOF
2190
2191
Guido van Rossumef2255b2000-03-10 22:30:29 +00002192echo $ac_n "checking size of char""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002193echo "configure:2194: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002194if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002195 echo $ac_n "(cached) $ac_c" 1>&6
2196else
2197 if test "$cross_compiling" = yes; then
2198 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2199else
2200 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002201#line 2202 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002202#include "confdefs.h"
2203#include <stdio.h>
2204main()
2205{
2206 FILE *f=fopen("conftestval", "w");
2207 if (!f) exit(1);
2208 fprintf(f, "%d\n", sizeof(char));
2209 exit(0);
2210}
2211EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002212if { (eval echo configure:2213: \"$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 +00002213then
2214 ac_cv_sizeof_char=`cat conftestval`
2215else
2216 echo "configure: failed program was:" >&5
2217 cat conftest.$ac_ext >&5
2218 rm -fr conftest*
2219 ac_cv_sizeof_char=0
2220fi
2221rm -fr conftest*
2222fi
2223
2224fi
2225echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2226cat >> confdefs.h <<EOF
2227#define SIZEOF_CHAR $ac_cv_sizeof_char
2228EOF
2229
2230
2231echo $ac_n "checking size of short""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002232echo "configure:2233: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002233if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002234 echo $ac_n "(cached) $ac_c" 1>&6
2235else
2236 if test "$cross_compiling" = yes; then
2237 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2238else
2239 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002240#line 2241 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002241#include "confdefs.h"
2242#include <stdio.h>
2243main()
2244{
2245 FILE *f=fopen("conftestval", "w");
2246 if (!f) exit(1);
2247 fprintf(f, "%d\n", sizeof(short));
2248 exit(0);
2249}
2250EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002251if { (eval echo configure:2252: \"$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 +00002252then
2253 ac_cv_sizeof_short=`cat conftestval`
2254else
2255 echo "configure: failed program was:" >&5
2256 cat conftest.$ac_ext >&5
2257 rm -fr conftest*
2258 ac_cv_sizeof_short=0
2259fi
2260rm -fr conftest*
2261fi
2262
2263fi
2264echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2265cat >> confdefs.h <<EOF
2266#define SIZEOF_SHORT $ac_cv_sizeof_short
2267EOF
2268
2269
2270echo $ac_n "checking size of float""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002271echo "configure:2272: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002272if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002273 echo $ac_n "(cached) $ac_c" 1>&6
2274else
2275 if test "$cross_compiling" = yes; then
2276 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2277else
2278 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002279#line 2280 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002280#include "confdefs.h"
2281#include <stdio.h>
2282main()
2283{
2284 FILE *f=fopen("conftestval", "w");
2285 if (!f) exit(1);
2286 fprintf(f, "%d\n", sizeof(float));
2287 exit(0);
2288}
2289EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002290if { (eval echo configure:2291: \"$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 +00002291then
2292 ac_cv_sizeof_float=`cat conftestval`
2293else
2294 echo "configure: failed program was:" >&5
2295 cat conftest.$ac_ext >&5
2296 rm -fr conftest*
2297 ac_cv_sizeof_float=0
2298fi
2299rm -fr conftest*
2300fi
2301
2302fi
2303echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2304cat >> confdefs.h <<EOF
2305#define SIZEOF_FLOAT $ac_cv_sizeof_float
2306EOF
2307
2308
2309echo $ac_n "checking size of double""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002310echo "configure:2311: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002311if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002312 echo $ac_n "(cached) $ac_c" 1>&6
2313else
2314 if test "$cross_compiling" = yes; then
2315 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2316else
2317 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002318#line 2319 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002319#include "confdefs.h"
2320#include <stdio.h>
2321main()
2322{
2323 FILE *f=fopen("conftestval", "w");
2324 if (!f) exit(1);
2325 fprintf(f, "%d\n", sizeof(double));
2326 exit(0);
2327}
2328EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002329if { (eval echo configure:2330: \"$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 +00002330then
2331 ac_cv_sizeof_double=`cat conftestval`
2332else
2333 echo "configure: failed program was:" >&5
2334 cat conftest.$ac_ext >&5
2335 rm -fr conftest*
2336 ac_cv_sizeof_double=0
2337fi
2338rm -fr conftest*
2339fi
2340
2341fi
2342echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2343cat >> confdefs.h <<EOF
2344#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2345EOF
2346
2347
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002348echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002349echo "configure:2350: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002350if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002351 echo $ac_n "(cached) $ac_c" 1>&6
2352else
2353 if test "$cross_compiling" = yes; then
2354 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2355else
2356 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002357#line 2358 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002358#include "confdefs.h"
2359#include <stdio.h>
2360main()
2361{
2362 FILE *f=fopen("conftestval", "w");
2363 if (!f) exit(1);
2364 fprintf(f, "%d\n", sizeof(fpos_t));
2365 exit(0);
2366}
2367EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002368if { (eval echo configure:2369: \"$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 +00002369then
2370 ac_cv_sizeof_fpos_t=`cat conftestval`
2371else
2372 echo "configure: failed program was:" >&5
2373 cat conftest.$ac_ext >&5
2374 rm -fr conftest*
2375 ac_cv_sizeof_fpos_t=0
2376fi
2377rm -fr conftest*
2378fi
2379
2380fi
2381echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2382cat >> confdefs.h <<EOF
2383#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2384EOF
2385
2386
Guido van Rossum0a516c91994-09-12 10:58:40 +00002387
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002388echo $ac_n "checking for long long support""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002389echo "configure:2390: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002390have_long_long=no
2391cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002392#line 2393 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002393#include "confdefs.h"
2394
2395int main() {
2396long long x; x = (long long)0;
2397; return 0; }
2398EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002399if { (eval echo configure:2400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002400 rm -rf conftest*
2401 cat >> confdefs.h <<\EOF
2402#define HAVE_LONG_LONG 1
2403EOF
2404 have_long_long=yes
2405else
2406 echo "configure: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2408fi
2409rm -f conftest*
2410echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002411if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002412echo $ac_n "checking size of long long""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002413echo "configure:2414: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002414if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002415 echo $ac_n "(cached) $ac_c" 1>&6
2416else
2417 if test "$cross_compiling" = yes; then
2418 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2419else
2420 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002421#line 2422 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002422#include "confdefs.h"
2423#include <stdio.h>
2424main()
2425{
2426 FILE *f=fopen("conftestval", "w");
2427 if (!f) exit(1);
2428 fprintf(f, "%d\n", sizeof(long long));
2429 exit(0);
2430}
2431EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002432if { (eval echo configure:2433: \"$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 +00002433then
2434 ac_cv_sizeof_long_long=`cat conftestval`
2435else
2436 echo "configure: failed program was:" >&5
2437 cat conftest.$ac_ext >&5
2438 rm -fr conftest*
2439 ac_cv_sizeof_long_long=0
2440fi
2441rm -fr conftest*
2442fi
2443
2444fi
2445echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2446cat >> confdefs.h <<EOF
2447#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2448EOF
2449
2450
2451fi
2452
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002453echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002454echo "configure:2455: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002455have_uintptr_t=no
2456cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002457#line 2458 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002458#include "confdefs.h"
2459
2460int main() {
2461uintptr_t x; x = (uintptr_t)0;
2462; return 0; }
2463EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002464if { (eval echo configure:2465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002465 rm -rf conftest*
2466 cat >> confdefs.h <<\EOF
2467#define HAVE_UINTPTR_T 1
2468EOF
2469 have_uintptr_t=yes
2470else
2471 echo "configure: failed program was:" >&5
2472 cat conftest.$ac_ext >&5
2473fi
2474rm -f conftest*
2475echo "$ac_t""$have_uintptr_t" 1>&6
2476if test "$have_uintptr_t" = yes ; then
2477echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002478echo "configure:2479: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002479if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002480 echo $ac_n "(cached) $ac_c" 1>&6
2481else
2482 if test "$cross_compiling" = yes; then
2483 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2484else
2485 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002486#line 2487 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002487#include "confdefs.h"
2488#include <stdio.h>
2489main()
2490{
2491 FILE *f=fopen("conftestval", "w");
2492 if (!f) exit(1);
2493 fprintf(f, "%d\n", sizeof(uintptr_t));
2494 exit(0);
2495}
2496EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002497if { (eval echo configure:2498: \"$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 +00002498then
2499 ac_cv_sizeof_uintptr_t=`cat conftestval`
2500else
2501 echo "configure: failed program was:" >&5
2502 cat conftest.$ac_ext >&5
2503 rm -fr conftest*
2504 ac_cv_sizeof_uintptr_t=0
2505fi
2506rm -fr conftest*
2507fi
2508
2509fi
2510echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2511cat >> confdefs.h <<EOF
2512#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2513EOF
2514
2515
2516fi
2517
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002518# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2519echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002520echo "configure:2521: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002521if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +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
2527 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002528#line 2529 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002529#include "confdefs.h"
2530#include <stdio.h>
2531#include <sys/types.h>
2532main()
2533{
2534 FILE *f=fopen("conftestval", "w");
2535 if (!f) exit(1);
2536 fprintf(f, "%d\n", sizeof(off_t));
2537 exit(0);
2538}
2539EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002540if { (eval echo configure:2541: \"$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 +00002541then
2542 ac_cv_sizeof_off_t=`cat conftestval`
2543else
2544 echo "configure: failed program was:" >&5
2545 cat conftest.$ac_ext >&5
2546 rm -fr conftest*
2547 ac_cv_sizeof_off_t=0
2548fi
2549rm -fr conftest*
2550fi
2551
2552
2553fi
2554
2555echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2556cat >> confdefs.h <<EOF
2557#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2558EOF
2559
2560
2561echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002562echo "configure:2563: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002563if test "$have_long_long" = yes -a \
2564 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2565 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002566 cat >> confdefs.h <<\EOF
2567#define HAVE_LARGEFILE_SUPPORT 1
2568EOF
2569
2570 echo "$ac_t""yes" 1>&6
2571else
2572 echo "$ac_t""no" 1>&6
2573fi
2574
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002575# AC_CHECK_SIZEOF() doesn't include <time.h>.
2576echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002577echo "configure:2578: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002578if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002579 echo $ac_n "(cached) $ac_c" 1>&6
2580else
2581 if test "$cross_compiling" = yes; then
2582 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2583else
2584 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002585#line 2586 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002586#include "confdefs.h"
2587#include <stdio.h>
2588#include <time.h>
2589main()
2590{
2591 FILE *f=fopen("conftestval", "w");
2592 if (!f) exit(1);
2593 fprintf(f, "%d\n", sizeof(time_t));
2594 exit(0);
2595}
2596EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002597if { (eval echo configure:2598: \"$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 +00002598then
2599 ac_cv_sizeof_time_t=`cat conftestval`
2600else
2601 echo "configure: failed program was:" >&5
2602 cat conftest.$ac_ext >&5
2603 rm -fr conftest*
2604 ac_cv_sizeof_time_t=0
2605fi
2606rm -fr conftest*
2607fi
2608
2609
2610fi
2611
2612echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2613cat >> confdefs.h <<EOF
2614#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2615EOF
2616
2617
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002618
Trent Mick635f6fb2000-08-23 21:33:05 +00002619# if have pthread_t then define SIZEOF_PTHREAD_T
2620echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002621echo "configure:2622: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002622have_pthread_t=no
2623cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002624#line 2625 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002625#include "confdefs.h"
2626#include <pthread.h>
2627int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002628pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002629; return 0; }
2630EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002631if { (eval echo configure:2632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002632 rm -rf conftest*
2633 have_pthread_t=yes
2634else
2635 echo "configure: failed program was:" >&5
2636 cat conftest.$ac_ext >&5
2637fi
2638rm -f conftest*
2639echo "$ac_t""$have_pthread_t" 1>&6
2640if test "$have_pthread_t" = yes ; then
2641 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2642 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002643echo "configure:2644: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002644 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002645 echo $ac_n "(cached) $ac_c" 1>&6
2646else
2647 if test "$cross_compiling" = yes; then
2648 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2649else
2650 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002651#line 2652 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002652#include "confdefs.h"
2653#include <stdio.h>
2654 #include <pthread.h>
2655 main()
2656 {
2657 FILE *f=fopen("conftestval", "w");
2658 if (!f) exit(1);
2659 fprintf(f, "%d\n", sizeof(pthread_t));
2660 exit(0);
2661 }
2662EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002663if { (eval echo configure:2664: \"$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 +00002664then
2665 ac_cv_sizeof_pthread_t=`cat conftestval`
2666else
2667 echo "configure: failed program was:" >&5
2668 cat conftest.$ac_ext >&5
2669 rm -fr conftest*
2670 ac_cv_sizeof_pthread_t=0
2671fi
2672rm -fr conftest*
2673fi
2674
2675
2676fi
2677
2678 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2679 cat >> confdefs.h <<EOF
2680#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2681EOF
2682
2683fi
2684
2685
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002686# Minor variations in building a framework between NextStep versions 4 and 5
2687
2688case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002689 Darwin/*)
2690 ns_undef_sym='_environ'
2691 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002692 next/4*)
2693 ns_undef_sym='__environ'
2694 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2695 next/5*)
2696 ns_undef_sym='_environ'
2697 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2698esac
2699
2700echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002701echo "configure:2702: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002702if test "$with_next_framework"
2703then
2704 OPT="$OPT -fno-common"
2705 # -U __environ is needed since bundles don't have access
2706 # to crt0 when built but will always be linked against it
2707 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2708 cat >> confdefs.h <<\EOF
2709#define WITH_NEXT_FRAMEWORK 1
2710EOF
2711
2712 echo "$ac_t""yes" 1>&6
2713else
2714 echo "$ac_t""no" 1>&6
2715fi
2716
2717echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002718echo "configure:2719: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002719if test "$with_next_framework" -o "$with_dyld"
2720then
2721 if test "$with_dyld"
2722 then
2723 echo "$ac_t""yes" 1>&6
2724 else
2725 echo "$ac_t""required for framework build" 1>&6
2726 fi
2727 cat >> confdefs.h <<\EOF
2728#define WITH_DYLD 1
2729EOF
2730
2731 ns_dyld='set'
2732else
2733 echo "$ac_t""no" 1>&6
2734fi
2735
Guido van Rossum0a516c91994-09-12 10:58:40 +00002736# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002737
2738
2739
2740
Guido van Rossum0a516c91994-09-12 10:58:40 +00002741# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002742# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002743echo $ac_n "checking SO""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002744echo "configure:2745: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002745if test -z "$SO"
2746then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002748 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002749 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00002750 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002751 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002752fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002753echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002754# LDSHARED is the ld *command* used to create shared library
2755# -- "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 +00002756# (Shared libraries in this instance are shared modules to be loaded into
2757# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002758echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002759echo "configure:2760: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002760if test -z "$LDSHARED"
2761then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002763 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002764 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002765 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002766 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002767 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002768 SunOS/5*)
2769 if test "$GCC" = "yes"
Greg Warda1c4da22000-11-07 15:44:21 +00002770 then LDSHARED='$(CC) -shared'
Greg Ward57c9a662000-05-26 12:22:54 +00002771 else LDSHARED="ld -G";
2772 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002773 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002774 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2775 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002776 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002777 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00002778 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002779 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2780 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002781 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002782 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2783 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002784 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002785 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002786 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002787 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002788 NetBSD*)
2789 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2790 then
2791 LDSHARED="cc -shared"
2792 else
2793 LDSHARED="ld -Bshareable"
2794 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002795 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002796 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002797 then
2798 LDSHARED="cc -shared ${LDFLAGS}"
2799 else
2800 LDSHARED="ld -Bshareable ${LDFLAGS}"
2801 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002802 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002803 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002804 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002805 *) LDSHARED="ld";;
2806 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002807fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002808echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002809# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002810# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002811echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002812echo "configure:2813: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002813if test -z "$CCSHARED"
2814then
Guido van Rossum07397971997-04-29 21:49:50 +00002815 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002816 hp*|HP*) if test "$GCC" = yes;
2817 then CCSHARED="-fpic";
2818 else CCSHARED="+z";
2819 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002820 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002821 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002822 OpenBSD*) CCSHARED="-fpic";;
2823 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002824 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002825 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002826 IRIX*/6*) case $CC in
2827 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002828 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002829 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002830 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002831 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002832fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002833echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002834# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002835# the python executable -- this is only needed for a few systems
2836echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002837echo "configure:2838: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002838if test -z "$LINKFORSHARED"
2839then
Guido van Rossum07397971997-04-29 21:49:50 +00002840 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002841 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002842 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002843 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002844 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002845 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002846 # -u libsys_s pulls in all symbols in libsys
2847 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2848 # -u __dummy makes the linker aware of the objc runtime
2849 # in System.framework; otherwise, __objcInit (referenced in
2850 # crt1.o) gets erroneously defined as common, which breaks dynamic
2851 # loading of any modules which reference it in System.framework
2852 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossumacb14c72001-01-10 21:41:16 +00002853 Darwin/*) LINKFORSHARED="-u __dummy -framework System -framework Foundation" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002854 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002855 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002856 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002857 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2858 then
2859 LINKFORSHARED="-Wl,--export-dynamic"
2860 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002861 SunOS/5*) case $CC in
2862 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002863 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002864 then
2865 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002866 fi;;
2867 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002868 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002869fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002870echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002871
Guido van Rossum627b2d71993-12-24 10:39:16 +00002872# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002873echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002874echo "configure:2875: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002875ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002876if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002877 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002878else
2879 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002880LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002881cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002882#line 2883 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002883#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002884/* Override any gcc2 internal prototype to avoid an error. */
2885/* We use char because int might match the return type of a gcc2
2886 builtin and then its argument prototype would still apply. */
2887char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002888
Guido van Rossumf78abae1997-01-21 22:02:36 +00002889int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002890dlopen()
2891; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002892EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002893if { (eval echo configure:2894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002894 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002895 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002896else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002897 echo "configure: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002899 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002900 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002901fi
2902rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002903LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002904
Guido van Rossum627b2d71993-12-24 10:39:16 +00002905fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002906if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002907 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002908 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2909 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002910 cat >> confdefs.h <<EOF
2911#define $ac_tr_lib 1
2912EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002913
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002914 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002915
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002916else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002917 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918fi
2919 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002920echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002921echo "configure:2922: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002922ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002923if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002924 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002925else
2926 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002927LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002928cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002929#line 2930 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002930#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002931/* Override any gcc2 internal prototype to avoid an error. */
2932/* We use char because int might match the return type of a gcc2
2933 builtin and then its argument prototype would still apply. */
2934char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002935
Guido van Rossumf78abae1997-01-21 22:02:36 +00002936int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002937shl_load()
2938; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002939EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002940if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002941 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002942 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002943else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002944 echo "configure: failed program was:" >&5
2945 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002946 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002947 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002948fi
2949rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002950LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002951
Guido van Rossum627b2d71993-12-24 10:39:16 +00002952fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002953if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002954 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002955 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2956 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002957 cat >> confdefs.h <<EOF
2958#define $ac_tr_lib 1
2959EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002960
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002961 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002962
2963else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002964 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002965fi
2966 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002967
Skip Montanarocb853262000-08-30 22:29:48 +00002968# Check for --with-pydebug
2969echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002970echo "configure:2971: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002971# Check whether --with-pydebug or --without-pydebug was given.
2972if test "${with_pydebug+set}" = set; then
2973 withval="$with_pydebug"
2974
2975if test "$withval" != no
2976then cat >> confdefs.h <<\EOF
2977#define Py_DEBUG 1
2978EOF
2979 echo "$ac_t""yes" 1>&6
2980else echo "$ac_t""no" 1>&6
2981fi
2982else
2983 echo "$ac_t""no" 1>&6
2984fi
2985
2986
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002987# checks for system dependent C++ extensions support
2988case "$ac_sys_system" in
2989 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00002990echo "configure:2991: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002991 cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002992#line 2993 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002993#include "confdefs.h"
2994#include "/usr/lpp/xlC/include/load.h"
2995int main() {
2996loadAndInit("", 0, "")
2997; return 0; }
2998EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00002999if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003000 rm -rf conftest*
3001 cat >> confdefs.h <<\EOF
3002#define AIX_GENUINE_CPLUSPLUS 1
3003EOF
3004
3005 echo "$ac_t""yes" 1>&6
3006else
3007 echo "configure: failed program was:" >&5
3008 cat conftest.$ac_ext >&5
3009 rm -rf conftest*
3010 echo "$ac_t""no" 1>&6
3011fi
3012rm -f conftest*;;
3013 *) ;;
3014esac
3015
Guido van Rossum70c7f481998-03-26 18:44:10 +00003016# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3017# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003018# BeOS' sockets are stashed in libnet.
3019case "$ac_sys_system" in
3020IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003021*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003022echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00003023echo "configure:3024: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003024ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003025if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003026 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003027else
3028 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003029LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003030cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00003031#line 3032 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003032#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003033/* Override any gcc2 internal prototype to avoid an error. */
3034/* We use char because int might match the return type of a gcc2
3035 builtin and then its argument prototype would still apply. */
3036char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003037
Guido van Rossumf78abae1997-01-21 22:02:36 +00003038int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003039t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003040; return 0; }
3041EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00003042if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003043 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003044 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003045else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003046 echo "configure: failed program was:" >&5
3047 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003048 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003049 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003050fi
3051rm -f conftest*
3052LIBS="$ac_save_LIBS"
3053
3054fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003055if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003056 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003057 LIBS="-lnsl $LIBS"
3058else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003059 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003060fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003061 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003062echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00003063echo "configure:3064: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003064ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003065if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003066 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003067else
3068 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003069LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003070cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00003071#line 3072 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003072#include "confdefs.h"
3073/* Override any gcc2 internal prototype to avoid an error. */
3074/* We use char because int might match the return type of a gcc2
3075 builtin and then its argument prototype would still apply. */
3076char socket();
3077
3078int main() {
3079socket()
3080; return 0; }
3081EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00003082if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003083 rm -rf conftest*
3084 eval "ac_cv_lib_$ac_lib_var=yes"
3085else
3086 echo "configure: failed program was:" >&5
3087 cat conftest.$ac_ext >&5
3088 rm -rf conftest*
3089 eval "ac_cv_lib_$ac_lib_var=no"
3090fi
3091rm -f conftest*
3092LIBS="$ac_save_LIBS"
3093
3094fi
3095if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3096 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003097 LIBS="-lsocket $LIBS"
3098else
3099 echo "$ac_t""no" 1>&6
3100fi
3101 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003102;;
3103esac
3104case "$ac_sys_system" in
3105BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003106echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00003107echo "configure:3108: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003108ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003109if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003110 echo $ac_n "(cached) $ac_c" 1>&6
3111else
3112 ac_save_LIBS="$LIBS"
3113LIBS="-lnet $LIBS $LIBS"
3114cat > conftest.$ac_ext <<EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00003115#line 3116 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003116#include "confdefs.h"
3117/* Override any gcc2 internal prototype to avoid an error. */
3118/* We use char because int might match the return type of a gcc2
3119 builtin and then its argument prototype would still apply. */
3120char socket();
3121
3122int main() {
3123socket()
3124; return 0; }
3125EOF
Barry Warsawa57b89b2001-01-15 17:07:21 +00003126if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003127 rm -rf conftest*
3128 eval "ac_cv_lib_$ac_lib_var=yes"
3129else
3130 echo "configure: failed program was:" >&5
3131 cat conftest.$ac_ext >&5
3132 rm -rf conftest*
3133 eval "ac_cv_lib_$ac_lib_var=no"
3134fi
3135rm -f conftest*
3136LIBS="$ac_save_LIBS"
3137
3138fi
3139if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3140 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003141 LIBS="-lnet $LIBS"
3142else
3143 echo "$ac_t""no" 1>&6
3144fi
3145 # BeOS
3146;;
3147esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003148
Guido van Rossuma68acba1996-07-31 17:36:39 +00003149echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Barry Warsawa57b89b2001-01-15 17:07:21 +00003150echo "configure:3151: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003151# Check whether --with-libs or --without-libs was given.
3152if test "${with_libs+set}" = set; then
3153 withval="$with_libs"
3154
3155echo "$ac_t""$withval" 1>&6
3156LIBS="$withval $LIBS"
3157
3158else
3159 echo "$ac_t""no" 1>&6
3160fi
3161
Guido van Rossum7f43da71994-08-01 12:15:30 +00003162
Eric S. Raymonda8885402001-01-17 08:25:11 +00003163#
3164# These are used to generate Setup.config. They autoconfigure several
3165# features that are otherwise severe pains in the butt.
3166#
3167# ncurses
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003168
3169echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003170echo "configure:3171: checking for initscr in -lncurses" >&5
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003171ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
3172if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3173 echo $ac_n "(cached) $ac_c" 1>&6
3174else
3175 ac_save_LIBS="$LIBS"
3176LIBS="-lncurses -ltermcap $LIBS"
3177cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003178#line 3179 "configure"
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003179#include "confdefs.h"
3180/* Override any gcc2 internal prototype to avoid an error. */
3181/* We use char because int might match the return type of a gcc2
3182 builtin and then its argument prototype would still apply. */
3183char initscr();
3184
3185int main() {
3186initscr()
3187; return 0; }
3188EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003189if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003190 rm -rf conftest*
3191 eval "ac_cv_lib_$ac_lib_var=yes"
3192else
3193 echo "configure: failed program was:" >&5
3194 cat conftest.$ac_ext >&5
3195 rm -rf conftest*
3196 eval "ac_cv_lib_$ac_lib_var=no"
3197fi
3198rm -f conftest*
3199LIBS="$ac_save_LIBS"
3200
3201fi
3202if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3203 echo "$ac_t""yes" 1>&6
3204 USE_NCURSES_MODULE=""
3205else
3206 echo "$ac_t""no" 1>&6
3207USE_NCURSES_MODULE="#"
3208fi
3209
Eric S. Raymonda8885402001-01-17 08:25:11 +00003210# GNU readline
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003211
3212echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003213echo "configure:3214: checking for readline in -lreadline" >&5
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003214ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3215if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3216 echo $ac_n "(cached) $ac_c" 1>&6
3217else
3218 ac_save_LIBS="$LIBS"
3219LIBS="-lreadline -ltermcap $LIBS"
3220cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003221#line 3222 "configure"
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003222#include "confdefs.h"
3223/* Override any gcc2 internal prototype to avoid an error. */
3224/* We use char because int might match the return type of a gcc2
3225 builtin and then its argument prototype would still apply. */
3226char readline();
3227
3228int main() {
3229readline()
3230; return 0; }
3231EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003232if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003233 rm -rf conftest*
3234 eval "ac_cv_lib_$ac_lib_var=yes"
3235else
3236 echo "configure: failed program was:" >&5
3237 cat conftest.$ac_ext >&5
3238 rm -rf conftest*
3239 eval "ac_cv_lib_$ac_lib_var=no"
3240fi
3241rm -f conftest*
3242LIBS="$ac_save_LIBS"
3243
3244fi
3245if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3246 echo "$ac_t""yes" 1>&6
3247 USE_READLINE_MODULE=""
3248else
3249 echo "$ac_t""no" 1>&6
3250USE_READLINE_MODULE="#"
3251fi
3252
Eric S. Raymonda8885402001-01-17 08:25:11 +00003253# gdbm(3)
3254
3255
3256echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
3257echo "configure:3258: checking for gdbm_open in -lgdbm" >&5
3258ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
3259if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3260 echo $ac_n "(cached) $ac_c" 1>&6
3261else
3262 ac_save_LIBS="$LIBS"
3263LIBS="-lgdbm $LIBS"
3264cat > conftest.$ac_ext <<EOF
3265#line 3266 "configure"
3266#include "confdefs.h"
3267/* Override any gcc2 internal prototype to avoid an error. */
3268/* We use char because int might match the return type of a gcc2
3269 builtin and then its argument prototype would still apply. */
3270char gdbm_open();
3271
3272int main() {
3273gdbm_open()
3274; return 0; }
3275EOF
3276if { (eval echo configure:3277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3277 rm -rf conftest*
3278 eval "ac_cv_lib_$ac_lib_var=yes"
3279else
3280 echo "configure: failed program was:" >&5
3281 cat conftest.$ac_ext >&5
3282 rm -rf conftest*
3283 eval "ac_cv_lib_$ac_lib_var=no"
3284fi
3285rm -f conftest*
3286LIBS="$ac_save_LIBS"
3287
3288fi
3289if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3290 echo "$ac_t""yes" 1>&6
3291 USE_GDBM_MODULE=""
3292 HAVE_LIBGDBM=-lgdbm
3293else
3294 echo "$ac_t""no" 1>&6
3295USE_GDBM_MODULE="#"
3296 HAVE_LIBGDBM=""
3297fi
3298
3299# ndbm(3)
3300
3301
3302echo $ac_n "checking for ndbm_open in -lndbm""... $ac_c" 1>&6
3303echo "configure:3304: checking for ndbm_open in -lndbm" >&5
3304ac_lib_var=`echo ndbm'_'ndbm_open | sed 'y%./+-%__p_%'`
3305if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3306 echo $ac_n "(cached) $ac_c" 1>&6
3307else
3308 ac_save_LIBS="$LIBS"
3309LIBS="-lndbm $LIBS"
3310cat > conftest.$ac_ext <<EOF
3311#line 3312 "configure"
3312#include "confdefs.h"
3313/* Override any gcc2 internal prototype to avoid an error. */
3314/* We use char because int might match the return type of a gcc2
3315 builtin and then its argument prototype would still apply. */
3316char ndbm_open();
3317
3318int main() {
3319ndbm_open()
3320; return 0; }
3321EOF
3322if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3323 rm -rf conftest*
3324 eval "ac_cv_lib_$ac_lib_var=yes"
3325else
3326 echo "configure: failed program was:" >&5
3327 cat conftest.$ac_ext >&5
3328 rm -rf conftest*
3329 eval "ac_cv_lib_$ac_lib_var=no"
3330fi
3331rm -f conftest*
3332LIBS="$ac_save_LIBS"
3333
3334fi
3335if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3336 echo "$ac_t""yes" 1>&6
3337 USE_NDBM_MODULE=""
3338 HAVE_LIBNDBM=-lndbm
3339else
3340 echo "$ac_t""no" 1>&6
3341USE_NDBM_MODULE="#"
3342 HAVE_LIBNDBM=""
3343fi
3344
3345# crypt(3)
3346
3347
3348echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3349echo "configure:3350: checking for crypt in -lcrypt" >&5
3350ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3351if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3352 echo $ac_n "(cached) $ac_c" 1>&6
3353else
3354 ac_save_LIBS="$LIBS"
3355LIBS="-lcrypt $LIBS"
3356cat > conftest.$ac_ext <<EOF
3357#line 3358 "configure"
3358#include "confdefs.h"
3359/* Override any gcc2 internal prototype to avoid an error. */
3360/* We use char because int might match the return type of a gcc2
3361 builtin and then its argument prototype would still apply. */
3362char crypt();
3363
3364int main() {
3365crypt()
3366; return 0; }
3367EOF
3368if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3369 rm -rf conftest*
3370 eval "ac_cv_lib_$ac_lib_var=yes"
3371else
3372 echo "configure: failed program was:" >&5
3373 cat conftest.$ac_ext >&5
3374 rm -rf conftest*
3375 eval "ac_cv_lib_$ac_lib_var=no"
3376fi
3377rm -f conftest*
3378LIBS="$ac_save_LIBS"
3379
3380fi
3381if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3382 echo "$ac_t""yes" 1>&6
3383 USE_CRYPT_MODULE=""
3384 HAVE_LIBCRYPT=-lcrypt
3385else
3386 echo "$ac_t""no" 1>&6
3387USE_CRYPT_MODULE="#"
3388 HAVE_LIBCRYPT=""
3389fi
3390
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003391
3392# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003393
Barry Warsawc0d24d82000-06-29 16:12:00 +00003394USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003395
Guido van Rossumec2f0731997-01-22 20:54:01 +00003396echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003397echo "configure:3398: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003398
3399# Check whether --with-dec-threads or --without-dec-threads was given.
3400if test "${with_dec_threads+set}" = set; then
3401 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003402
3403echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003404LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003405if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003406 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003407fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003408else
3409 echo "$ac_t""no" 1>&6
3410fi
3411
3412
3413echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003414echo "configure:3415: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003415# Check whether --with-threads or --without-threads was given.
3416if test "${with_threads+set}" = set; then
3417 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003418 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003419fi
3420
3421
Barry Warsawc0d24d82000-06-29 16:12:00 +00003422# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003423# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424if test "${with_thread+set}" = set; then
3425 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003426
3427with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003428fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003429
3430
3431if test -z "$with_threads"
3432then with_threads="yes"
3433fi
3434echo "$ac_t""$with_threads" 1>&6
3435
3436if test "$with_threads" = "no"
3437then
3438 USE_THREAD_MODULE="#"
3439else
Guido van Rossum40951012000-10-07 16:21:27 +00003440 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003441 then LDFLAGS="$LDFLAGS -L$with_threads"
3442 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003443 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003444 then LDFLAGS="$LDFLAGS -L$withval"
3445 fi
3446 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003447#define _REENTRANT 1
3448EOF
3449
Barry Warsawc0d24d82000-06-29 16:12:00 +00003450 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003451echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003452echo "configure:3453: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003453if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454 echo $ac_n "(cached) $ac_c" 1>&6
3455else
3456 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003457#line 3458 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003458#include "confdefs.h"
3459#include <mach/cthreads.h>
3460EOF
3461ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Eric S. Raymonda8885402001-01-17 08:25:11 +00003462{ (eval echo configure:3463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003463ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003464if test -z "$ac_err"; then
3465 rm -rf conftest*
3466 eval "ac_cv_header_$ac_safe=yes"
3467else
3468 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003469 echo "configure: failed program was:" >&5
3470 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003471 rm -rf conftest*
3472 eval "ac_cv_header_$ac_safe=no"
3473fi
3474rm -f conftest*
3475fi
3476if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3477 echo "$ac_t""yes" 1>&6
3478 cat >> confdefs.h <<\EOF
3479#define WITH_THREAD 1
3480EOF
3481
Barry Warsawc0d24d82000-06-29 16:12:00 +00003482 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003483#define C_THREADS 1
3484EOF
3485
Barry Warsawc0d24d82000-06-29 16:12:00 +00003486 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003487else
3488 echo "$ac_t""no" 1>&6
3489
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003490 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003491echo "configure:3492: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003492 # Check whether --with-pth or --without-pth was given.
3493if test "${with_pth+set}" = set; then
3494 withval="$with_pth"
3495
3496 echo "$ac_t""$withval" 1>&6
3497 cat >> confdefs.h <<\EOF
3498#define WITH_THREAD 1
3499EOF
3500
3501 cat >> confdefs.h <<\EOF
3502#define HAVE_PTH 1
3503EOF
3504
3505 LIBS="-lpth $LIBS"
3506 LIBOBJS="$LIBOBJS thread.o"
3507else
3508
3509 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00003510 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003511echo "configure:3512: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003512ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003513if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003514 echo $ac_n "(cached) $ac_c" 1>&6
3515else
3516 ac_save_LIBS="$LIBS"
3517LIBS="-lpthread $LIBS"
3518cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003519#line 3520 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003520#include "confdefs.h"
3521/* Override any gcc2 internal prototype to avoid an error. */
3522/* We use char because int might match the return type of a gcc2
3523 builtin and then its argument prototype would still apply. */
3524char pthread_create();
3525
3526int main() {
3527pthread_create()
3528; return 0; }
3529EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003530if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003531 rm -rf conftest*
3532 eval "ac_cv_lib_$ac_lib_var=yes"
3533else
3534 echo "configure: failed program was:" >&5
3535 cat conftest.$ac_ext >&5
3536 rm -rf conftest*
3537 eval "ac_cv_lib_$ac_lib_var=no"
3538fi
3539rm -f conftest*
3540LIBS="$ac_save_LIBS"
3541
3542fi
3543if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3544 echo "$ac_t""yes" 1>&6
3545 cat >> confdefs.h <<\EOF
3546#define WITH_THREAD 1
3547EOF
3548
Barry Warsawc0d24d82000-06-29 16:12:00 +00003549 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003550#define _POSIX_THREADS 1
3551EOF
3552
Barry Warsawc0d24d82000-06-29 16:12:00 +00003553 LIBS="-lpthread $LIBS"
3554 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003555else
3556 echo "$ac_t""no" 1>&6
3557
Barry Warsawc0d24d82000-06-29 16:12:00 +00003558 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003559echo "configure:3560: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003560if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003561 echo $ac_n "(cached) $ac_c" 1>&6
3562else
3563 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003564#line 3565 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003565#include "confdefs.h"
3566/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003567 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003568#include <assert.h>
3569/* Override any gcc2 internal prototype to avoid an error. */
3570/* We use char because int might match the return type of a gcc2
3571 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003572char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003573
3574int main() {
3575
3576/* The GNU C library defines this for functions which it implements
3577 to always fail with ENOSYS. Some functions are actually named
3578 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003579#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003580choke me
3581#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003582pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003583#endif
3584
3585; return 0; }
3586EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003587if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003588 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003589 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003590else
3591 echo "configure: failed program was:" >&5
3592 cat conftest.$ac_ext >&5
3593 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003594 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003595fi
3596rm -f conftest*
3597fi
3598
Guido van Rossumea516321998-12-17 18:08:55 +00003599if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003600 echo "$ac_t""yes" 1>&6
3601 cat >> confdefs.h <<\EOF
3602#define WITH_THREAD 1
3603EOF
3604
Guido van Rossum5839e582000-10-09 19:52:35 +00003605 case $ac_sys_system in
3606 Darwin*) ;;
3607 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003608#define _POSIX_THREADS 1
3609EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003610;;
3611 esac
Barry Warsawc0d24d82000-06-29 16:12:00 +00003612 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003613else
3614 echo "$ac_t""no" 1>&6
3615
Barry Warsawc0d24d82000-06-29 16:12:00 +00003616 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003617echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003618echo "configure:3619: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003619if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003620 echo $ac_n "(cached) $ac_c" 1>&6
3621else
3622 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003623#line 3624 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003624#include "confdefs.h"
3625#include <kernel/OS.h>
3626EOF
3627ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Eric S. Raymonda8885402001-01-17 08:25:11 +00003628{ (eval echo configure:3629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003629ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003630if test -z "$ac_err"; then
3631 rm -rf conftest*
3632 eval "ac_cv_header_$ac_safe=yes"
3633else
3634 echo "$ac_err" >&5
3635 echo "configure: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3637 rm -rf conftest*
3638 eval "ac_cv_header_$ac_safe=no"
3639fi
3640rm -f conftest*
3641fi
3642if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3643 echo "$ac_t""yes" 1>&6
3644 cat >> confdefs.h <<\EOF
3645#define WITH_THREAD 1
3646EOF
3647
Barry Warsawc0d24d82000-06-29 16:12:00 +00003648 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003649#define BEOS_THREADS 1
3650EOF
3651
Barry Warsawc0d24d82000-06-29 16:12:00 +00003652 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003653else
3654 echo "$ac_t""no" 1>&6
3655
Barry Warsawc0d24d82000-06-29 16:12:00 +00003656 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003657echo "configure:3658: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003658ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003659if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003660 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003661else
3662 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003663LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003664cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003665#line 3666 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003666#include "confdefs.h"
3667/* Override any gcc2 internal prototype to avoid an error. */
3668/* We use char because int might match the return type of a gcc2
3669 builtin and then its argument prototype would still apply. */
3670char pthread_create();
3671
3672int main() {
3673pthread_create()
3674; return 0; }
3675EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003676if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003677 rm -rf conftest*
3678 eval "ac_cv_lib_$ac_lib_var=yes"
3679else
3680 echo "configure: failed program was:" >&5
3681 cat conftest.$ac_ext >&5
3682 rm -rf conftest*
3683 eval "ac_cv_lib_$ac_lib_var=no"
3684fi
3685rm -f conftest*
3686LIBS="$ac_save_LIBS"
3687
3688fi
3689if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3690 echo "$ac_t""yes" 1>&6
3691 cat >> confdefs.h <<\EOF
3692#define WITH_THREAD 1
3693EOF
3694
3695 cat >> confdefs.h <<\EOF
3696#define _POSIX_THREADS 1
3697EOF
3698
3699 LIBS="$LIBS -lpthreads"
3700 LIBOBJS="$LIBOBJS thread.o"
3701else
3702 echo "$ac_t""no" 1>&6
3703
3704 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003705echo "configure:3706: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003706ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003707if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003708 echo $ac_n "(cached) $ac_c" 1>&6
3709else
3710 ac_save_LIBS="$LIBS"
3711LIBS="-lc_r $LIBS"
3712cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003713#line 3714 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003714#include "confdefs.h"
3715/* Override any gcc2 internal prototype to avoid an error. */
3716/* We use char because int might match the return type of a gcc2
3717 builtin and then its argument prototype would still apply. */
3718char pthread_create();
3719
3720int main() {
3721pthread_create()
3722; return 0; }
3723EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003724if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003725 rm -rf conftest*
3726 eval "ac_cv_lib_$ac_lib_var=yes"
3727else
3728 echo "configure: failed program was:" >&5
3729 cat conftest.$ac_ext >&5
3730 rm -rf conftest*
3731 eval "ac_cv_lib_$ac_lib_var=no"
3732fi
3733rm -f conftest*
3734LIBS="$ac_save_LIBS"
3735
3736fi
3737if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3738 echo "$ac_t""yes" 1>&6
3739 cat >> confdefs.h <<\EOF
3740#define WITH_THREAD 1
3741EOF
3742
Barry Warsawc0d24d82000-06-29 16:12:00 +00003743 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003744#define _POSIX_THREADS 1
3745EOF
3746
Greg Steinadf63d62000-07-05 10:38:09 +00003747 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003748 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003749else
3750 echo "$ac_t""no" 1>&6
3751
Greg Steinadf63d62000-07-05 10:38:09 +00003752 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003753echo "configure:3754: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003754ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003755if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003756 echo $ac_n "(cached) $ac_c" 1>&6
3757else
3758 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003759LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003760cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003761#line 3762 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003762#include "confdefs.h"
3763/* Override any gcc2 internal prototype to avoid an error. */
3764/* We use char because int might match the return type of a gcc2
3765 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003766char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003767
3768int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003769__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003770; return 0; }
3771EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003772if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003773 rm -rf conftest*
3774 eval "ac_cv_lib_$ac_lib_var=yes"
3775else
3776 echo "configure: failed program was:" >&5
3777 cat conftest.$ac_ext >&5
3778 rm -rf conftest*
3779 eval "ac_cv_lib_$ac_lib_var=no"
3780fi
3781rm -f conftest*
3782LIBS="$ac_save_LIBS"
3783
3784fi
3785if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3786 echo "$ac_t""yes" 1>&6
3787 cat >> confdefs.h <<\EOF
3788#define WITH_THREAD 1
3789EOF
3790
Barry Warsawc0d24d82000-06-29 16:12:00 +00003791 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003792#define _POSIX_THREADS 1
3793EOF
3794
Greg Steinadf63d62000-07-05 10:38:09 +00003795 LIBS="$LIBS -lthread"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003796 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003797else
3798 echo "$ac_t""no" 1>&6
3799
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003800 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003801echo "configure:3802: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003802ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3803if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3804 echo $ac_n "(cached) $ac_c" 1>&6
3805else
3806 ac_save_LIBS="$LIBS"
3807LIBS="-lpthread $LIBS"
3808cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003809#line 3810 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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_system();
3815
3816int main() {
3817__pthread_create_system()
3818; return 0; }
3819EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003820if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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
3839 cat >> confdefs.h <<\EOF
3840#define _POSIX_THREADS 1
3841EOF
3842
3843 LIBS="$LIBS -lpthread"
3844 LIBOBJS="$LIBOBJS thread.o"
3845else
3846 echo "$ac_t""no" 1>&6
3847
Barry Warsawc0d24d82000-06-29 16:12:00 +00003848 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003849echo "configure:3850: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003850ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003851if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003852 echo $ac_n "(cached) $ac_c" 1>&6
3853else
3854 ac_save_LIBS="$LIBS"
3855LIBS="-lcma $LIBS"
3856cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003857#line 3858 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003858#include "confdefs.h"
3859/* Override any gcc2 internal prototype to avoid an error. */
3860/* We use char because int might match the return type of a gcc2
3861 builtin and then its argument prototype would still apply. */
3862char pthread_create();
3863
3864int main() {
3865pthread_create()
3866; return 0; }
3867EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003868if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003869 rm -rf conftest*
3870 eval "ac_cv_lib_$ac_lib_var=yes"
3871else
3872 echo "configure: failed program was:" >&5
3873 cat conftest.$ac_ext >&5
3874 rm -rf conftest*
3875 eval "ac_cv_lib_$ac_lib_var=no"
3876fi
3877rm -f conftest*
3878LIBS="$ac_save_LIBS"
3879
3880fi
3881if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3882 echo "$ac_t""yes" 1>&6
3883 cat >> confdefs.h <<\EOF
3884#define WITH_THREAD 1
3885EOF
3886
Barry Warsawc0d24d82000-06-29 16:12:00 +00003887 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003888#define _POSIX_THREADS 1
3889EOF
3890
Barry Warsawc0d24d82000-06-29 16:12:00 +00003891 LIBS="$LIBS -lcma"
3892 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003893else
3894 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003895
3896 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003897fi
3898
Barry Warsawc0d24d82000-06-29 16:12:00 +00003899
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900fi
3901
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003902fi
3903
Guido van Rossum0be3e491997-05-22 20:33:33 +00003904fi
3905
Guido van Rossum49545951997-12-02 19:28:29 +00003906fi
3907
Guido van Rossumb93a8621998-05-07 13:27:32 +00003908fi
3909
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003910fi
3911
Guido van Rossumad678af1998-10-02 14:42:15 +00003912fi
3913
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003914fi
3915
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003916fi
3917
Guido van Rossum0be3e491997-05-22 20:33:33 +00003918
Barry Warsawc0d24d82000-06-29 16:12:00 +00003919 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003920echo "configure:3921: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003921ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003922if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003923 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003924else
3925 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003926LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003927cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003928#line 3929 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003929#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003930/* Override any gcc2 internal prototype to avoid an error. */
3931/* We use char because int might match the return type of a gcc2
3932 builtin and then its argument prototype would still apply. */
3933char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003934
Guido van Rossumf78abae1997-01-21 22:02:36 +00003935int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936usconfig()
3937; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003938EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003939if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003940 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003941 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003943 echo "configure: failed program was:" >&5
3944 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003945 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003946 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003947fi
3948rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949LIBS="$ac_save_LIBS"
3950
3951fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003952if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003953 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954 cat >> confdefs.h <<\EOF
3955#define WITH_THREAD 1
3956EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003957
Barry Warsawc0d24d82000-06-29 16:12:00 +00003958 LIBS="$LIBS -lmpc"
3959 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003960 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003961else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003962 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003963fi
3964
Barry Warsawc0d24d82000-06-29 16:12:00 +00003965 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00003966echo "configure:3967: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003967ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003968if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003969 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970else
3971 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003972LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003973cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003974#line 3975 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003975#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003976/* Override any gcc2 internal prototype to avoid an error. */
3977/* We use char because int might match the return type of a gcc2
3978 builtin and then its argument prototype would still apply. */
3979char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003980
Guido van Rossumf78abae1997-01-21 22:02:36 +00003981int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003982thr_create()
3983; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003984EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00003985if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003986 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003987 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003992 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003993fi
3994rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003995LIBS="$ac_save_LIBS"
3996
3997fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003998if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003999 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000 cat >> confdefs.h <<\EOF
4001#define WITH_THREAD 1
4002EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003
Barry Warsawc0d24d82000-06-29 16:12:00 +00004004 LIBS="$LIBS -lthread"
4005 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004006 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004007else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004008 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004009fi
4010
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004011
4012 if test "$USE_THREAD_MODULE" != "#"
4013 then
4014 # If the above checks didn't disable threads, (at least) OSF1
4015 # needs this '-threads' argument during linking.
4016 case $ac_sys_system in
4017 OSF1) LDLAST=-threads;;
4018 esac
4019 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004020fi
4021
Barry Warsawef82cd72000-06-30 16:21:01 +00004022# Check for GC support
4023
4024USE_GC_MODULE=""
4025echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004026echo "configure:4027: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004027# Check whether --with-cycle-gc or --without-cycle-gc was given.
4028if test "${with_cycle_gc+set}" = set; then
4029 withval="$with_cycle_gc"
4030 :
4031fi
4032
4033
4034if test -z "$with_cycle_gc"
4035then with_cycle_gc="yes"
4036fi
4037if test "$with_cycle_gc" = "no"
4038then
4039 USE_GC_MODULE="#"
4040else
4041 cat >> confdefs.h <<\EOF
4042#define WITH_CYCLE_GC 1
4043EOF
4044
4045fi
4046echo "$ac_t""$with_cycle_gc" 1>&6
4047
Barry Warsawa57b89b2001-01-15 17:07:21 +00004048# Check for DBM support
4049
4050USE_DBM_MODULE=""
4051echo $ac_n "checking for --with-dbm""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004052echo "configure:4053: checking for --with-dbm" >&5
Barry Warsawa57b89b2001-01-15 17:07:21 +00004053# Check whether --with-dbm or --without-dbm was given.
4054if test "${with_dbm+set}" = set; then
4055 withval="$with_dbm"
4056 :
4057fi
4058
4059
4060# enabled by default but one of the dbm.h files must be found
4061if test "$ac_cv_header_dbm_h" = "yes" -o "$ac_cv_header_db1_ndbm_h" = "yes" -o "$ac_cv_header_gdbm_ndbm_h" = "yes"
4062then
4063 if test "$with_dbm" != "no"
4064 then with_dbm="yes"
4065 fi
4066else
4067 # make sure user knows why dbm support wasn't enabled even though
4068 # s/he requested it
4069 if test "$with_dbm" = "yes"
Eric S. Raymonda8885402001-01-17 08:25:11 +00004070 then echo $ac_n "(requested but no ndbm.h was found) $ac_c"
Barry Warsawa57b89b2001-01-15 17:07:21 +00004071 fi
4072 with_dbm="no"
4073fi
4074
4075if test "$with_dbm" = "no"
4076then
4077 USE_DBM_MODULE="#"
4078else
4079 cat >> confdefs.h <<\EOF
4080#define WITH_LIBNDBM 1
4081EOF
4082
4083fi
4084echo "$ac_t""$with_dbm" 1>&6
4085
4086if test "$with_dbm" = "yes"
4087then
4088 # check for libndbm
4089
4090 echo $ac_n "checking for dbmopen""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004091echo "configure:4092: checking for dbmopen" >&5
Barry Warsawa57b89b2001-01-15 17:07:21 +00004092if eval "test \"`echo '$''{'ac_cv_func_dbmopen'+set}'`\" = set"; then
4093 echo $ac_n "(cached) $ac_c" 1>&6
4094else
4095 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004096#line 4097 "configure"
Barry Warsawa57b89b2001-01-15 17:07:21 +00004097#include "confdefs.h"
4098/* System header to define __stub macros and hopefully few prototypes,
4099 which can conflict with char dbmopen(); below. */
4100#include <assert.h>
4101/* Override any gcc2 internal prototype to avoid an error. */
4102/* We use char because int might match the return type of a gcc2
4103 builtin and then its argument prototype would still apply. */
4104char dbmopen();
4105
4106int main() {
4107
4108/* The GNU C library defines this for functions which it implements
4109 to always fail with ENOSYS. Some functions are actually named
4110 something starting with __ and the normal name is an alias. */
4111#if defined (__stub_dbmopen) || defined (__stub___dbmopen)
4112choke me
4113#else
4114dbmopen();
4115#endif
4116
4117; return 0; }
4118EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004119if { (eval echo configure:4120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Barry Warsawa57b89b2001-01-15 17:07:21 +00004120 rm -rf conftest*
4121 eval "ac_cv_func_dbmopen=yes"
4122else
4123 echo "configure: failed program was:" >&5
4124 cat conftest.$ac_ext >&5
4125 rm -rf conftest*
4126 eval "ac_cv_func_dbmopen=no"
4127fi
4128rm -f conftest*
4129fi
4130
4131if eval "test \"`echo '$ac_cv_func_'dbmopen`\" = yes"; then
4132 echo "$ac_t""yes" 1>&6
4133 HAVE_LIBNDBM=
4134else
4135 echo "$ac_t""no" 1>&6
4136HAVE_LIBNDBM=-lndbm
4137fi
4138
4139fi
4140
Fred Drakea50d6ec2000-08-31 16:13:20 +00004141# Check for LIBDB support
4142# either --with-libdb or, in its absence, the presence of db.h
4143
4144USE_BSDDB_MODULE=""
4145echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004146echo "configure:4147: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00004147# Check whether --with-libdb or --without-libdb was given.
4148if test "${with_libdb+set}" = set; then
4149 withval="$with_libdb"
4150 :
4151fi
4152
4153
Skip Montanarob89f41e2000-09-04 04:06:05 +00004154# enabled by default, but db.h must be found
4155if test "$ac_cv_header_db_h" = "yes"
4156then
4157 if test "$with_libdb" != "no"
4158 then with_libdb="yes"
4159 fi
4160else
Fred Drake5790be12000-10-09 17:06:13 +00004161 # make sure user knows why bsddb support wasn't enabled even
Skip Montanarob89f41e2000-09-04 04:06:05 +00004162 # though s/he requested it
4163 if test "$with_libdb" = "yes"
4164 then echo $ac_n "(requested, but db.h was not found) $ac_c"
4165 fi
4166 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00004167fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00004168
Fred Drakea50d6ec2000-08-31 16:13:20 +00004169if test "$with_libdb" = "no"
4170then
4171 USE_BSDDB_MODULE="#"
4172else
4173 cat >> confdefs.h <<\EOF
4174#define WITH_LIBDB 1
4175EOF
4176
4177fi
4178echo "$ac_t""$with_libdb" 1>&6
4179
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004180if test "$with_libdb" = "yes"
4181then
4182 # check for libdb; BSD systems have the DB routines in libc --tg
4183
Martin v. Löwis05a65d62000-09-24 19:40:25 +00004184 # If dbopen is not in libc, then checking whether it is in libdb
4185 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00004186 # Instead, we just trust it is in libdb; linking will fail if it
4187 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004188 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004189echo "configure:4190: checking for dbopen" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004190if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004191 echo $ac_n "(cached) $ac_c" 1>&6
4192else
4193 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004194#line 4195 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004195#include "confdefs.h"
4196/* System header to define __stub macros and hopefully few prototypes,
4197 which can conflict with char dbopen(); below. */
4198#include <assert.h>
4199/* Override any gcc2 internal prototype to avoid an error. */
4200/* We use char because int might match the return type of a gcc2
4201 builtin and then its argument prototype would still apply. */
4202char dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004203
4204int main() {
4205
4206/* The GNU C library defines this for functions which it implements
4207 to always fail with ENOSYS. Some functions are actually named
4208 something starting with __ and the normal name is an alias. */
4209#if defined (__stub_dbopen) || defined (__stub___dbopen)
4210choke me
4211#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004212dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004213#endif
4214
4215; return 0; }
4216EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004217if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004218 rm -rf conftest*
4219 eval "ac_cv_func_dbopen=yes"
4220else
4221 echo "configure: failed program was:" >&5
4222 cat conftest.$ac_ext >&5
4223 rm -rf conftest*
4224 eval "ac_cv_func_dbopen=no"
4225fi
4226rm -f conftest*
4227fi
4228
4229if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
4230 echo "$ac_t""yes" 1>&6
4231 HAVE_LIBDB=
4232else
4233 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00004234HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004235fi
4236
4237fi
4238
Barry Warsawef82cd72000-06-30 16:21:01 +00004239# Check for --with-wctype-functions
4240echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004241echo "configure:4242: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004242# Check whether --with-wctype-functions or --without-wctype-functions was given.
4243if test "${with_wctype_functions+set}" = set; then
4244 withval="$with_wctype_functions"
4245
4246if test "$withval" != no
4247then cat >> confdefs.h <<\EOF
4248#define WANT_WCTYPE_FUNCTIONS 1
4249EOF
4250 echo "$ac_t""yes" 1>&6
4251else echo "$ac_t""no" 1>&6
4252fi
4253else
4254 echo "$ac_t""no" 1>&6
4255fi
4256
4257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004258# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004259
4260DLINCLDIR=/
4261
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004262echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004263echo "configure:4264: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004265if test "${with_sgi_dl+set}" = set; then
4266 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004267
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004268echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269cat >> confdefs.h <<\EOF
4270#define WITH_SGI_DL 1
4271EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004272
Guido van Rossume97ee181999-12-20 21:27:22 +00004273DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004274dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004275if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004276then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004278fi
4279DLINCLDIR=${dldir}
4280LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004281else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004282 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004283fi
4284
4285
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004286echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004287echo "configure:4288: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004289if test "${with_dl_dld+set}" = set; then
4290 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004291
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004292echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293cat >> confdefs.h <<\EOF
4294#define WITH_DL_DLD 1
4295EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004296
Guido van Rossume97ee181999-12-20 21:27:22 +00004297DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004298dldir=`echo "$withval" | sed 's/,.*//'`
4299dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004300if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004301then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004303fi
4304DLINCLDIR=${dldir}
4305LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004306else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004307 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004308fi
4309
4310
Guido van Rossume97ee181999-12-20 21:27:22 +00004311# the dlopen() function means we might want to use dynload_shlib.o. some
4312# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004313for ac_func in dlopen
4314do
4315echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004316echo "configure:4317: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004317if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004318 echo $ac_n "(cached) $ac_c" 1>&6
4319else
4320 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004321#line 4322 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004322#include "confdefs.h"
4323/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004324 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004325#include <assert.h>
4326/* Override any gcc2 internal prototype to avoid an error. */
4327/* We use char because int might match the return type of a gcc2
4328 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004329char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004330
4331int main() {
4332
4333/* The GNU C library defines this for functions which it implements
4334 to always fail with ENOSYS. Some functions are actually named
4335 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004336#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004337choke me
4338#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004339$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004340#endif
4341
4342; return 0; }
4343EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004344if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004345 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004346 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004347else
4348 echo "configure: failed program was:" >&5
4349 cat conftest.$ac_ext >&5
4350 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004351 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004352fi
4353rm -f conftest*
4354fi
4355
Thomas Wouters3a584202000-08-05 23:28:51 +00004356if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004357 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004358 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4359 cat >> confdefs.h <<EOF
4360#define $ac_tr_func 1
4361EOF
4362
Guido van Rossume97ee181999-12-20 21:27:22 +00004363else
4364 echo "$ac_t""no" 1>&6
4365fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004366done
Guido van Rossume97ee181999-12-20 21:27:22 +00004367
4368
4369# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4370# loading of modules.
4371
4372echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004373echo "configure:4374: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004374if test -z "$DYNLOADFILE"
4375then
4376 case $ac_sys_system/$ac_sys_release in
4377 AIX*) DYNLOADFILE="dynload_aix.o";;
4378 BeOS*) DYNLOADFILE="dynload_beos.o";;
4379 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004380 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004381 *)
4382 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4383 # out any dynamic loading
4384 if test "$ac_cv_func_dlopen" = yes
4385 then DYNLOADFILE="dynload_shlib.o"
4386 else DYNLOADFILE="dynload_stub.o"
4387 fi
4388 ;;
4389 esac
4390fi
4391echo "$ac_t""$DYNLOADFILE" 1>&6
4392if test "$DYNLOADFILE" != "dynload_stub.o"
4393then
4394 cat >> confdefs.h <<\EOF
4395#define HAVE_DYNAMIC_LOADING 1
4396EOF
4397
4398fi
4399
Guido van Rossum627b2d71993-12-24 10:39:16 +00004400# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004401for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004402 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004403 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00004404 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004405 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004406 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004407 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004408 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004409 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004410 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00004411 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004412do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004413echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004414echo "configure:4415: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004415if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004416 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004417else
4418 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004419#line 4420 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004420#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004421/* System header to define __stub macros and hopefully few prototypes,
4422 which can conflict with char $ac_func(); below. */
4423#include <assert.h>
4424/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004425/* We use char because int might match the return type of a gcc2
4426 builtin and then its argument prototype would still apply. */
4427char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004428
Guido van Rossumf78abae1997-01-21 22:02:36 +00004429int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430
Guido van Rossum627b2d71993-12-24 10:39:16 +00004431/* The GNU C library defines this for functions which it implements
4432 to always fail with ENOSYS. Some functions are actually named
4433 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004435choke me
4436#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004437$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004438#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004439
Guido van Rossum7f43da71994-08-01 12:15:30 +00004440; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004441EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004442if { (eval echo configure:4443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004443 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444 eval "ac_cv_func_$ac_func=yes"
4445else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004446 echo "configure: failed program was:" >&5
4447 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004448 rm -rf conftest*
4449 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004450fi
4451rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004452fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004454if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004455 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004456 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004457 cat >> confdefs.h <<EOF
4458#define $ac_tr_func 1
4459EOF
4460
4461else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004462 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004464done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004465
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004466
Fred Drake8cef4cf2000-06-28 16:40:38 +00004467# check for openpty and forkpty
4468
4469for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004470do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004471echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004472echo "configure:4473: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004473if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004474 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004475else
4476 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004477#line 4478 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004478#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004479/* System header to define __stub macros and hopefully few prototypes,
4480 which can conflict with char $ac_func(); below. */
4481#include <assert.h>
4482/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004483/* We use char because int might match the return type of a gcc2
4484 builtin and then its argument prototype would still apply. */
4485char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004486
Guido van Rossumf78abae1997-01-21 22:02:36 +00004487int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488
Guido van Rossum627b2d71993-12-24 10:39:16 +00004489/* The GNU C library defines this for functions which it implements
4490 to always fail with ENOSYS. Some functions are actually named
4491 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004493choke me
4494#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004495$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004496#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004497
Guido van Rossum7f43da71994-08-01 12:15:30 +00004498; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004500if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004501 rm -rf conftest*
4502 eval "ac_cv_func_$ac_func=yes"
4503else
4504 echo "configure: failed program was:" >&5
4505 cat conftest.$ac_ext >&5
4506 rm -rf conftest*
4507 eval "ac_cv_func_$ac_func=no"
4508fi
4509rm -f conftest*
4510fi
4511
4512if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4513 echo "$ac_t""yes" 1>&6
4514 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4515 cat >> confdefs.h <<EOF
4516#define $ac_tr_func 1
4517EOF
4518
4519else
4520 echo "$ac_t""no" 1>&6
4521echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004522echo "configure:4523: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004523ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004524if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004525 echo $ac_n "(cached) $ac_c" 1>&6
4526else
4527 ac_save_LIBS="$LIBS"
4528LIBS="-lutil $LIBS"
4529cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004530#line 4531 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004531#include "confdefs.h"
4532/* Override any gcc2 internal prototype to avoid an error. */
4533/* We use char because int might match the return type of a gcc2
4534 builtin and then its argument prototype would still apply. */
4535char openpty();
4536
4537int main() {
4538openpty()
4539; return 0; }
4540EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004541if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004542 rm -rf conftest*
4543 eval "ac_cv_lib_$ac_lib_var=yes"
4544else
4545 echo "configure: failed program was:" >&5
4546 cat conftest.$ac_ext >&5
4547 rm -rf conftest*
4548 eval "ac_cv_lib_$ac_lib_var=no"
4549fi
4550rm -f conftest*
4551LIBS="$ac_save_LIBS"
4552
4553fi
4554if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4555 echo "$ac_t""yes" 1>&6
4556 cat >> confdefs.h <<\EOF
4557#define HAVE_OPENPTY 1
4558EOF
4559 LIBS="$LIBS -lutil"
4560else
4561 echo "$ac_t""no" 1>&6
4562fi
4563
4564fi
4565done
4566
4567for ac_func in forkpty
4568do
4569echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004570echo "configure:4571: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004571if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004572 echo $ac_n "(cached) $ac_c" 1>&6
4573else
4574 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004575#line 4576 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004576#include "confdefs.h"
4577/* System header to define __stub macros and hopefully few prototypes,
4578 which can conflict with char $ac_func(); below. */
4579#include <assert.h>
4580/* Override any gcc2 internal prototype to avoid an error. */
4581/* We use char because int might match the return type of a gcc2
4582 builtin and then its argument prototype would still apply. */
4583char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004584
4585int main() {
4586
4587/* The GNU C library defines this for functions which it implements
4588 to always fail with ENOSYS. Some functions are actually named
4589 something starting with __ and the normal name is an alias. */
4590#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4591choke me
4592#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004593$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004594#endif
4595
4596; return 0; }
4597EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004598if { (eval echo configure:4599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004599 rm -rf conftest*
4600 eval "ac_cv_func_$ac_func=yes"
4601else
4602 echo "configure: failed program was:" >&5
4603 cat conftest.$ac_ext >&5
4604 rm -rf conftest*
4605 eval "ac_cv_func_$ac_func=no"
4606fi
4607rm -f conftest*
4608fi
4609
4610if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4611 echo "$ac_t""yes" 1>&6
4612 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4613 cat >> confdefs.h <<EOF
4614#define $ac_tr_func 1
4615EOF
4616
4617else
4618 echo "$ac_t""no" 1>&6
4619echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004620echo "configure:4621: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004621ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004622if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004623 echo $ac_n "(cached) $ac_c" 1>&6
4624else
4625 ac_save_LIBS="$LIBS"
4626LIBS="-lutil $LIBS"
4627cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004628#line 4629 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004629#include "confdefs.h"
4630/* Override any gcc2 internal prototype to avoid an error. */
4631/* We use char because int might match the return type of a gcc2
4632 builtin and then its argument prototype would still apply. */
4633char forkpty();
4634
4635int main() {
4636forkpty()
4637; return 0; }
4638EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004639if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004640 rm -rf conftest*
4641 eval "ac_cv_lib_$ac_lib_var=yes"
4642else
4643 echo "configure: failed program was:" >&5
4644 cat conftest.$ac_ext >&5
4645 rm -rf conftest*
4646 eval "ac_cv_lib_$ac_lib_var=no"
4647fi
4648rm -f conftest*
4649LIBS="$ac_save_LIBS"
4650
4651fi
4652if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4653 echo "$ac_t""yes" 1>&6
4654 cat >> confdefs.h <<\EOF
4655#define HAVE_FORKPTY 1
4656EOF
4657 LIBS="$LIBS -lutil"
4658else
4659 echo "$ac_t""no" 1>&6
4660fi
4661
4662fi
4663done
4664
4665
4666# check for long file support functions
4667for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4668do
4669echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004670echo "configure:4671: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004671if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004672 echo $ac_n "(cached) $ac_c" 1>&6
4673else
4674 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004675#line 4676 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004676#include "confdefs.h"
4677/* System header to define __stub macros and hopefully few prototypes,
4678 which can conflict with char $ac_func(); below. */
4679#include <assert.h>
4680/* Override any gcc2 internal prototype to avoid an error. */
4681/* We use char because int might match the return type of a gcc2
4682 builtin and then its argument prototype would still apply. */
4683char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004684
4685int main() {
4686
4687/* The GNU C library defines this for functions which it implements
4688 to always fail with ENOSYS. Some functions are actually named
4689 something starting with __ and the normal name is an alias. */
4690#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4691choke me
4692#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004693$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004694#endif
4695
4696; return 0; }
4697EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004698if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004699 rm -rf conftest*
4700 eval "ac_cv_func_$ac_func=yes"
4701else
4702 echo "configure: failed program was:" >&5
4703 cat conftest.$ac_ext >&5
4704 rm -rf conftest*
4705 eval "ac_cv_func_$ac_func=no"
4706fi
4707rm -f conftest*
4708fi
4709
4710if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4711 echo "$ac_t""yes" 1>&6
4712 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4713 cat >> confdefs.h <<EOF
4714#define $ac_tr_func 1
4715EOF
4716
4717else
4718 echo "$ac_t""no" 1>&6
4719fi
4720done
4721
4722
4723for ac_func in dup2 getcwd strdup strerror memmove
4724do
4725echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004726echo "configure:4727: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004727if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004728 echo $ac_n "(cached) $ac_c" 1>&6
4729else
4730 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004731#line 4732 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004732#include "confdefs.h"
4733/* System header to define __stub macros and hopefully few prototypes,
4734 which can conflict with char $ac_func(); below. */
4735#include <assert.h>
4736/* Override any gcc2 internal prototype to avoid an error. */
4737/* We use char because int might match the return type of a gcc2
4738 builtin and then its argument prototype would still apply. */
4739char $ac_func();
4740
4741int main() {
4742
4743/* The GNU C library defines this for functions which it implements
4744 to always fail with ENOSYS. Some functions are actually named
4745 something starting with __ and the normal name is an alias. */
4746#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4747choke me
4748#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004749$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004750#endif
4751
4752; return 0; }
4753EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004754if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004755 rm -rf conftest*
4756 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004757else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004758 echo "configure: failed program was:" >&5
4759 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004760 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004761 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004762fi
4763rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004764fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004765
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004766if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004767 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004768 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4769 cat >> confdefs.h <<EOF
4770#define $ac_tr_func 1
4771EOF
4772
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004773else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004774 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004775LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004776fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004777done
4778
Guido van Rossumf78abae1997-01-21 22:02:36 +00004779
Thomas Wouters3a584202000-08-05 23:28:51 +00004780for ac_func in getpgrp
4781do
4782echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004783echo "configure:4784: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004784if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004785 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004786else
4787 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004788#line 4789 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004789#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004790/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004791 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004792#include <assert.h>
4793/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004794/* We use char because int might match the return type of a gcc2
4795 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004796char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004797
Guido van Rossumf78abae1997-01-21 22:02:36 +00004798int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004799
Guido van Rossum627b2d71993-12-24 10:39:16 +00004800/* The GNU C library defines this for functions which it implements
4801 to always fail with ENOSYS. Some functions are actually named
4802 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004803#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004804choke me
4805#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004806$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004807#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004808
4809; return 0; }
4810EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004811if { (eval echo configure:4812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004812 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004813 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004814else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004815 echo "configure: failed program was:" >&5
4816 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004818 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004819fi
4820rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004821fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004822
Thomas Wouters3a584202000-08-05 23:28:51 +00004823if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004824 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004825 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4826 cat >> confdefs.h <<EOF
4827#define $ac_tr_func 1
4828EOF
4829 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004830#line 4831 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004831#include "confdefs.h"
4832#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004833int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004834getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004835; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004836EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004837if { (eval echo configure:4838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004838 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004839 cat >> confdefs.h <<\EOF
4840#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004841EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004842
Guido van Rossumf78abae1997-01-21 22:02:36 +00004843else
4844 echo "configure: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004846fi
4847rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004848else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004849 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004850fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004851done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004852
Thomas Wouters3a584202000-08-05 23:28:51 +00004853for ac_func in setpgrp
4854do
4855echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004856echo "configure:4857: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004857if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004858 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859else
4860 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004861#line 4862 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004862#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004863/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004864 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004865#include <assert.h>
4866/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004867/* We use char because int might match the return type of a gcc2
4868 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004869char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004870
Guido van Rossumf78abae1997-01-21 22:02:36 +00004871int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004872
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004873/* The GNU C library defines this for functions which it implements
4874 to always fail with ENOSYS. Some functions are actually named
4875 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004876#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004877choke me
4878#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004879$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004880#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004881
4882; return 0; }
4883EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004884if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004885 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004886 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004888 echo "configure: failed program was:" >&5
4889 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004890 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004891 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892fi
4893rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004894fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004895
Thomas Wouters3a584202000-08-05 23:28:51 +00004896if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004897 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004898 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4899 cat >> confdefs.h <<EOF
4900#define $ac_tr_func 1
4901EOF
4902 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004903#line 4904 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004904#include "confdefs.h"
4905#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004906int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004907setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004908; return 0; }
4909EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004910if { (eval echo configure:4911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004911 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004912 cat >> confdefs.h <<\EOF
4913#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004914EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004915
Guido van Rossumf78abae1997-01-21 22:02:36 +00004916else
4917 echo "configure: failed program was:" >&5
4918 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004919fi
4920rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004921else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004922 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004923fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004924done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004925
Thomas Wouters3a584202000-08-05 23:28:51 +00004926for ac_func in gettimeofday
4927do
4928echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00004929echo "configure:4930: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004930if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004931 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004932else
4933 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004934#line 4935 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004935#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004936/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004937 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004938#include <assert.h>
4939/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004940/* We use char because int might match the return type of a gcc2
4941 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004942char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004943
Guido van Rossumf78abae1997-01-21 22:02:36 +00004944int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004945
4946/* The GNU C library defines this for functions which it implements
4947 to always fail with ENOSYS. Some functions are actually named
4948 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004949#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004950choke me
4951#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004952$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953#endif
4954
4955; return 0; }
4956EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004957if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004961 echo "configure: failed program was:" >&5
4962 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004963 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004964 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965fi
4966rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004967fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004968
Thomas Wouters3a584202000-08-05 23:28:51 +00004969if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004970 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004971 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4972 cat >> confdefs.h <<EOF
4973#define $ac_tr_func 1
4974EOF
4975 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004976#line 4977 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004977#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004978#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004979int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004980gettimeofday((struct timeval*)0,(struct timezone*)0);
4981; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004982EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00004983if { (eval echo configure:4984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004984 :
4985else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004986 echo "configure: failed program was:" >&5
4987 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004988 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004989 cat >> confdefs.h <<\EOF
4990#define GETTIMEOFDAY_NO_TZ 1
4991EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004992
4993fi
4994rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004995else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004996 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004997fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004998done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004999
5000
5001# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005002echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005003echo "configure:5004: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005004if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005005 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006else
5007 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005008#line 5009 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005009#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010#include <sys/types.h>
5011#include <sys/time.h>
5012#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005013int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005014struct tm *tp;
5015; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005016EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005017if { (eval echo configure:5018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005018 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005019 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005020else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005021 echo "configure: failed program was:" >&5
5022 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005023 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005024 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005025fi
5026rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005027fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005028
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005029echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005030if test $ac_cv_header_time = yes; then
5031 cat >> confdefs.h <<\EOF
5032#define TIME_WITH_SYS_TIME 1
5033EOF
5034
5035fi
5036
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005037echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005038echo "configure:5039: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005039if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005040 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005041else
5042 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005043#line 5044 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005044#include "confdefs.h"
5045#include <sys/types.h>
5046#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005047int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005048struct tm *tp; tp->tm_sec;
5049; return 0; }
5050EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005051if { (eval echo configure:5052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005052 rm -rf conftest*
5053 ac_cv_struct_tm=time.h
5054else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005055 echo "configure: failed program was:" >&5
5056 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057 rm -rf conftest*
5058 ac_cv_struct_tm=sys/time.h
5059fi
5060rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005062
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005063echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064if test $ac_cv_struct_tm = sys/time.h; then
5065 cat >> confdefs.h <<\EOF
5066#define TM_IN_SYS_TIME 1
5067EOF
5068
5069fi
5070
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005071echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005072echo "configure:5073: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005073if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005074 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005075else
5076 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005077#line 5078 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005078#include "confdefs.h"
5079#include <sys/types.h>
5080#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005081int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005082struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083; return 0; }
5084EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005085if { (eval echo configure:5086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005086 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005087 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005089 echo "configure: failed program was:" >&5
5090 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005092 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093fi
5094rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005095fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005096
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005097echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5098if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005099 cat >> confdefs.h <<\EOF
5100#define HAVE_TM_ZONE 1
5101EOF
5102
5103else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005104 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005105echo "configure:5106: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005106if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005107 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005108else
5109 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005110#line 5111 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111#include "confdefs.h"
5112#include <time.h>
5113#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005114extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005115#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005116int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005117atoi(*tzname);
5118; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005119EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005120if { (eval echo configure:5121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005121 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122 ac_cv_var_tzname=yes
5123else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005124 echo "configure: failed program was:" >&5
5125 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126 rm -rf conftest*
5127 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005128fi
5129rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005131
5132echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133 if test $ac_cv_var_tzname = yes; then
5134 cat >> confdefs.h <<\EOF
5135#define HAVE_TZNAME 1
5136EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005137
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005138 fi
5139fi
5140
5141
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005142echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005143echo "configure:5144: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005144if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005145 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005146else
5147 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005148#line 5149 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005149#include "confdefs.h"
5150#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005151int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152return altzone;
5153; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005154EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005155if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005156 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005157 ac_cv_header_time_altzone=yes
5158else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005159 echo "configure: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005161 rm -rf conftest*
5162 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005163fi
5164rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005165fi
5166
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005167echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005168if test $ac_cv_header_time_altzone = yes; then
5169 cat >> confdefs.h <<\EOF
5170#define HAVE_ALTZONE 1
5171EOF
5172
5173fi
5174
Guido van Rossumda88dad1995-01-26 00:46:29 +00005175was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005176echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005177echo "configure:5178: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005179#line 5180 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005180#include "confdefs.h"
5181
5182#include <sys/types.h>
5183#include <sys/select.h>
5184#include <sys/time.h>
5185
Guido van Rossumf78abae1997-01-21 22:02:36 +00005186int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187;
5188; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005189EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005190if { (eval echo configure:5191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005191 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192 cat >> confdefs.h <<\EOF
5193#define SYS_SELECT_WITH_SYS_TIME 1
5194EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005195 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005196else
5197 echo "configure: failed program was:" >&5
5198 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005199fi
5200rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005201echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005202
5203# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005204
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005205echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005206echo "configure:5207: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005207if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005208 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005209else
5210 if test "$GCC" = yes; then
5211 # GCC predefines this symbol on systems where it applies.
5212cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005213#line 5214 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005214#include "confdefs.h"
5215#ifdef __CHAR_UNSIGNED__
5216 yes
5217#endif
5218
5219EOF
5220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5221 egrep "yes" >/dev/null 2>&1; then
5222 rm -rf conftest*
5223 ac_cv_c_char_unsigned=yes
5224else
5225 rm -rf conftest*
5226 ac_cv_c_char_unsigned=no
5227fi
5228rm -f conftest*
5229
5230else
5231if test "$cross_compiling" = yes; then
5232 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5233else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005234 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005235#line 5236 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005236#include "confdefs.h"
5237/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005239#define volatile
5240#endif
5241main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005242 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005243}
5244EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005245if { (eval echo configure:5246: \"$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 +00005246then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005247 ac_cv_c_char_unsigned=yes
5248else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005249 echo "configure: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5251 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005252 ac_cv_c_char_unsigned=no
5253fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005254rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005255fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005256
5257fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005258fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005259
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005260echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005261if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5262 cat >> confdefs.h <<\EOF
5263#define __CHAR_UNSIGNED__ 1
5264EOF
5265
5266fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005267
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005268echo $ac_n "checking for working const""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005269echo "configure:5270: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005270if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005271 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005272else
5273 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005274#line 5275 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005275#include "confdefs.h"
5276
Guido van Rossumf78abae1997-01-21 22:02:36 +00005277int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005278
5279/* Ultrix mips cc rejects this. */
Greg Warda1c4da22000-11-07 15:44:21 +00005280typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005281/* SunOS 4.1.1 cc rejects this. */
5282char const *const *ccp;
5283char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005284/* NEC SVR4.0.2 mips cc rejects this. */
5285struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005286static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005287/* AIX XL C 1.02.0.0 rejects this.
5288 It does not let you subtract one const X* pointer from another in an arm
5289 of an if-expression whose if-part is not a constant expression */
5290const char *g = "string";
5291ccp = &g + (g ? g-g : 0);
5292/* HPUX 7.0 cc rejects these. */
5293++ccp;
5294p = (char**) ccp;
5295ccp = (char const *const *) p;
5296{ /* SCO 3.2v4 cc rejects this. */
5297 char *t;
5298 char const *s = 0 ? (char *) 0 : (char const *) 0;
5299
5300 *t++ = 0;
5301}
5302{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005303 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005304 const int *foo = &x[0];
5305 ++foo;
5306}
5307{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5308 typedef const int *iptr;
5309 iptr p = 0;
5310 ++p;
5311}
5312{ /* AIX XL C 1.02.0.0 rejects this saying
5313 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5314 struct s { int j; const int *ap[3]; };
5315 struct s *b; b->j = 5;
5316}
5317{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5318 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005319}
5320
5321; return 0; }
5322EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005323if { (eval echo configure:5324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324 rm -rf conftest*
5325 ac_cv_c_const=yes
5326else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005327 echo "configure: failed program was:" >&5
5328 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005329 rm -rf conftest*
5330 ac_cv_c_const=no
5331fi
5332rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005333fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005334
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005335echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005336if test $ac_cv_c_const = no; then
5337 cat >> confdefs.h <<\EOF
5338#define const
5339EOF
5340
5341fi
5342
5343
Guido van Rossumda88dad1995-01-26 00:46:29 +00005344works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005345echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005346echo "configure:5347: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005347cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005348#line 5349 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005349#include "confdefs.h"
5350
Guido van Rossumf78abae1997-01-21 22:02:36 +00005351int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005352volatile int x; x = 0;
5353; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005354EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005355if { (eval echo configure:5356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005356 rm -rf conftest*
5357 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005358else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005359 echo "configure: failed program was:" >&5
5360 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005361 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005362 cat >> confdefs.h <<\EOF
5363#define volatile
5364EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005365
5366fi
5367rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005368echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005369
Guido van Rossumda88dad1995-01-26 00:46:29 +00005370works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005371echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005372echo "configure:5373: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005373cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005374#line 5375 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005375#include "confdefs.h"
5376
Guido van Rossumf78abae1997-01-21 22:02:36 +00005377int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005378signed char c;
5379; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005380EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005381if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005382 rm -rf conftest*
5383 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005384else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005385 echo "configure: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005387 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005388 cat >> confdefs.h <<\EOF
5389#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005390EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005391
5392fi
5393rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005394echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005395
Guido van Rossumda88dad1995-01-26 00:46:29 +00005396have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005397echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005398echo "configure:5399: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005399cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005400#line 5401 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005401#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005402int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005403int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005404return foo(10);
5405; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005406EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005407if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005408 rm -rf conftest*
5409 cat >> confdefs.h <<\EOF
5410#define HAVE_PROTOTYPES 1
5411EOF
5412 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005413else
5414 echo "configure: failed program was:" >&5
5415 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005416fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005417rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005418echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419
Guido van Rossumda88dad1995-01-26 00:46:29 +00005420works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005421echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005422echo "configure:5423: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005423cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005424#line 5425 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005425#include "confdefs.h"
5426
5427#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005428int foo(int x, ...) {
5429 va_list va;
5430 va_start(va, x);
5431 va_arg(va, int);
5432 va_arg(va, char *);
5433 va_arg(va, double);
5434 return 0;
5435}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005436
Guido van Rossumf78abae1997-01-21 22:02:36 +00005437int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005438return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005439; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005440EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005441if { (eval echo configure:5442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005442 rm -rf conftest*
5443 cat >> confdefs.h <<\EOF
5444#define HAVE_STDARG_PROTOTYPES 1
5445EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005446 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005447else
5448 echo "configure: failed program was:" >&5
5449 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005450fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005451rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005452echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005453
Guido van Rossumda88dad1995-01-26 00:46:29 +00005454if test "$have_prototypes" = yes; then
5455bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005456echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005457echo "configure:5458: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005458cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005459#line 5460 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005460#include "confdefs.h"
5461#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005462int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005463char **t;execve("@",t,t);
5464; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005465EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005466if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005467 :
5468else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005469 echo "configure: failed program was:" >&5
5470 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005471 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005472 cat >> confdefs.h <<\EOF
5473#define BAD_EXEC_PROTOTYPES 1
5474EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005475 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005476fi
5477rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005478echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005479fi
5480
Guido van Rossumda88dad1995-01-26 00:46:29 +00005481bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005482echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005483echo "configure:5484: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484if test "$cross_compiling" = yes; then
5485 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5486else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005487 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005488#line 5489 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005489#include "confdefs.h"
5490
5491struct s { int a; int b; };
5492static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005493int foobar() {
5494 static int random;
5495 random = (int) &foo;
5496 return random;
5497}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005498static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005499main() {
5500 exit(!((int)&foo == foobar()));
5501}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005502
5503EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005504if { (eval echo configure:5505: \"$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 +00005505then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005506 :
5507else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005508 echo "configure: failed program was:" >&5
5509 cat conftest.$ac_ext >&5
5510 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005511 cat >> confdefs.h <<\EOF
5512#define BAD_STATIC_FORWARD 1
5513EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005514 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005515fi
5516rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005517fi
5518
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005519echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005520
Guido van Rossumda88dad1995-01-26 00:46:29 +00005521va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005522echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005523echo "configure:5524: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005524cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005525#line 5526 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005526#include "confdefs.h"
5527
5528#ifdef HAVE_STDARG_PROTOTYPES
5529#include <stdarg.h>
5530#else
5531#include <varargs.h>
5532#endif
5533
Guido van Rossumf78abae1997-01-21 22:02:36 +00005534int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535va_list list1, list2; list1 = list2;
5536; return 0; }
5537EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005538if { (eval echo configure:5539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005539 :
5540else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005541 echo "configure: failed program was:" >&5
5542 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005543 rm -rf conftest*
5544 cat >> confdefs.h <<\EOF
5545#define VA_LIST_IS_ARRAY 1
5546EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005547 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548fi
5549rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005550echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005552# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5553echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005554echo "configure:5555: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005555if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005556 echo $ac_n "(cached) $ac_c" 1>&6
5557else
5558 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005559#line 5560 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005560#include "confdefs.h"
5561/* System header to define __stub macros and hopefully few prototypes,
5562 which can conflict with char gethostbyname_r(); below. */
5563#include <assert.h>
5564/* Override any gcc2 internal prototype to avoid an error. */
5565/* We use char because int might match the return type of a gcc2
5566 builtin and then its argument prototype would still apply. */
5567char gethostbyname_r();
5568
5569int main() {
5570
5571/* The GNU C library defines this for functions which it implements
5572 to always fail with ENOSYS. Some functions are actually named
5573 something starting with __ and the normal name is an alias. */
5574#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5575choke me
5576#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005577gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005578#endif
5579
5580; return 0; }
5581EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005582if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005583 rm -rf conftest*
5584 eval "ac_cv_func_gethostbyname_r=yes"
5585else
5586 echo "configure: failed program was:" >&5
5587 cat conftest.$ac_ext >&5
5588 rm -rf conftest*
5589 eval "ac_cv_func_gethostbyname_r=no"
5590fi
5591rm -f conftest*
5592fi
5593
5594if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5595 echo "$ac_t""yes" 1>&6
5596
5597 cat >> confdefs.h <<\EOF
5598#define HAVE_GETHOSTBYNAME_R 1
5599EOF
5600
5601 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005602echo "configure:5603: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005603 OLD_CFLAGS=$CFLAGS
5604 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5605 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005606#line 5607 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005607#include "confdefs.h"
5608
5609# include <netdb.h>
5610
5611int main() {
5612
5613 char *name;
5614 struct hostent *he, *res;
5615 char buffer[2048];
5616 int buflen = 2048;
5617 int h_errnop;
5618
5619 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5620
5621; return 0; }
5622EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005623if { (eval echo configure:5624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005624 rm -rf conftest*
5625
5626 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005627#define HAVE_GETHOSTBYNAME_R 1
5628EOF
5629
5630 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005631#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5632EOF
5633
5634 echo "$ac_t""yes" 1>&6
5635
5636else
5637 echo "configure: failed program was:" >&5
5638 cat conftest.$ac_ext >&5
5639 rm -rf conftest*
5640
5641 echo "$ac_t""no" 1>&6
5642 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005643echo "configure:5644: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005644 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005645#line 5646 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005646#include "confdefs.h"
5647
5648# include <netdb.h>
5649
5650int main() {
5651
5652 char *name;
5653 struct hostent *he;
5654 char buffer[2048];
5655 int buflen = 2048;
5656 int h_errnop;
5657
5658 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5659
5660; return 0; }
5661EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005662if { (eval echo configure:5663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005663 rm -rf conftest*
5664
5665 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005666#define HAVE_GETHOSTBYNAME_R 1
5667EOF
5668
5669 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005670#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5671EOF
5672
5673 echo "$ac_t""yes" 1>&6
5674
5675else
5676 echo "configure: failed program was:" >&5
5677 cat conftest.$ac_ext >&5
5678 rm -rf conftest*
5679
5680 echo "$ac_t""no" 1>&6
5681 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005682echo "configure:5683: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005683 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005684#line 5685 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005685#include "confdefs.h"
5686
5687# include <netdb.h>
5688
5689int main() {
5690
5691 char *name;
5692 struct hostent *he;
5693 struct hostent_data data;
5694
5695 (void) gethostbyname_r(name, he, &data);
5696
5697; return 0; }
5698EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005699if { (eval echo configure:5700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005700 rm -rf conftest*
5701
5702 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005703#define HAVE_GETHOSTBYNAME_R 1
5704EOF
5705
5706 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005707#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5708EOF
5709
5710 echo "$ac_t""yes" 1>&6
5711
5712else
5713 echo "configure: failed program was:" >&5
5714 cat conftest.$ac_ext >&5
5715 rm -rf conftest*
5716
5717 echo "$ac_t""no" 1>&6
5718
5719fi
5720rm -f conftest*
5721
5722fi
5723rm -f conftest*
5724
5725fi
5726rm -f conftest*
5727 CFLAGS=$OLD_CFLAGS
5728
5729else
5730 echo "$ac_t""no" 1>&6
5731
Thomas Wouters3a584202000-08-05 23:28:51 +00005732 for ac_func in gethostbyname
5733do
5734echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005735echo "configure:5736: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005736if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005737 echo $ac_n "(cached) $ac_c" 1>&6
5738else
5739 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005740#line 5741 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005741#include "confdefs.h"
5742/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005743 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005744#include <assert.h>
5745/* Override any gcc2 internal prototype to avoid an error. */
5746/* We use char because int might match the return type of a gcc2
5747 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005748char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005749
5750int main() {
5751
5752/* The GNU C library defines this for functions which it implements
5753 to always fail with ENOSYS. Some functions are actually named
5754 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005755#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005756choke me
5757#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005758$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005759#endif
5760
5761; return 0; }
5762EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005763if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005764 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005765 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005766else
5767 echo "configure: failed program was:" >&5
5768 cat conftest.$ac_ext >&5
5769 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005770 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005771fi
5772rm -f conftest*
5773fi
5774
Thomas Wouters3a584202000-08-05 23:28:51 +00005775if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005776 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005777 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5778 cat >> confdefs.h <<EOF
5779#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005780EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005781
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005782else
5783 echo "$ac_t""no" 1>&6
5784fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005785done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005786
5787
5788fi
5789
5790
5791
5792
5793
5794
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005795
Guido van Rossum627b2d71993-12-24 10:39:16 +00005796# checks for system services
5797# (none yet)
5798
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005799# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005800echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005801echo "configure:5802: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005802if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005803 echo $ac_n "(cached) $ac_c" 1>&6
5804else
5805 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005806#line 5807 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005807#include "confdefs.h"
5808/* System header to define __stub macros and hopefully few prototypes,
5809 which can conflict with char __fpu_control(); below. */
5810#include <assert.h>
5811/* Override any gcc2 internal prototype to avoid an error. */
5812/* We use char because int might match the return type of a gcc2
5813 builtin and then its argument prototype would still apply. */
5814char __fpu_control();
5815
5816int main() {
5817
5818/* The GNU C library defines this for functions which it implements
5819 to always fail with ENOSYS. Some functions are actually named
5820 something starting with __ and the normal name is an alias. */
5821#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5822choke me
5823#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005824__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005825#endif
5826
5827; return 0; }
5828EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005829if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005830 rm -rf conftest*
5831 eval "ac_cv_func___fpu_control=yes"
5832else
5833 echo "configure: failed program was:" >&5
5834 cat conftest.$ac_ext >&5
5835 rm -rf conftest*
5836 eval "ac_cv_func___fpu_control=no"
5837fi
5838rm -f conftest*
5839fi
5840
5841if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5842 echo "$ac_t""yes" 1>&6
5843 :
5844else
5845 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005846echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005847echo "configure:5848: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005848ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005849if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005850 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005851else
5852 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005853LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005855#line 5856 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005856#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005857/* Override any gcc2 internal prototype to avoid an error. */
5858/* We use char because int might match the return type of a gcc2
5859 builtin and then its argument prototype would still apply. */
5860char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005861
Guido van Rossumf78abae1997-01-21 22:02:36 +00005862int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005863__fpu_control()
5864; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005865EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005866if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005867 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005868 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005869else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005870 echo "configure: failed program was:" >&5
5871 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005872 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005873 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005874fi
5875rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005879if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005880 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005881 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5882 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005883 cat >> confdefs.h <<EOF
5884#define $ac_tr_lib 1
5885EOF
5886
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005887 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005888
5889else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005890 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005891fi
5892
5893
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005894fi
5895
5896
Guido van Rossum7f253911997-05-09 02:42:48 +00005897# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005898echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005899echo "configure:5900: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005900# Check whether --with-fpectl or --without-fpectl was given.
5901if test "${with_fpectl+set}" = set; then
5902 withval="$with_fpectl"
5903
5904if test "$withval" != no
5905then cat >> confdefs.h <<\EOF
5906#define WANT_SIGFPE_HANDLER 1
5907EOF
5908 echo "$ac_t""yes" 1>&6
5909else echo "$ac_t""no" 1>&6
5910fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005911else
5912 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005913fi
5914
5915
Guido van Rossum7f43da71994-08-01 12:15:30 +00005916# check for --with-libm=...
5917
Guido van Rossum563e7081996-09-10 18:20:48 +00005918case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005919Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005920next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005921BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005922*) LIBM=-lm
5923esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005924echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005925echo "configure:5926: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005926# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005927if test "${with_libm+set}" = set; then
5928 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929
Guido van Rossum7f253911997-05-09 02:42:48 +00005930if test "$withval" = no
5931then LIBM=
5932 echo "$ac_t""force LIBM empty" 1>&6
5933elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005934then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005935 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005937fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005938else
5939 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005940fi
5941
5942
5943# check for --with-libc=...
5944
Guido van Rossum7f253911997-05-09 02:42:48 +00005945echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005946echo "configure:5947: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005947# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005948if test "${with_libc+set}" = set; then
5949 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950
Guido van Rossum7f253911997-05-09 02:42:48 +00005951if test "$withval" = no
5952then LIBC=
5953 echo "$ac_t""force LIBC empty" 1>&6
5954elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005955then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005956 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005957else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005958fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005959else
5960 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005961fi
5962
5963
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005964# check for --with-check-import-case
5965# Check whether --with-check-import-case or --without-check-import-case was given.
5966if test "${with_check_import_case+set}" = set; then
5967 withval="$with_check_import_case"
5968 :
5969fi
5970
5971echo $ac_n "checking for --with-check-import-case""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005972echo "configure:5973: checking for --with-check-import-case" >&5
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005973if test "$with_check_import_case"
5974then
5975 cat >> confdefs.h <<\EOF
5976#define CHECK_IMPORT_CASE 1
5977EOF
5978
5979 echo "$ac_t""yes" 1>&6
5980else
5981 echo "$ac_t""no" 1>&6
5982fi
5983
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005984# check for hypot() in math library
5985LIBS_SAVE=$LIBS
5986LIBS="$LIBS $LIBM"
5987for ac_func in hypot
5988do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005989echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00005990echo "configure:5991: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005991if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005992 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005993else
5994 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00005995#line 5996 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005996#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005997/* System header to define __stub macros and hopefully few prototypes,
5998 which can conflict with char $ac_func(); below. */
5999#include <assert.h>
6000/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006001/* We use char because int might match the return type of a gcc2
6002 builtin and then its argument prototype would still apply. */
6003char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006004
Guido van Rossumf78abae1997-01-21 22:02:36 +00006005int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006006
6007/* The GNU C library defines this for functions which it implements
6008 to always fail with ENOSYS. Some functions are actually named
6009 something starting with __ and the normal name is an alias. */
6010#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6011choke me
6012#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006013$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006014#endif
6015
6016; return 0; }
6017EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006018if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006019 rm -rf conftest*
6020 eval "ac_cv_func_$ac_func=yes"
6021else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006022 echo "configure: failed program was:" >&5
6023 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006024 rm -rf conftest*
6025 eval "ac_cv_func_$ac_func=no"
6026fi
6027rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006028fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006029
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006030if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6031 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006032 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6033 cat >> confdefs.h <<EOF
6034#define $ac_tr_func 1
6035EOF
6036
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006037else
6038 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006039LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006040fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006041done
6042
Guido van Rossumf78abae1997-01-21 22:02:36 +00006043
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006044LIBS=$LIBS_SAVE
6045
Guido van Rossumad713701997-07-10 22:42:38 +00006046# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006047echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00006048echo "configure:6049: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006049if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006050 echo $ac_n "(cached) $ac_c" 1>&6
6051else
6052 if test "$cross_compiling" = yes; then
6053 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6054else
6055 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006056#line 6057 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006057#include "confdefs.h"
6058#include <stdio.h>
6059#ifdef HAVE_STDLIB
6060#include <stdlib.h>
6061#else
6062char *malloc(), *realloc();
6063int *free();
6064#endif
6065main() {
6066 char *p;
6067 p = malloc(0);
6068 if (p == NULL) exit(1);
6069 p = realloc(p, 0);
6070 if (p == NULL) exit(1);
6071 free(p);
6072 exit(0);
6073}
6074EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006075if { (eval echo configure:6076: \"$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 +00006076then
6077 ac_cv_malloc_zero=nonnull
6078else
6079 echo "configure: failed program was:" >&5
6080 cat conftest.$ac_ext >&5
6081 rm -fr conftest*
6082 ac_cv_malloc_zero=null
6083fi
6084rm -fr conftest*
6085fi
6086
6087fi
6088
6089echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6090if test "$ac_cv_malloc_zero" = null
6091then
6092 cat >> confdefs.h <<\EOF
6093#define MALLOC_ZERO_RETURNS_NULL 1
6094EOF
6095
6096fi
6097
Guido van Rossumef2255b2000-03-10 22:30:29 +00006098# check for wchar.h
6099ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6100echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00006101echo "configure:6102: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006102if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006103 echo $ac_n "(cached) $ac_c" 1>&6
6104else
6105 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006106#line 6107 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006107#include "confdefs.h"
6108#include <wchar.h>
6109EOF
6110ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Eric S. Raymonda8885402001-01-17 08:25:11 +00006111{ (eval echo configure:6112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006112ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6113if test -z "$ac_err"; then
6114 rm -rf conftest*
6115 eval "ac_cv_header_$ac_safe=yes"
6116else
6117 echo "$ac_err" >&5
6118 echo "configure: failed program was:" >&5
6119 cat conftest.$ac_ext >&5
6120 rm -rf conftest*
6121 eval "ac_cv_header_$ac_safe=no"
6122fi
6123rm -f conftest*
6124fi
6125if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6126 echo "$ac_t""yes" 1>&6
6127 cat >> confdefs.h <<\EOF
6128#define HAVE_WCHAR_H 1
6129EOF
6130 wchar_h="yes"
6131else
6132 echo "$ac_t""no" 1>&6
6133wchar_h="no"
6134
6135fi
6136
6137
6138# check for usable wchar_t
6139usable_wchar_t="unkown"
6140echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00006141echo "configure:6142: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00006142if test "$cross_compiling" = yes; then
6143 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6144else
6145 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006146#line 6147 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006147#include "confdefs.h"
6148
6149#include "wchar.h"
6150#include "wctype.h"
6151main() {
6152 wchar_t s;
6153 if (sizeof(s) == 2)
6154 exit(0);
6155 else
6156 exit(1);
6157}
6158
6159EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006160if { (eval echo configure:6161: \"$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 +00006161then
6162 cat >> confdefs.h <<\EOF
6163#define HAVE_USABLE_WCHAR_T 1
6164EOF
6165 usable_wchar_t="yes"
6166else
6167 echo "configure: failed program was:" >&5
6168 cat conftest.$ac_ext >&5
6169 rm -fr conftest*
6170 usable_wchar_t="no"
6171fi
6172rm -fr conftest*
6173fi
6174
6175echo "$ac_t""$usable_wchar_t" 1>&6
6176
6177# check for endianness
6178echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00006179echo "configure:6180: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006180if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006181 echo $ac_n "(cached) $ac_c" 1>&6
6182else
6183 ac_cv_c_bigendian=unknown
6184# See if sys/param.h defines the BYTE_ORDER macro.
6185cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006186#line 6187 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006187#include "confdefs.h"
6188#include <sys/types.h>
6189#include <sys/param.h>
6190int main() {
6191
6192#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6193 bogus endian macros
6194#endif
6195; return 0; }
6196EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006197if { (eval echo configure:6198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006198 rm -rf conftest*
6199 # It does; now see whether it defined to BIG_ENDIAN or not.
6200cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006201#line 6202 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006202#include "confdefs.h"
6203#include <sys/types.h>
6204#include <sys/param.h>
6205int main() {
6206
6207#if BYTE_ORDER != BIG_ENDIAN
6208 not big endian
6209#endif
6210; return 0; }
6211EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006212if { (eval echo configure:6213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006213 rm -rf conftest*
6214 ac_cv_c_bigendian=yes
6215else
6216 echo "configure: failed program was:" >&5
6217 cat conftest.$ac_ext >&5
6218 rm -rf conftest*
6219 ac_cv_c_bigendian=no
6220fi
6221rm -f conftest*
6222else
6223 echo "configure: failed program was:" >&5
6224 cat conftest.$ac_ext >&5
6225fi
6226rm -f conftest*
6227if test $ac_cv_c_bigendian = unknown; then
6228if test "$cross_compiling" = yes; then
6229 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6230else
6231 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006232#line 6233 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006233#include "confdefs.h"
6234main () {
6235 /* Are we little or big endian? From Harbison&Steele. */
6236 union
6237 {
6238 long l;
6239 char c[sizeof (long)];
6240 } u;
6241 u.l = 1;
6242 exit (u.c[sizeof (long) - 1] == 1);
6243}
6244EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006245if { (eval echo configure:6246: \"$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 +00006246then
6247 ac_cv_c_bigendian=no
6248else
6249 echo "configure: failed program was:" >&5
6250 cat conftest.$ac_ext >&5
6251 rm -fr conftest*
6252 ac_cv_c_bigendian=yes
6253fi
6254rm -fr conftest*
6255fi
6256
6257fi
6258fi
6259
6260echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6261if test $ac_cv_c_bigendian = yes; then
6262 cat >> confdefs.h <<\EOF
6263#define WORDS_BIGENDIAN 1
6264EOF
6265
6266fi
6267
6268
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006269# Check whether right shifting a negative integer extends the sign bit
6270# or fills with zeros (like the Cray J90, according to Tim Peters).
6271echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00006272echo "configure:6273: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006273if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006274 echo $ac_n "(cached) $ac_c" 1>&6
6275else
6276
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006277if test "$cross_compiling" = yes; then
6278 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6279else
6280 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006281#line 6282 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006282#include "confdefs.h"
6283
6284int main()
6285{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006286 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006287}
6288
6289EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006290if { (eval echo configure:6291: \"$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 +00006291then
6292 ac_cv_rshift_extends_sign=yes
6293else
6294 echo "configure: failed program was:" >&5
6295 cat conftest.$ac_ext >&5
6296 rm -fr conftest*
6297 ac_cv_rshift_extends_sign=no
6298fi
6299rm -fr conftest*
6300fi
6301
6302fi
6303
6304echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6305if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006306then
6307 cat >> confdefs.h <<\EOF
6308#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6309EOF
6310
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006311fi
6312
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006313# check for getc_unlocked and related locking functions
6314echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00006315echo "configure:6316: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006316if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6317 echo $ac_n "(cached) $ac_c" 1>&6
6318else
6319
6320cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006321#line 6322 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006322#include "confdefs.h"
6323#include <stdio.h>
6324int main() {
6325
6326 FILE *f = fopen("/dev/null", "r");
6327 flockfile(f);
6328 getc_unlocked(f);
6329 funlockfile(f);
6330
6331; return 0; }
6332EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006333if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006334 rm -rf conftest*
6335 ac_cv_have_getc_unlocked=yes
6336else
6337 echo "configure: failed program was:" >&5
6338 cat conftest.$ac_ext >&5
6339 rm -rf conftest*
6340 ac_cv_have_getc_unlocked=no
6341fi
6342rm -f conftest*
6343fi
6344
6345echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6346if test "$ac_cv_have_getc_unlocked" = yes
6347then
6348 cat >> confdefs.h <<\EOF
6349#define HAVE_GETC_UNLOCKED 1
6350EOF
6351
6352fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006353
Guido van Rossum95713eb2000-05-18 20:53:31 +00006354# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6355# Add sys/socket.h to confdefs.h
6356cat >> confdefs.h <<\EOF
6357#ifdef HAVE_SYS_SOCKET_H
6358#include <sys/socket.h>
6359#endif
6360EOF
6361echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00006362echo "configure:6363: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006363if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006364 echo $ac_n "(cached) $ac_c" 1>&6
6365else
6366 cat > conftest.$ac_ext <<EOF
Eric S. Raymonda8885402001-01-17 08:25:11 +00006367#line 6368 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006368#include "confdefs.h"
6369#include <sys/types.h>
6370#if STDC_HEADERS
6371#include <stdlib.h>
6372#include <stddef.h>
6373#endif
6374EOF
6375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6376 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6377 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006378 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006379else
6380 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006381 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006382fi
6383rm -f conftest*
6384
6385fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006386echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6387if test $ac_cv_type_socklen_t = no; then
6388 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006389#define socklen_t int
6390EOF
6391
6392fi
6393
6394
Fred Drake036144d2000-10-26 17:09:35 +00006395echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
Eric S. Raymonda8885402001-01-17 08:25:11 +00006396echo "configure:6397: checking for Modules/Setup" >&5
Fred Drake036144d2000-10-26 17:09:35 +00006397if test ! -f Modules/Setup ; then
Guido van Rossum262cf202000-11-02 19:33:53 +00006398 if test ! -d Modules ; then
6399 mkdir Modules
6400 fi
Fred Drake036144d2000-10-26 17:09:35 +00006401 cp "$srcdir/Modules/Setup.dist" Modules/Setup
6402 echo "$ac_t""creating" 1>&6
6403else
6404 echo "$ac_t""already exists" 1>&6
6405fi
6406
Guido van Rossum627b2d71993-12-24 10:39:16 +00006407# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006408trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006409cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006410# This file is a shell script that caches the results of configure
6411# tests run on this system so they can be shared between configure
6412# scripts and configure runs. It is not useful on other systems.
6413# If it contains results you don't want to keep, you may remove or edit it.
6414#
6415# By default, configure uses ./config.cache as the cache file,
6416# creating it if it does not exist already. You can give configure
6417# the --cache-file=FILE option to use a different cache file; that is
6418# what configure does when it calls configure scripts in
6419# subdirectories, so they share the cache.
6420# Giving --cache-file=/dev/null disables caching, for debugging configure.
6421# config.status only pays attention to the cache file if you give it the
6422# --recheck option to rerun configure.
6423#
6424EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006425# The following way of writing the cache mishandles newlines in values,
6426# but we know of no workaround that is simple, portable, and efficient.
6427# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006428# Ultrix sh set writes to stderr and can't be redirected directly,
6429# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006430(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006431 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006432 *ac_space=\ *)
6433 # `set' does not quote correctly, so add quotes (double-quote substitution
6434 # turns \\\\ into \\, and sed turns \\ into \).
6435 sed -n \
6436 -e "s/'/'\\\\''/g" \
6437 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6438 ;;
6439 *)
6440 # `set' quotes correctly as required by POSIX, so do not add quotes.
6441 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6442 ;;
6443 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006444if cmp -s $cache_file confcache; then
6445 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006447 if test -w $cache_file; then
6448 echo "updating cache $cache_file"
6449 cat confcache > $cache_file
6450 else
6451 echo "not updating unwritable cache $cache_file"
6452 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006454rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00006455
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006456trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457
6458test "x$prefix" = xNONE && prefix=$ac_default_prefix
6459# Let make expand exec_prefix.
6460test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006461
Guido van Rossum7f43da71994-08-01 12:15:30 +00006462# Any assignment to VPATH causes Sun make to only execute
6463# the first set of double-colon rules, so remove it if not needed.
6464# If there is a colon in the path, we need to keep it.
6465if test "x$srcdir" = x.; then
6466 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6467fi
6468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006469trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471DEFS=-DHAVE_CONFIG_H
6472
6473# Without the "./", some shells look in PATH for config.status.
6474: ${CONFIG_STATUS=./config.status}
6475
6476echo creating $CONFIG_STATUS
6477rm -f $CONFIG_STATUS
6478cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006479#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006480# Generated automatically by configure.
6481# Run this file to recreate the current configuration.
6482# This directory was configured as follows,
6483# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6484#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485# $0 $ac_configure_args
6486#
6487# Compiler output produced by configure, useful for debugging
6488# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006491for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006492do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006493 case "\$ac_option" in
6494 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6496 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006497 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006498 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006499 exit 0 ;;
6500 -help | --help | --hel | --he | --h)
6501 echo "\$ac_cs_usage"; exit 0 ;;
6502 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006503 esac
6504done
6505
Guido van Rossum7f43da71994-08-01 12:15:30 +00006506ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006507
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006508trap 'rm -fr `echo "Makefile \
6509 Objects/Makefile \
6510 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006511 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006512 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006513 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006514 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006515EOF
6516cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006517
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006518# Protect against being on the right side of a sed subst in config.status.
6519sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6520 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006521$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006522$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006523s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006524s%@CFLAGS@%$CFLAGS%g
6525s%@CPPFLAGS@%$CPPFLAGS%g
6526s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006527s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006528s%@DEFS@%$DEFS%g
6529s%@LDFLAGS@%$LDFLAGS%g
6530s%@LIBS@%$LIBS%g
6531s%@exec_prefix@%$exec_prefix%g
6532s%@prefix@%$prefix%g
6533s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006534s%@bindir@%$bindir%g
6535s%@sbindir@%$sbindir%g
6536s%@libexecdir@%$libexecdir%g
6537s%@datadir@%$datadir%g
6538s%@sysconfdir@%$sysconfdir%g
6539s%@sharedstatedir@%$sharedstatedir%g
6540s%@localstatedir@%$localstatedir%g
6541s%@libdir@%$libdir%g
6542s%@includedir@%$includedir%g
6543s%@oldincludedir@%$oldincludedir%g
6544s%@infodir@%$infodir%g
6545s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006546s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006547s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006548s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006549s%@SET_CXX@%$SET_CXX%g
6550s%@MAINOBJ@%$MAINOBJ%g
Martin v. Löwis22352952000-12-13 17:37:02 +00006551s%@CXX@%$CXX%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006552s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006553s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006554s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6555s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumaef734b2001-01-10 21:09:12 +00006556s%@SET_DLLLIBRARY@%$SET_DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006557s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006558s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006559s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006560s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006561s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6562s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006563s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006564s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006565s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006566s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006567s%@SO@%$SO%g
6568s%@LDSHARED@%$LDSHARED%g
6569s%@CCSHARED@%$CCSHARED%g
6570s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum3d15bd82001-01-10 18:53:48 +00006571s%@USE_NCURSES_MODULE@%$USE_NCURSES_MODULE%g
6572s%@USE_READLINE_MODULE@%$USE_READLINE_MODULE%g
Eric S. Raymonda8885402001-01-17 08:25:11 +00006573s%@USE_GDBM_MODULE@%$USE_GDBM_MODULE%g
6574s%@HAVE_LIBGDBM@%$HAVE_LIBGDBM%g
6575s%@USE_NDBM_MODULE@%$USE_NDBM_MODULE%g
6576s%@HAVE_LIBNDBM@%$HAVE_LIBNDBM%g
6577s%@USE_CRYPT_MODULE@%$USE_CRYPT_MODULE%g
6578s%@HAVE_LIBCRYPT@%$HAVE_LIBCRYPT%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006579s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006580s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006581s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Barry Warsawa57b89b2001-01-15 17:07:21 +00006582s%@USE_DBM_MODULE@%$USE_DBM_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006583s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006584s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006585s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006586s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006587s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006588s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6589s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6590s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006591s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006592s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006593s%@LIBM@%$LIBM%g
6594s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006595
6596CEOF
6597EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006598
6599cat >> $CONFIG_STATUS <<\EOF
6600
6601# Split the substitutions into bite-sized pieces for seds with
6602# small command number limits, like on Digital OSF/1 and HP-UX.
6603ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6604ac_file=1 # Number of current file.
6605ac_beg=1 # First line for current file.
6606ac_end=$ac_max_sed_cmds # Line after last line for current file.
6607ac_more_lines=:
6608ac_sed_cmds=""
6609while $ac_more_lines; do
6610 if test $ac_beg -gt 1; then
6611 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6612 else
6613 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6614 fi
6615 if test ! -s conftest.s$ac_file; then
6616 ac_more_lines=false
6617 rm -f conftest.s$ac_file
6618 else
6619 if test -z "$ac_sed_cmds"; then
6620 ac_sed_cmds="sed -f conftest.s$ac_file"
6621 else
6622 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6623 fi
6624 ac_file=`expr $ac_file + 1`
6625 ac_beg=$ac_end
6626 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6627 fi
6628done
6629if test -z "$ac_sed_cmds"; then
6630 ac_sed_cmds=cat
6631fi
6632EOF
6633
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006634cat >> $CONFIG_STATUS <<EOF
6635
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006636CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6637 Objects/Makefile \
6638 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006639 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006640 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006641 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006642 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006643EOF
6644cat >> $CONFIG_STATUS <<\EOF
6645for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006646 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006647 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006648 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006649 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6650 *) ac_file_in="${ac_file}.in" ;;
6651 esac
6652
Guido van Rossumf78abae1997-01-21 22:02:36 +00006653 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006654
6655 # Remove last slash and all that follows it. Not all systems have dirname.
6656 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6657 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6658 # The file is in a subdirectory.
6659 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006660 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006661 # A "../" for each directory in $ac_dir_suffix.
6662 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6663 else
6664 ac_dir_suffix= ac_dots=
6665 fi
6666
6667 case "$ac_given_srcdir" in
6668 .) srcdir=.
6669 if test -z "$ac_dots"; then top_srcdir=.
6670 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6671 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6672 *) # Relative path.
6673 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6674 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6675 esac
6676
Guido van Rossumf78abae1997-01-21 22:02:36 +00006677
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006678 echo creating "$ac_file"
6679 rm -f "$ac_file"
6680 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6681 case "$ac_file" in
6682 *Makefile*) ac_comsub="1i\\
6683# $configure_input" ;;
6684 *) ac_comsub= ;;
6685 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006686
6687 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 +00006688 sed -e "$ac_comsub
6689s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006690s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006691s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006692" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006693fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006694rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006695
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006696# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6697# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006698#
6699# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006700ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6701ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006702ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006703ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006704# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006705ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6706ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006707ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006709# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6711ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006712ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006713ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006714
Guido van Rossumf78abae1997-01-21 22:02:36 +00006715if test "${CONFIG_HEADERS+set}" != set; then
6716EOF
6717cat >> $CONFIG_STATUS <<EOF
6718 CONFIG_HEADERS="config.h"
6719EOF
6720cat >> $CONFIG_STATUS <<\EOF
6721fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006722for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006723 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006724 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006725 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006726 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6727 *) ac_file_in="${ac_file}.in" ;;
6728 esac
6729
Guido van Rossum7f43da71994-08-01 12:15:30 +00006730 echo creating $ac_file
6731
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006732 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006733 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6734 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006735
6736EOF
6737
6738# Transform confdefs.h into a sed script conftest.vals that substitutes
6739# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006740# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006741# Protect against being in an unquoted here document in config.status.
6742rm -f conftest.vals
6743cat > conftest.hdr <<\EOF
6744s/[\\&%]/\\&/g
6745s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006746s%#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 +00006747s%ac_d%ac_u%gp
6748s%ac_u%ac_e%gp
6749EOF
6750sed -n -f conftest.hdr confdefs.h > conftest.vals
6751rm -f conftest.hdr
6752
6753# This sed command replaces #undef with comments. This is necessary, for
6754# example, in the case of _POSIX_SOURCE, which is predefined and required
6755# on some systems where configure will not decide to define it.
6756cat >> conftest.vals <<\EOF
6757s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6758EOF
6759
6760# Break up conftest.vals because some shells have a limit on
6761# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006762
6763rm -f conftest.tail
6764while :
6765do
6766 ac_lines=`grep -c . conftest.vals`
6767 # grep -c gives empty output for an empty file on some AIX systems.
6768 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6769 # Write a limited-size here document to conftest.frag.
6770 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6771 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6772 echo 'CEOF
6773 sed -f conftest.frag conftest.in > conftest.out
6774 rm -f conftest.in
6775 mv conftest.out conftest.in
6776' >> $CONFIG_STATUS
6777 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6778 rm -f conftest.vals
6779 mv conftest.tail conftest.vals
6780done
6781rm -f conftest.vals
6782
6783cat >> $CONFIG_STATUS <<\EOF
6784 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006785 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006786 cat conftest.in >> conftest.h
6787 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006788 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006789 echo "$ac_file is unchanged"
6790 rm -f conftest.h
6791 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006792 # Remove last slash and all that follows it. Not all systems have dirname.
6793 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6794 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6795 # The file is in a subdirectory.
6796 test ! -d "$ac_dir" && mkdir "$ac_dir"
6797 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006798 rm -f $ac_file
6799 mv conftest.h $ac_file
6800 fi
6801fi; done
6802
Guido van Rossumf78abae1997-01-21 22:02:36 +00006803EOF
6804cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006805
Guido van Rossumf78abae1997-01-21 22:02:36 +00006806EOF
6807cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006808
6809exit 0
6810EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006811chmod +x $CONFIG_STATUS
6812rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006813test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006814