blob: 62c061410481517182ea8800fc571d03aa33851e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003# From configure.in Revision: 1.108
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 Rossume6c2cf11999-01-08 21:08:33 +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
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017--with-next-archs='arch1 arch2 ..' build MAB binary"
18ac_help="$ac_help
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000019--with-next-framework Build (OpenStep|Rhapsody|MacOS10) framework"
20ac_help="$ac_help
21--with-dyld Use (OpenStep|Rhapsody|MacOS10) dynamic linker"
22ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023--without-gcc never use gcc"
24ac_help="$ac_help
Guido van Rossuma68acba1996-07-31 17:36:39 +000025--with-libs='lib1 ...' link against additional libs"
26ac_help="$ac_help
Guido van Rossumb06df271997-08-05 21:50:20 +000027--with(out)-readline obsolete, edit Modules/Setup instead"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028ac_help="$ac_help
Guido van Rossumec2f0731997-01-22 20:54:01 +000029--with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
30ac_help="$ac_help
31--with-threads alias for --with-thread"
32ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000033--with-thread[=DIRECTORY] make interpreter thread-safe"
34ac_help="$ac_help
35--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
36ac_help="$ac_help
37--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
38ac_help="$ac_help
Guido van Rossum7f253911997-05-09 02:42:48 +000039--with-fpectl enable SIGFPE catching"
40ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000041--with-libm=STRING math library"
42ac_help="$ac_help
43--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000044
Guido van Rossum7f43da71994-08-01 12:15:30 +000045# Initialize some variables set by options.
46# The variables have the same names as the options, with
47# dashes changed to underlines.
48build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000049cache_file=./config.cache
50exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000051host=NONE
52no_create=
53nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000054no_recursion=
55prefix=NONE
56program_prefix=NONE
57program_suffix=NONE
58program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000059silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000060site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000061srcdir=
62target=NONE
63verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000064x_includes=NONE
65x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000066bindir='${exec_prefix}/bin'
67sbindir='${exec_prefix}/sbin'
68libexecdir='${exec_prefix}/libexec'
69datadir='${prefix}/share'
70sysconfdir='${prefix}/etc'
71sharedstatedir='${prefix}/com'
72localstatedir='${prefix}/var'
73libdir='${exec_prefix}/lib'
74includedir='${prefix}/include'
75oldincludedir='/usr/include'
76infodir='${prefix}/info'
77mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000078
79# Initialize some other variables.
80subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000081MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000082SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000083# Maximum number of lines to put in a shell here document.
84ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000085
86ac_prev=
87for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000088do
Guido van Rossum627b2d71993-12-24 10:39:16 +000089
Guido van Rossum7f43da71994-08-01 12:15:30 +000090 # If the previous option needs an argument, assign it.
91 if test -n "$ac_prev"; then
92 eval "$ac_prev=\$ac_option"
93 ac_prev=
94 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000095 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000096
Guido van Rossum7f43da71994-08-01 12:15:30 +000097 case "$ac_option" in
98 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
99 *) ac_optarg= ;;
100 esac
101
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000102 # Accept the important Cygnus configure options, so we can diagnose typos.
103
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104 case "$ac_option" in
105
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000106 -bindir | --bindir | --bindi | --bind | --bin | --bi)
107 ac_prev=bindir ;;
108 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
109 bindir="$ac_optarg" ;;
110
111 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000112 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000113 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000114 build="$ac_optarg" ;;
115
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000116 -cache-file | --cache-file | --cache-fil | --cache-fi \
117 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
118 ac_prev=cache_file ;;
119 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
120 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
121 cache_file="$ac_optarg" ;;
122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000123 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
124 ac_prev=datadir ;;
125 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
126 | --da=*)
127 datadir="$ac_optarg" ;;
128
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 -disable-* | --disable-*)
130 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000131 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000132 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000133 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000134 fi
135 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136 eval "enable_${ac_feature}=no" ;;
137
138 -enable-* | --enable-*)
139 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000140 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000141 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000142 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000143 fi
144 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
145 case "$ac_option" in
146 *=*) ;;
147 *) ac_optarg=yes ;;
148 esac
149 eval "enable_${ac_feature}='$ac_optarg'" ;;
150
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
152 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
153 | --exec | --exe | --ex)
154 ac_prev=exec_prefix ;;
155 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
156 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
157 | --exec=* | --exe=* | --ex=*)
158 exec_prefix="$ac_optarg" ;;
159
160 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000161 # Obsolete; use --with-gas.
162 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000163
164 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000165 # Omit some internal or obsolete options to make the list less imposing.
166 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000167 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000168Usage: configure [options] [host]
169Options: [defaults in brackets after descriptions]
170Configuration:
171 --cache-file=FILE cache test results in FILE
172 --help print this message
173 --no-create do not create output files
174 --quiet, --silent do not print \`checking...' messages
175 --version print the version of autoconf that created configure
176Directory and file names:
177 --prefix=PREFIX install architecture-independent files in PREFIX
178 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000179 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000180 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000181 --bindir=DIR user executables in DIR [EPREFIX/bin]
182 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
183 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
184 --datadir=DIR read-only architecture-independent data in DIR
185 [PREFIX/share]
186 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
187 --sharedstatedir=DIR modifiable architecture-independent data in DIR
188 [PREFIX/com]
189 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
190 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
191 --includedir=DIR C header files in DIR [PREFIX/include]
192 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
193 --infodir=DIR info documentation in DIR [PREFIX/info]
194 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000195 --srcdir=DIR find the sources in DIR [configure dir or ..]
196 --program-prefix=PREFIX prepend PREFIX to installed program names
197 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --program-transform-name=PROGRAM
199 run sed PROGRAM on installed program names
200EOF
201 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000202Host type:
203 --build=BUILD configure for building on BUILD [BUILD=HOST]
204 --host=HOST configure for HOST [guessed]
205 --target=TARGET configure for TARGET [TARGET=HOST]
206Features and packages:
207 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
208 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
209 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
210 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
211 --x-includes=DIR X include files are in DIR
212 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000213EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000214 if test -n "$ac_help"; then
215 echo "--enable and --with options recognized:$ac_help"
216 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000217 exit 0 ;;
218
219 -host | --host | --hos | --ho)
220 ac_prev=host ;;
221 -host=* | --host=* | --hos=* | --ho=*)
222 host="$ac_optarg" ;;
223
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000224 -includedir | --includedir | --includedi | --included | --include \
225 | --includ | --inclu | --incl | --inc)
226 ac_prev=includedir ;;
227 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
228 | --includ=* | --inclu=* | --incl=* | --inc=*)
229 includedir="$ac_optarg" ;;
230
231 -infodir | --infodir | --infodi | --infod | --info | --inf)
232 ac_prev=infodir ;;
233 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
234 infodir="$ac_optarg" ;;
235
236 -libdir | --libdir | --libdi | --libd)
237 ac_prev=libdir ;;
238 -libdir=* | --libdir=* | --libdi=* | --libd=*)
239 libdir="$ac_optarg" ;;
240
241 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
242 | --libexe | --libex | --libe)
243 ac_prev=libexecdir ;;
244 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
245 | --libexe=* | --libex=* | --libe=*)
246 libexecdir="$ac_optarg" ;;
247
248 -localstatedir | --localstatedir | --localstatedi | --localstated \
249 | --localstate | --localstat | --localsta | --localst \
250 | --locals | --local | --loca | --loc | --lo)
251 ac_prev=localstatedir ;;
252 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
253 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
254 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
255 localstatedir="$ac_optarg" ;;
256
257 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
258 ac_prev=mandir ;;
259 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
260 mandir="$ac_optarg" ;;
261
Guido van Rossum7f43da71994-08-01 12:15:30 +0000262 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000263 # Obsolete; use --without-fp.
264 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000265
266 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
267 | --no-cr | --no-c)
268 no_create=yes ;;
269
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000270 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
271 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
272 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000273
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000274 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
275 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
276 | --oldin | --oldi | --old | --ol | --o)
277 ac_prev=oldincludedir ;;
278 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
279 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
280 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
281 oldincludedir="$ac_optarg" ;;
282
Guido van Rossum7f43da71994-08-01 12:15:30 +0000283 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
284 ac_prev=prefix ;;
285 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
286 prefix="$ac_optarg" ;;
287
288 -program-prefix | --program-prefix | --program-prefi | --program-pref \
289 | --program-pre | --program-pr | --program-p)
290 ac_prev=program_prefix ;;
291 -program-prefix=* | --program-prefix=* | --program-prefi=* \
292 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
293 program_prefix="$ac_optarg" ;;
294
295 -program-suffix | --program-suffix | --program-suffi | --program-suff \
296 | --program-suf | --program-su | --program-s)
297 ac_prev=program_suffix ;;
298 -program-suffix=* | --program-suffix=* | --program-suffi=* \
299 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
300 program_suffix="$ac_optarg" ;;
301
302 -program-transform-name | --program-transform-name \
303 | --program-transform-nam | --program-transform-na \
304 | --program-transform-n | --program-transform- \
305 | --program-transform | --program-transfor \
306 | --program-transfo | --program-transf \
307 | --program-trans | --program-tran \
308 | --progr-tra | --program-tr | --program-t)
309 ac_prev=program_transform_name ;;
310 -program-transform-name=* | --program-transform-name=* \
311 | --program-transform-nam=* | --program-transform-na=* \
312 | --program-transform-n=* | --program-transform-=* \
313 | --program-transform=* | --program-transfor=* \
314 | --program-transfo=* | --program-transf=* \
315 | --program-trans=* | --program-tran=* \
316 | --progr-tra=* | --program-tr=* | --program-t=*)
317 program_transform_name="$ac_optarg" ;;
318
319 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
320 | -silent | --silent | --silen | --sile | --sil)
321 silent=yes ;;
322
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000323 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
324 ac_prev=sbindir ;;
325 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
326 | --sbi=* | --sb=*)
327 sbindir="$ac_optarg" ;;
328
329 -sharedstatedir | --sharedstatedir | --sharedstatedi \
330 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
331 | --sharedst | --shareds | --shared | --share | --shar \
332 | --sha | --sh)
333 ac_prev=sharedstatedir ;;
334 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
335 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
336 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
337 | --sha=* | --sh=*)
338 sharedstatedir="$ac_optarg" ;;
339
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000340 -site | --site | --sit)
341 ac_prev=site ;;
342 -site=* | --site=* | --sit=*)
343 site="$ac_optarg" ;;
344
Guido van Rossum7f43da71994-08-01 12:15:30 +0000345 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
346 ac_prev=srcdir ;;
347 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
348 srcdir="$ac_optarg" ;;
349
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000350 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
351 | --syscon | --sysco | --sysc | --sys | --sy)
352 ac_prev=sysconfdir ;;
353 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
354 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
355 sysconfdir="$ac_optarg" ;;
356
Guido van Rossum7f43da71994-08-01 12:15:30 +0000357 -target | --target | --targe | --targ | --tar | --ta | --t)
358 ac_prev=target ;;
359 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
360 target="$ac_optarg" ;;
361
362 -v | -verbose | --verbose | --verbos | --verbo | --verb)
363 verbose=yes ;;
364
365 -version | --version | --versio | --versi | --vers)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000366 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367 exit 0 ;;
368
369 -with-* | --with-*)
370 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000371 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000372 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 fi
375 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 case "$ac_option" in
377 *=*) ;;
378 *) ac_optarg=yes ;;
379 esac
380 eval "with_${ac_package}='$ac_optarg'" ;;
381
382 -without-* | --without-*)
383 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000384 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000385 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000386 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000387 fi
388 ac_package=`echo $ac_package| sed 's/-/_/g'`
389 eval "with_${ac_package}=no" ;;
390
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000391 --x)
392 # Obsolete; use --with-x.
393 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000394
395 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
396 | --x-incl | --x-inc | --x-in | --x-i)
397 ac_prev=x_includes ;;
398 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
399 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
400 x_includes="$ac_optarg" ;;
401
402 -x-libraries | --x-libraries | --x-librarie | --x-librari \
403 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
404 ac_prev=x_libraries ;;
405 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
406 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
407 x_libraries="$ac_optarg" ;;
408
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000410 ;;
411
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000412 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000413 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000414 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000416 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000417 { 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 +0000418 fi
419 nonopt="$ac_option"
420 ;;
421
422 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000423done
424
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427fi
428
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000429trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000430
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000432# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433# 1 file creation
434# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000435# 3 some systems may open it to /dev/tty
436# 4 used on the Kubota Titan
437# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000438# 5 compiler messages saved in config.log
439if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000440 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000441else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000442 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443fi
444exec 5>./config.log
445
446echo "\
447This file contains any messages produced by compilers while
448running configure, to aid debugging if configure makes a mistake.
449" 1>&5
450
451# Strip out --no-create and --no-recursion so they do not pile up.
452# Also quote any args containing shell metacharacters.
453ac_configure_args=
454for ac_arg
455do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000456 case "$ac_arg" in
457 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
458 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000459 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
460 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
461 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
462 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
463 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000464 esac
465done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000466
467# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000468# Only set these to C if already set. These must not be set unconditionally
469# because not all systems understand e.g. LANG=C (notably SCO).
470# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
471# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000472if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000473if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
474if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
475if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000476
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477# confdefs.h avoids OS command line length limits that DEFS can exceed.
478rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000479# AIX cpp loses on an empty file, so make sure it contains at least a newline.
480echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000481
482# A filename unique to this package, relative to the directory that
483# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000484ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485
486# Find the source files, if location was not specified.
487if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000488 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000490 ac_prog=$0
491 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
492 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
493 srcdir=$ac_confdir
494 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495 srcdir=..
496 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000497else
498 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000499fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000500if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000501 if test "$ac_srcdir_defaulted" = yes; then
502 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000503 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000504 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000505 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000506fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000507srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
508
509# Prefer explicitly selected file to automatically selected ones.
510if test -z "$CONFIG_SITE"; then
511 if test "x$prefix" != xNONE; then
512 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
513 else
514 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
515 fi
516fi
517for ac_site_file in $CONFIG_SITE; do
518 if test -r "$ac_site_file"; then
519 echo "loading site script $ac_site_file"
520 . "$ac_site_file"
521 fi
522done
523
524if test -r "$cache_file"; then
525 echo "loading cache $cache_file"
526 . $cache_file
527else
528 echo "creating cache $cache_file"
529 > $cache_file
530fi
531
Guido van Rossum7f43da71994-08-01 12:15:30 +0000532ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000533# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000534ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000535ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000536ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000537cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000538
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000539ac_exeext=
540ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000541if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
542 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
543 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
544 ac_n= ac_c='
545' ac_t=' '
546 else
547 ac_n=-n ac_c= ac_t=
548 fi
549else
550 ac_n= ac_c='\c' ac_t=
551fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000552
Guido van Rossum0a516c91994-09-12 10:58:40 +0000553
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000554
Guido van Rossum627b2d71993-12-24 10:39:16 +0000555
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000556# Set VERSION so we only need to edit in one place (i.e., here)
557
558VERSION=1.5
559
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000560# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000561if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000562
563 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000564echo "configure:565: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000565 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000566if test "${with_next_archs+set}" = set; then
567 withval="$with_next_archs"
568
Guido van Rossum563e7081996-09-10 18:20:48 +0000569 if test -n "$withval"; then
570 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
571 # GCC does not currently support multi archs on the NeXT
572 with_gcc=no
573 fi
574 echo "$ac_t""$with_next_archs" 1>&6
575
576else
577 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000578fi
579
Guido van Rossum563e7081996-09-10 18:20:48 +0000580
581 if test -z "$MACHDEP"
582 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000583 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000584 sed -e 's/://' -e 's/\./_/'` && \
585 ac_sys_system=next && ac_sys_release=$4
586
Guido van Rossumb97ef171997-09-28 05:44:03 +0000587 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000588 fi
589fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000590
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000591# Check whether --with-next-framework or --without-next-framework was given.
592if test "${with_next_framework+set}" = set; then
593 withval="$with_next_framework"
594 :
595fi
596
597# Check whether --with-dyld or --without-dyld was given.
598if test "${with_dyld+set}" = set; then
599 withval="$with_dyld"
600 :
601fi
602
Guido van Rossum91922671997-10-09 20:24:13 +0000603
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000604# Set name for machine-dependent library files
605
606echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000607echo "configure:608: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000608if test -z "$MACHDEP"
609then
Guido van Rossum563e7081996-09-10 18:20:48 +0000610 ac_sys_system=`uname -s`
611 if test "$ac_sys_system" = "AIX" ; then
612 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000613 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000614 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000615 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000616 ac_md_system=`echo $ac_sys_system |
617 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
618 ac_md_release=`echo $ac_sys_release |
619 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000620 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000621
Guido van Rossum07397971997-04-29 21:49:50 +0000622 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000623 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000624 esac
625fi
Guido van Rossum91922671997-10-09 20:24:13 +0000626
627#
628# SGI compilers allow the specification of the both the ABI and the
629# ISA on the command line. Depending on the values of these switches,
630# different and often incompatable code will be generated.
631#
632# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
633# thus supply support for various ABI/ISA combinations. The MACHDEP
634# variable is also adjusted.
635#
636
637if test ! -z "$SGI_ABI"
638then
639 CC="cc $SGI_ABI"
640 LDFLAGS="$SGI_ABI $LDFLAGS"
641 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
642fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000643echo "$ac_t""$MACHDEP" 1>&6
644
Guido van Rossum91922671997-10-09 20:24:13 +0000645#
646# CCC is the command that compiles C++ programs
647#
648# Not all make programs have this predefined.
649#
650
651echo $ac_n "checking CCC""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000652echo "configure:653: checking CCC" >&5
Guido van Rossum91922671997-10-09 20:24:13 +0000653if test -z "$CCC"
654then
655 case $ac_sys_system in
656 IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
Guido van Rossumad678af1998-10-02 14:42:15 +0000657 Linux*) SET_CCC="CCC= g++";;
Guido van Rossum91922671997-10-09 20:24:13 +0000658 *) SET_CCC=""
659 esac
660else
661 SET_CCC="CCC= ${CCC}"
662fi
663echo "$ac_t""$SET_CCC" 1>&6
664
665
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000667echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000668echo "configure:669: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000669# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000670if test "${with_gcc+set}" = set; then
671 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000672
673 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000674 no) CC=cc
675 without_gcc=yes;;
676 yes) CC=gcc
677 without_gcc=no;;
678 *) CC=$withval
679 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000680 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000681else
Guido van Rossume77438c1995-09-13 18:59:59 +0000682
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000683 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000684 OSF1) CC=cc
685 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000686 BeOS*)
687 # Dunno if it's a good idea to get this over with all at once, or
688 # to handle it in with the other goodies.
689 MACHDEP=beos
690
691 case $BE_HOST_CPU in
692 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000693 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000695 case `uname -r` in
696 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
697 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
698 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 CCSHARED=-UUSE_DL_EXPORT
700 LDFLAGS="$LDFLAGS -nodup"
701
702 AR="$PWD/BeOS/ar-fake"
703 RANLIB=:
704
705 cat >> confdefs.h <<\EOF
706#define DL_EXPORT_HEADER "dl_export.h"
707EOF
708
709 ;;
710 x86)
711 CC="gcc -I$PWD/BeOS"
712 without_gcc=no
713 OPT="-DUSE_DL_EXPORT -O3 -mpentiumpro"
714 CCSHARED=-UUSE_DL_EXPORT
715
716 AR="$PWD/BeOS/ar-fake"
717 RANLIB=:
718
719 cat >> confdefs.h <<\EOF
720#define DL_EXPORT_HEADER "dl_export.h"
721EOF
722
723 ;;
724 *)
725 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
726 ;;
727 esac
728 ;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000729 *) without_gcc=no;;
730 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731fi
732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000733echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000734
Guido van Rossum8b131c51995-03-09 14:10:13 +0000735# If the user switches compilers, we can't believe the cache
736if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
737then
738 { echo "configure: error: cached CC is different -- throw away $cache_file
739(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
740fi
741
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000742# Extract the first word of "gcc", so it can be a program name with args.
743set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000744echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +0000745echo "configure:746: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000746if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
747 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000748else
749 if test -n "$CC"; then
750 ac_cv_prog_CC="$CC" # Let the user override the test.
751else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
753 ac_dummy="$PATH"
754 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755 test -z "$ac_dir" && ac_dir=.
756 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000758 break
759 fi
760 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000761 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000762fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763fi
764CC="$ac_cv_prog_CC"
765if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000766 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000768 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000770
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000771if test -z "$CC"; then
772 # Extract the first word of "cc", so it can be a program name with args.
773set dummy cc; ac_word=$2
774echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +0000775echo "configure:776: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
777 echo $ac_n "(cached) $ac_c" 1>&6
778else
779 if test -n "$CC"; then
780 ac_cv_prog_CC="$CC" # Let the user override the test.
781else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000782 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000784 ac_dummy="$PATH"
785 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786 test -z "$ac_dir" && ac_dir=.
787 if test -f $ac_dir/$ac_word; then
788 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
789 ac_prog_rejected=yes
790 continue
791 fi
792 ac_cv_prog_CC="cc"
793 break
794 fi
795 done
796 IFS="$ac_save_ifs"
797if test $ac_prog_rejected = yes; then
798 # We found a bogon in the path, so make sure we never use it.
799 set dummy $ac_cv_prog_CC
800 shift
801 if test $# -gt 0; then
802 # We chose a different compiler from the bogus one.
803 # However, it has the same basename, so the bogon will be chosen
804 # first if we set CC to just the basename; use the full file name.
805 shift
806 set dummy "$ac_dir/$ac_word" "$@"
807 shift
808 ac_cv_prog_CC="$@"
809 fi
810fi
811fi
812fi
813CC="$ac_cv_prog_CC"
814if test -n "$CC"; then
815 echo "$ac_t""$CC" 1>&6
816else
817 echo "$ac_t""no" 1>&6
818fi
819
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000820 if test -z "$CC"; then
821 case "`uname -s`" in
822 *win32* | *WIN32*)
823 # Extract the first word of "cl", so it can be a program name with args.
824set dummy cl; ac_word=$2
825echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +0000826echo "configure:827: checking for $ac_word" >&5
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000827if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
828 echo $ac_n "(cached) $ac_c" 1>&6
829else
830 if test -n "$CC"; then
831 ac_cv_prog_CC="$CC" # Let the user override the test.
832else
833 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
834 ac_dummy="$PATH"
835 for ac_dir in $ac_dummy; do
836 test -z "$ac_dir" && ac_dir=.
837 if test -f $ac_dir/$ac_word; then
838 ac_cv_prog_CC="cl"
839 break
840 fi
841 done
842 IFS="$ac_save_ifs"
843fi
844fi
845CC="$ac_cv_prog_CC"
846if test -n "$CC"; then
847 echo "$ac_t""$CC" 1>&6
848else
849 echo "$ac_t""no" 1>&6
850fi
851 ;;
852 esac
853 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
855fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856
Guido van Rossumf78abae1997-01-21 22:02:36 +0000857echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +0000858echo "configure:859: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000859
860ac_ext=c
861# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
862ac_cpp='$CPP $CPPFLAGS'
863ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000864ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000865cross_compiling=$ac_cv_prog_cc_cross
866
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000867cat > conftest.$ac_ext << EOF
868
Guido van Rossum6b9da451999-03-24 17:48:12 +0000869#line 870 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000870#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000871
Guido van Rossumf78abae1997-01-21 22:02:36 +0000872main(){return(0);}
873EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +0000874if { (eval echo configure:875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000875 ac_cv_prog_cc_works=yes
876 # If we can't run a trivial program, we are probably using a cross compiler.
877 if (./conftest; exit) 2>/dev/null; then
878 ac_cv_prog_cc_cross=no
879 else
880 ac_cv_prog_cc_cross=yes
881 fi
882else
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 ac_cv_prog_cc_works=no
886fi
887rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000888ac_ext=c
889# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
890ac_cpp='$CPP $CPPFLAGS'
891ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
892ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
893cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000894
895echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
896if test $ac_cv_prog_cc_works = no; then
897 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
898fi
899echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +0000900echo "configure:901: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000901echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
902cross_compiling=$ac_cv_prog_cc_cross
903
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000904echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +0000905echo "configure:906: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000906if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
907 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908else
909 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912#endif
913EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +0000914if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 ac_cv_prog_gcc=yes
916else
917 ac_cv_prog_gcc=no
918fi
919fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000921echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923if test $ac_cv_prog_gcc = yes; then
924 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000925else
926 GCC=
927fi
928
929ac_test_CFLAGS="${CFLAGS+set}"
930ac_save_CFLAGS="$CFLAGS"
931CFLAGS=
932echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +0000933echo "configure:934: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000934if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000935 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936else
937 echo 'void f(){}' > conftest.c
938if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000939 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000941 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000942fi
943rm -f conftest*
944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Guido van Rossumf78abae1997-01-21 22:02:36 +0000947echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000948if test "$ac_test_CFLAGS" = set; then
949 CFLAGS="$ac_save_CFLAGS"
950elif test $ac_cv_prog_cc_g = yes; then
951 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000952 CFLAGS="-g -O2"
953 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000954 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 fi
956else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000957 if test "$GCC" = yes; then
958 CFLAGS="-O2"
959 else
960 CFLAGS=
961 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962fi
963
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000964
Guido van Rossumdd997f71998-10-07 19:58:26 +0000965case $MACHDEP in
966bsdos*)
967 case $CC in
968 gcc) CC="$CC -D_HAVE_BSDI";;
969 esac;;
970esac
971
Guido van Rossum24b1e751997-08-21 02:29:16 +0000972case $ac_sys_system in
973hp*|HP*)
974 case $CC in
975 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
976 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000977BeOS*)
978 case $CC in
979 cc) CC=cc;;
980 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +0000981esac
982
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000983# LDLIBRARY is the name of the library to link against (as opposed to the
984# name of the library into which to insert object files). On systems
985# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
986# the Makefiles).
987
988
989LDLIBRARY=''
990
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000991# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000992# This is altered for AIX and BeOS in order to build the export list before
993# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000994
995echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +0000996echo "configure:997: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000997if test -z "$LINKCC"
998then
999 case $ac_sys_system in
1000 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001001 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001002 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001003 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001004 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001005 dgux*)
1006 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001007 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001008 esac
1009fi
1010echo "$ac_t""$LINKCC" 1>&6
1011
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001012echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001013echo "configure:1014: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001014
1015# NeXT framework builds require that the 'ar' library be converted into
1016# a bundle using libtool.
1017if test "$with_next_framework"
1018then
1019 LDLIBRARY='libpython$(VERSION).dylib'
1020fi
1021
1022# DG/UX requires some fancy ld contortions to produce a .so from an .a
1023if test "$MACHDEP" = "dguxR4"
1024then
1025 LDLIBRARY='libpython$(VERSION).so'
1026 OPT="$OPT -pic"
1027fi
1028echo "$ac_t""$LDLIBRARY" 1>&6
1029
1030# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1031if test -z "$LDLIBRARY"
1032then
1033 LDLIBRARY='libpython$(VERSION).a'
1034 MAKE_LDLIBRARY="true"
1035else
1036 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1037fi
1038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039# Extract the first word of "ranlib", so it can be a program name with args.
1040set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001041echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001042echo "configure:1043: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001043if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1044 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045else
1046 if test -n "$RANLIB"; then
1047 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1048else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001049 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1050 ac_dummy="$PATH"
1051 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 test -z "$ac_dir" && ac_dir=.
1053 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001055 break
1056 fi
1057 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001059 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001060fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061fi
1062RANLIB="$ac_cv_prog_RANLIB"
1063if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001064 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001066 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001068
1069
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070for ac_prog in ar aal
1071do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072# Extract the first word of "$ac_prog", so it can be a program name with args.
1073set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001074echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001075echo "configure:1076: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001076if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1077 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078else
1079 if test -n "$AR"; then
1080 ac_cv_prog_AR="$AR" # Let the user override the test.
1081else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001082 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1083 ac_dummy="$PATH"
1084 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 test -z "$ac_dir" && ac_dir=.
1086 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 break
1089 fi
1090 done
1091 IFS="$ac_save_ifs"
1092fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093fi
1094AR="$ac_cv_prog_AR"
1095if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001096 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001098 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001099fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101test -n "$AR" && break
1102done
1103test -n "$AR" || AR="ar"
1104
1105
Guido van Rossumda88dad1995-01-26 00:46:29 +00001106
1107
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001108# Install just never works :-(
1109if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001110then
1111 INSTALL=cp
1112 INSTALL_PROGRAM=cp
1113 INSTALL_DATA=cp
1114else
1115 INSTALL_PROGRAM="$INSTALL"
1116 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001117fi
1118
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001119# Not every filesystem supports hard links
1120
1121if test -z "$LN" ; then
1122 case $ac_sys_system in
1123 BeOS*) LN="ln -s";;
1124 *) LN=ln;;
1125 esac
1126fi
1127
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001128# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001129
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001130if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001131then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001132 case $GCC in
1133 yes)
1134 case $ac_cv_prog_cc_g in
1135 yes) OPT="-g -O2";;
1136 *) OPT="-O2";;
1137 esac
1138 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001139 *) OPT="-O";;
1140 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001141fi
1142
Guido van Rossum563e7081996-09-10 18:20:48 +00001143if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001144then
1145 OPT="$OPT $ac_arch_flags"
1146fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001148echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001149echo "configure:1150: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001150# On Suns, sometimes $CPP names a directory.
1151if test -n "$CPP" && test -d "$CPP"; then
1152 CPP=
1153fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001155if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157else
1158 # This must be in double quotes, not single quotes, because CPP may get
1159 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001160 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161 # On the NeXT, cc -E runs the code through the compiler's parser,
1162 # not just through cpp.
1163 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001164#line 1165 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001165#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001167Syntax Error
1168EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6b9da451999-03-24 17:48:12 +00001170{ (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001171ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172if test -z "$ac_err"; then
1173 :
1174else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001176 echo "configure: failed program was:" >&5
1177 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 rm -rf conftest*
1179 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001181#line 1182 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184Syntax Error
1185EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6b9da451999-03-24 17:48:12 +00001187{ (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001188ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1189if test -z "$ac_err"; then
1190 :
1191else
1192 echo "$ac_err" >&5
1193 echo "configure: failed program was:" >&5
1194 cat conftest.$ac_ext >&5
1195 rm -rf conftest*
1196 CPP="${CC-cc} -nologo -E"
1197 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001198#line 1199 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001199#include "confdefs.h"
1200#include <assert.h>
1201Syntax Error
1202EOF
1203ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6b9da451999-03-24 17:48:12 +00001204{ (eval echo configure:1205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001205ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001207 :
1208else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001210 echo "configure: failed program was:" >&5
1211 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212 rm -rf conftest*
1213 CPP=/lib/cpp
1214fi
1215rm -f conftest*
1216fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001218fi
1219rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001222 CPP="$ac_cv_prog_CPP"
1223else
1224 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001226echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001228echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001229echo "configure:1230: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001231#line 1232 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232#include "confdefs.h"
1233#ifdef _AIX
1234 yes
1235#endif
1236
1237EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1239 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001241 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242#define _ALL_SOURCE 1
1243EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245else
1246 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001247 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248fi
1249rm -f conftest*
1250
1251
Guido van Rossumf78abae1997-01-21 22:02:36 +00001252ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001253echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001254echo "configure:1255: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001255if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001257else
1258 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001259#line 1260 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001260#include "confdefs.h"
1261#include <minix/config.h>
1262EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001263ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6b9da451999-03-24 17:48:12 +00001264{ (eval echo configure:1265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001265ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001271 echo "configure: failed program was:" >&5
1272 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273 rm -rf conftest*
1274 eval "ac_cv_header_$ac_safe=no"
1275fi
1276rm -f conftest*
1277fi
1278if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001279 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280 MINIX=yes
1281else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001282 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284fi
1285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286if test "$MINIX" = yes; then
1287 cat >> confdefs.h <<\EOF
1288#define _POSIX_SOURCE 1
1289EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291 cat >> confdefs.h <<\EOF
1292#define _POSIX_1_SOURCE 2
1293EOF
1294
1295 cat >> confdefs.h <<\EOF
1296#define _MINIX 1
1297EOF
1298
1299fi
1300
Guido van Rossumda88dad1995-01-26 00:46:29 +00001301
Guido van Rossum91922671997-10-09 20:24:13 +00001302echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001303echo "configure:1304: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum91922671997-10-09 20:24:13 +00001304if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1305 echo $ac_n "(cached) $ac_c" 1>&6
1306else
1307 ac_save_cc="$CC"
1308CC="$CC -OPT:Olimit=0"
1309if test "$cross_compiling" = yes; then
1310 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1311else
1312 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001313#line 1314 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001314#include "confdefs.h"
1315int main() { return 0; }
1316EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001317if { (eval echo configure:1318: \"$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 +00001318then
1319 ac_cv_opt_olimit_ok=yes
1320else
1321 echo "configure: failed program was:" >&5
1322 cat conftest.$ac_ext >&5
1323 rm -fr conftest*
1324 ac_cv_opt_olimit_ok=no
1325fi
1326rm -fr conftest*
1327fi
1328
1329CC="$ac_save_cc"
1330fi
1331
1332echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001333if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001334 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001335else
1336 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001337echo "configure:1338: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001338 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1339 echo $ac_n "(cached) $ac_c" 1>&6
1340else
1341 ac_save_cc="$CC"
1342 CC="$CC -Olimit 1500"
1343 if test "$cross_compiling" = yes; then
1344 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1345else
1346 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001347#line 1348 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001348#include "confdefs.h"
1349int main() { return 0; }
1350EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001351if { (eval echo configure:1352: \"$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 +00001352then
1353 ac_cv_olimit_ok=yes
1354else
1355 echo "configure: failed program was:" >&5
1356 cat conftest.$ac_ext >&5
1357 rm -fr conftest*
1358 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001359fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001360rm -fr conftest*
1361fi
1362
1363 CC="$ac_save_cc"
1364fi
1365
1366 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1367 if test $ac_cv_olimit_ok = yes; then
1368 OPT="$OPT -Olimit 1500"
1369 fi
1370fi
1371
Guido van Rossum84e7b241996-08-19 21:59:00 +00001372# check for ANSI or K&R ("traditional") preprocessor
1373echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001374echo "configure:1375: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001375cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001376#line 1377 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001377#include "confdefs.h"
1378
1379#define spam(name, doc) {#name, &name, #name "() -- " doc}
1380int foo;
1381struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1382
Guido van Rossumf78abae1997-01-21 22:02:36 +00001383int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001384;
1385; return 0; }
1386EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001387if { (eval echo configure:1388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001388 rm -rf conftest*
1389 cpp_type=ansi
1390else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001391 echo "configure: failed program was:" >&5
1392 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001393 rm -rf conftest*
1394 cat >> confdefs.h <<\EOF
1395#define HAVE_OLD_CPP 1
1396EOF
1397 cpp_type=traditional
1398fi
1399rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001400echo "$ac_t""$cpp_type" 1>&6
1401
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001402# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001403echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001404echo "configure:1405: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001405if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1406 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001407else
1408 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001409#line 1410 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001410#include "confdefs.h"
1411#include <stdlib.h>
1412#include <stdarg.h>
1413#include <string.h>
1414#include <float.h>
1415EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001416ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6b9da451999-03-24 17:48:12 +00001417{ (eval echo configure:1418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001418ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001419if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001420 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001421 ac_cv_header_stdc=yes
1422else
1423 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001424 echo "configure: failed program was:" >&5
1425 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001426 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001427 ac_cv_header_stdc=no
1428fi
1429rm -f conftest*
1430
1431if test $ac_cv_header_stdc = yes; then
1432 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1433cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001434#line 1435 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001435#include "confdefs.h"
1436#include <string.h>
1437EOF
1438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1439 egrep "memchr" >/dev/null 2>&1; then
1440 :
1441else
1442 rm -rf conftest*
1443 ac_cv_header_stdc=no
1444fi
1445rm -f conftest*
1446
1447fi
1448
1449if test $ac_cv_header_stdc = yes; then
1450 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1451cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001452#line 1453 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001453#include "confdefs.h"
1454#include <stdlib.h>
1455EOF
1456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1457 egrep "free" >/dev/null 2>&1; then
1458 :
1459else
1460 rm -rf conftest*
1461 ac_cv_header_stdc=no
1462fi
1463rm -f conftest*
1464
1465fi
1466
1467if test $ac_cv_header_stdc = yes; then
1468 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1469if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001470 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001472 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001473#line 1474 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001474#include "confdefs.h"
1475#include <ctype.h>
1476#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1477#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001478#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001479int main () { int i; for (i = 0; i < 256; i++)
1480if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1481exit (0); }
1482
1483EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001484if { (eval echo configure:1485: \"$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 +00001485then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001486 :
1487else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001488 echo "configure: failed program was:" >&5
1489 cat conftest.$ac_ext >&5
1490 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001492fi
1493rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001494fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001495
1496fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001498
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001499echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001500if test $ac_cv_header_stdc = yes; then
1501 cat >> confdefs.h <<\EOF
1502#define STDC_HEADERS 1
1503EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001504
1505fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001506
Guido van Rossum96013151997-10-08 22:47:52 +00001507for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001508signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001509sys/audioio.h sys/file.h sys/lock.h \
1510sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001511sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001512do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001513ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001514echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001515echo "configure:1516: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001516if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1517 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001518else
1519 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001520#line 1521 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001521#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001522#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001523EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001524ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6b9da451999-03-24 17:48:12 +00001525{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001526ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001527if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001528 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001529 eval "ac_cv_header_$ac_safe=yes"
1530else
1531 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001532 echo "configure: failed program was:" >&5
1533 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001534 rm -rf conftest*
1535 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001536fi
1537rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001538fi
1539if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001540 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001541 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001542 cat >> confdefs.h <<EOF
1543#define $ac_tr_hdr 1
1544EOF
1545
1546else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001547 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001548fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001549done
1550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001551ac_header_dirent=no
1552for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1553do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001554ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001555echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001556echo "configure:1557: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001557if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001560 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001561#line 1562 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001562#include "confdefs.h"
1563#include <sys/types.h>
1564#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001565int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001566DIR *dirp = 0;
1567; return 0; }
1568EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001569if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001570 rm -rf conftest*
1571 eval "ac_cv_header_dirent_$ac_safe=yes"
1572else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001573 echo "configure: failed program was:" >&5
1574 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001575 rm -rf conftest*
1576 eval "ac_cv_header_dirent_$ac_safe=no"
1577fi
1578rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001579fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001580if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001581 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001582 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583 cat >> confdefs.h <<EOF
1584#define $ac_tr_hdr 1
1585EOF
1586 ac_header_dirent=$ac_hdr; break
1587else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001588 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589fi
1590done
1591# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1592if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001593echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001594echo "configure:1595: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001595ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001596if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001597 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001598else
1599 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001600LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001601cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001602#line 1603 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001603#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001604/* Override any gcc2 internal prototype to avoid an error. */
1605/* We use char because int might match the return type of a gcc2
1606 builtin and then its argument prototype would still apply. */
1607char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001608
Guido van Rossumf78abae1997-01-21 22:02:36 +00001609int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001610opendir()
1611; return 0; }
1612EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001613if { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001615 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001617 echo "configure: failed program was:" >&5
1618 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001619 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001620 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621fi
1622rm -f conftest*
1623LIBS="$ac_save_LIBS"
1624
1625fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001626if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001627 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001628 LIBS="$LIBS -ldir"
1629else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001630 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001631fi
1632
1633else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001634echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001635echo "configure:1636: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001636ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001637if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001638 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001639else
1640 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001641LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001643#line 1644 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001645/* Override any gcc2 internal prototype to avoid an error. */
1646/* We use char because int might match the return type of a gcc2
1647 builtin and then its argument prototype would still apply. */
1648char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001649
Guido van Rossumf78abae1997-01-21 22:02:36 +00001650int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651opendir()
1652; return 0; }
1653EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001654if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001656 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001658 echo "configure: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001661 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662fi
1663rm -f conftest*
1664LIBS="$ac_save_LIBS"
1665
1666fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001667if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001668 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001669 LIBS="$LIBS -lx"
1670else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001671 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001672fi
1673
1674fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001675
1676
1677# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001678was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001679echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001680echo "configure:1681: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001682#line 1683 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683#include "confdefs.h"
1684#include <time.h>
1685EOF
1686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1687 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001688 rm -rf conftest*
1689 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001690else
1691 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692 cat >> confdefs.h <<\EOF
1693#define clock_t long
1694EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001695
1696fi
1697rm -f conftest*
1698
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001699echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001700
Guido van Rossum84e7b241996-08-19 21:59:00 +00001701# Add some code to confdefs.h so that the test for off_t works on SCO
1702cat >> confdefs.h <<\EOF
1703#if defined(SCO_DS)
1704#undef _OFF_T
1705#endif
1706EOF
1707
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001708echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001709echo "configure:1710: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001710if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1711 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712else
1713 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001714#line 1715 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715#include "confdefs.h"
1716#include <sys/types.h>
1717#if STDC_HEADERS
1718#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001719#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001720#endif
1721EOF
1722if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001723 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 +00001724 rm -rf conftest*
1725 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001726else
1727 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001729fi
1730rm -f conftest*
1731
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001732fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001733echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001734if test $ac_cv_type_mode_t = no; then
1735 cat >> confdefs.h <<\EOF
1736#define mode_t int
1737EOF
1738
1739fi
1740
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001741echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001742echo "configure:1743: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001743if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1744 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001745else
1746 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001747#line 1748 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001748#include "confdefs.h"
1749#include <sys/types.h>
1750#if STDC_HEADERS
1751#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001752#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001753#endif
1754EOF
1755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001756 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 +00001757 rm -rf conftest*
1758 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001759else
1760 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001762fi
1763rm -f conftest*
1764
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001766echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767if test $ac_cv_type_off_t = no; then
1768 cat >> confdefs.h <<\EOF
1769#define off_t long
1770EOF
1771
1772fi
1773
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001774echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001775echo "configure:1776: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001776if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1777 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778else
1779 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001780#line 1781 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001781#include "confdefs.h"
1782#include <sys/types.h>
1783#if STDC_HEADERS
1784#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001785#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001786#endif
1787EOF
1788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001789 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 +00001790 rm -rf conftest*
1791 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001792else
1793 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001794 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001795fi
1796rm -f conftest*
1797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001798fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001799echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800if test $ac_cv_type_pid_t = no; then
1801 cat >> confdefs.h <<\EOF
1802#define pid_t int
1803EOF
1804
1805fi
1806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001807echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001808echo "configure:1809: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001809if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811else
1812 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001813#line 1814 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814#include "confdefs.h"
1815#include <sys/types.h>
1816#include <signal.h>
1817#ifdef signal
1818#undef signal
1819#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001820#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001821extern "C" void (*signal (int, void (*)(int)))(int);
1822#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001823void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001824#endif
1825
Guido van Rossumf78abae1997-01-21 22:02:36 +00001826int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001827int i;
1828; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001829EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001830if { (eval echo configure:1831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001831 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001832 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001833else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001834 echo "configure: failed program was:" >&5
1835 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001836 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001838fi
1839rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001841
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001842echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001843cat >> confdefs.h <<EOF
1844#define RETSIGTYPE $ac_cv_type_signal
1845EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001847
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001848echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001849echo "configure:1850: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001850if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1851 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852else
1853 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001854#line 1855 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001855#include "confdefs.h"
1856#include <sys/types.h>
1857#if STDC_HEADERS
1858#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001859#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001860#endif
1861EOF
1862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001863 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 +00001864 rm -rf conftest*
1865 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001866else
1867 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001868 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001869fi
1870rm -f conftest*
1871
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001872fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001873echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001874if test $ac_cv_type_size_t = no; then
1875 cat >> confdefs.h <<\EOF
1876#define size_t unsigned
1877EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001878
1879fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001880
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001881echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001882echo "configure:1883: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001883if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1884 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885else
1886 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001887#line 1888 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888#include "confdefs.h"
1889#include <sys/types.h>
1890EOF
1891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1892 egrep "uid_t" >/dev/null 2>&1; then
1893 rm -rf conftest*
1894 ac_cv_type_uid_t=yes
1895else
1896 rm -rf conftest*
1897 ac_cv_type_uid_t=no
1898fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001899rm -f conftest*
1900
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904if test $ac_cv_type_uid_t = no; then
1905 cat >> confdefs.h <<\EOF
1906#define uid_t int
1907EOF
1908
1909 cat >> confdefs.h <<\EOF
1910#define gid_t int
1911EOF
1912
1913fi
1914
Guido van Rossum627b2d71993-12-24 10:39:16 +00001915
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001916echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001917echo "configure:1918: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001918if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1919 echo $ac_n "(cached) $ac_c" 1>&6
1920else
1921 if test "$cross_compiling" = yes; then
1922 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1923else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001924 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001925#line 1926 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001926#include "confdefs.h"
1927#include <stdio.h>
1928main()
1929{
1930 FILE *f=fopen("conftestval", "w");
1931 if (!f) exit(1);
1932 fprintf(f, "%d\n", sizeof(int));
1933 exit(0);
1934}
1935EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001936if { (eval echo configure:1937: \"$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 +00001937then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001938 ac_cv_sizeof_int=`cat conftestval`
1939else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001940 echo "configure: failed program was:" >&5
1941 cat conftest.$ac_ext >&5
1942 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001943 ac_cv_sizeof_int=0
1944fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001945rm -fr conftest*
1946fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001947
1948fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001949echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1950cat >> confdefs.h <<EOF
1951#define SIZEOF_INT $ac_cv_sizeof_int
1952EOF
1953
1954
1955echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001956echo "configure:1957: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001957if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1958 echo $ac_n "(cached) $ac_c" 1>&6
1959else
1960 if test "$cross_compiling" = yes; then
1961 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1962else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001963 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001964#line 1965 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001965#include "confdefs.h"
1966#include <stdio.h>
1967main()
1968{
1969 FILE *f=fopen("conftestval", "w");
1970 if (!f) exit(1);
1971 fprintf(f, "%d\n", sizeof(long));
1972 exit(0);
1973}
1974EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00001975if { (eval echo configure:1976: \"$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 +00001976then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001977 ac_cv_sizeof_long=`cat conftestval`
1978else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001979 echo "configure: failed program was:" >&5
1980 cat conftest.$ac_ext >&5
1981 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001982 ac_cv_sizeof_long=0
1983fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001984rm -fr conftest*
1985fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001986
1987fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001988echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1989cat >> confdefs.h <<EOF
1990#define SIZEOF_LONG $ac_cv_sizeof_long
1991EOF
1992
1993
Guido van Rossumad678af1998-10-02 14:42:15 +00001994echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00001995echo "configure:1996: checking size of void *" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00001996if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
1997 echo $ac_n "(cached) $ac_c" 1>&6
1998else
1999 if test "$cross_compiling" = yes; then
2000 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2001else
2002 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00002003#line 2004 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002004#include "confdefs.h"
2005#include <stdio.h>
2006main()
2007{
2008 FILE *f=fopen("conftestval", "w");
2009 if (!f) exit(1);
2010 fprintf(f, "%d\n", sizeof(void *));
2011 exit(0);
2012}
2013EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00002014if { (eval echo configure:2015: \"$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 +00002015then
2016 ac_cv_sizeof_void_p=`cat conftestval`
2017else
2018 echo "configure: failed program was:" >&5
2019 cat conftest.$ac_ext >&5
2020 rm -fr conftest*
2021 ac_cv_sizeof_void_p=0
2022fi
2023rm -fr conftest*
2024fi
2025
2026fi
2027echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2028cat >> confdefs.h <<EOF
2029#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2030EOF
2031
2032
Guido van Rossum0a516c91994-09-12 10:58:40 +00002033
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002034echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00002035echo "configure:2036: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002036have_long_long=no
2037cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00002038#line 2039 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002039#include "confdefs.h"
2040
2041int main() {
2042long long x; x = (long long)0;
2043; return 0; }
2044EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00002045if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002046 rm -rf conftest*
2047 cat >> confdefs.h <<\EOF
2048#define HAVE_LONG_LONG 1
2049EOF
2050 have_long_long=yes
2051else
2052 echo "configure: failed program was:" >&5
2053 cat conftest.$ac_ext >&5
2054fi
2055rm -f conftest*
2056echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002057if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002058echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00002059echo "configure:2060: checking size of long long" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002060if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2061 echo $ac_n "(cached) $ac_c" 1>&6
2062else
2063 if test "$cross_compiling" = yes; then
2064 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2065else
2066 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00002067#line 2068 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002068#include "confdefs.h"
2069#include <stdio.h>
2070main()
2071{
2072 FILE *f=fopen("conftestval", "w");
2073 if (!f) exit(1);
2074 fprintf(f, "%d\n", sizeof(long long));
2075 exit(0);
2076}
2077EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00002078if { (eval echo configure:2079: \"$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 +00002079then
2080 ac_cv_sizeof_long_long=`cat conftestval`
2081else
2082 echo "configure: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2084 rm -fr conftest*
2085 ac_cv_sizeof_long_long=0
2086fi
2087rm -fr conftest*
2088fi
2089
2090fi
2091echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2092cat >> confdefs.h <<EOF
2093#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2094EOF
2095
2096
2097fi
2098
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002099# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2100echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00002101echo "configure:2102: checking size of off_t" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002102if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2103 echo $ac_n "(cached) $ac_c" 1>&6
2104else
2105 if test "$cross_compiling" = yes; then
2106 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2107else
2108 cat > conftest.$ac_ext <<EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00002109#line 2110 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002110#include "confdefs.h"
2111#include <stdio.h>
2112#include <sys/types.h>
2113main()
2114{
2115 FILE *f=fopen("conftestval", "w");
2116 if (!f) exit(1);
2117 fprintf(f, "%d\n", sizeof(off_t));
2118 exit(0);
2119}
2120EOF
Guido van Rossum6b9da451999-03-24 17:48:12 +00002121if { (eval echo configure:2122: \"$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 +00002122then
2123 ac_cv_sizeof_off_t=`cat conftestval`
2124else
2125 echo "configure: failed program was:" >&5
2126 cat conftest.$ac_ext >&5
2127 rm -fr conftest*
2128 ac_cv_sizeof_off_t=0
2129fi
2130rm -fr conftest*
2131fi
2132
2133
2134fi
2135
2136echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2137cat >> confdefs.h <<EOF
2138#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2139EOF
2140
2141
2142echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00002143echo "configure:2144: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002144if test "$have_long_long" = yes -a \
2145 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2146 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002147 cat >> confdefs.h <<\EOF
2148#define HAVE_LARGEFILE_SUPPORT 1
2149EOF
2150
2151 echo "$ac_t""yes" 1>&6
2152else
2153 echo "$ac_t""no" 1>&6
2154fi
2155
2156
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002157# Minor variations in building a framework between NextStep versions 4 and 5
2158
2159case $ac_sys_system/$ac_sys_release in
2160 next/4*)
2161 ns_undef_sym='__environ'
2162 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2163 next/5*)
2164 ns_undef_sym='_environ'
2165 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2166esac
2167
2168echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00002169echo "configure:2170: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002170if test "$with_next_framework"
2171then
2172 OPT="$OPT -fno-common"
2173 # -U __environ is needed since bundles don't have access
2174 # to crt0 when built but will always be linked against it
2175 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2176 cat >> confdefs.h <<\EOF
2177#define WITH_NEXT_FRAMEWORK 1
2178EOF
2179
2180 echo "$ac_t""yes" 1>&6
2181else
2182 echo "$ac_t""no" 1>&6
2183fi
2184
2185echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00002186echo "configure:2187: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002187if test "$with_next_framework" -o "$with_dyld"
2188then
2189 if test "$with_dyld"
2190 then
2191 echo "$ac_t""yes" 1>&6
2192 else
2193 echo "$ac_t""required for framework build" 1>&6
2194 fi
2195 cat >> confdefs.h <<\EOF
2196#define WITH_DYLD 1
2197EOF
2198
2199 ns_dyld='set'
2200else
2201 echo "$ac_t""no" 1>&6
2202fi
2203
Guido van Rossum0a516c91994-09-12 10:58:40 +00002204# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002205
2206
2207
2208
Guido van Rossum0a516c91994-09-12 10:58:40 +00002209# SO is the extension of shared libraries `(including the dot!)
2210# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002211echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00002212echo "configure:2213: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002213if test -z "$SO"
2214then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002216 hp*|HP*) SO=.sl;;
2217 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002218 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002219fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002220echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002221# LDSHARED is the ld *command* used to create shared library
2222# -- "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 +00002223# (Shared libraries in this instance are shared modules to be loaded into
2224# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002225echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum6b9da451999-03-24 17:48:12 +00002226echo "configure:2227: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002227if test -z "$LDSHARED"
2228then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002230 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002231 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002232 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002233 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002234 SunOS/4*) LDSHARED="ld";;
2235 SunOS/5*) LDSHARED="ld -G";;
2236 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002237 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2238 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002239 next/*)
2240 if test "$ns_dyld"
2241 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2242 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2243 fi
2244 if test "$with_next_framework" ; then
2245 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2246 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002247 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002248 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002249 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002250 FreeBSD*/[34]*) LDSHARED="gcc -shared";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002251 FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
2252 NetBSD*)
2253 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2254 then
2255 LDSHARED="cc -shared"
2256 else
2257 LDSHARED="ld -Bshareable"
2258 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002259 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002260 *) LDSHARED="ld";;
2261 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002262fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002263echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002264# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002265# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002266echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002267echo "configure:2268: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002268if test -z "$CCSHARED"
2269then
Guido van Rossum07397971997-04-29 21:49:50 +00002270 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002271 hp*|HP*) if test "$GCC" = yes;
2272 then CCSHARED="-fpic";
2273 else CCSHARED="+z";
2274 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002275 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002276 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002277 FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
2278 NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002279 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002280 IRIX*/6*) case $CC in
2281 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002282 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002283 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002284 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002285fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002286echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002287# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002288# the python executable -- this is only needed for a few systems
2289echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002290echo "configure:2291: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002291if test -z "$LINKFORSHARED"
2292then
Guido van Rossum07397971997-04-29 21:49:50 +00002293 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002294 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002295 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002296 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002297 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002298 FreeBSD/[34]*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002299 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002300 # -u libsys_s pulls in all symbols in libsys
2301 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2302 # -u __dummy makes the linker aware of the objc runtime
2303 # in System.framework; otherwise, __objcInit (referenced in
2304 # crt1.o) gets erroneously defined as common, which breaks dynamic
2305 # loading of any modules which reference it in System.framework
2306 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002307 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002308 NetBSD*)
2309 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2310 then
2311 LINKFORSHARED="-Wl,--export-dynamic"
2312 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002313 SunOS/5*) case $CC in
2314 *gcc*)
2315 if $CC -Xlinker -V 2>/dev/null | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002316 then
2317 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002318 fi;;
2319 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002320 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002321fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002322echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002323
Guido van Rossum627b2d71993-12-24 10:39:16 +00002324# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002325echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002326echo "configure:2327: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002327ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002328if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002329 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002330else
2331 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002332LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002333cat > conftest.$ac_ext <<EOF
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002334#line 2335 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002335#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002336/* Override any gcc2 internal prototype to avoid an error. */
2337/* We use char because int might match the return type of a gcc2
2338 builtin and then its argument prototype would still apply. */
2339char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002340
Guido van Rossumf78abae1997-01-21 22:02:36 +00002341int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342dlopen()
2343; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002344EOF
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002345if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002346 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002347 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002348else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002349 echo "configure: failed program was:" >&5
2350 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002351 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002352 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002353fi
2354rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002355LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002356
Guido van Rossum627b2d71993-12-24 10:39:16 +00002357fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002358if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002359 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002360 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2361 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002362 cat >> confdefs.h <<EOF
2363#define $ac_tr_lib 1
2364EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002365
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002366 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002367
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002368else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002369 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002370fi
2371 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002372echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002373echo "configure:2374: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002374ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002375if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002376 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002377else
2378 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002379LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002380cat > conftest.$ac_ext <<EOF
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002381#line 2382 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002382#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383/* Override any gcc2 internal prototype to avoid an error. */
2384/* We use char because int might match the return type of a gcc2
2385 builtin and then its argument prototype would still apply. */
2386char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002387
Guido van Rossumf78abae1997-01-21 22:02:36 +00002388int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002389shl_load()
2390; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002391EOF
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002392if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002393 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002394 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002395else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002396 echo "configure: failed program was:" >&5
2397 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002398 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002399 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002400fi
2401rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002402LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002403
Guido van Rossum627b2d71993-12-24 10:39:16 +00002404fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002405if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002406 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002407 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2408 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002409 cat >> confdefs.h <<EOF
2410#define $ac_tr_lib 1
2411EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002412
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002413 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002414
2415else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002416 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002417fi
2418 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002419
2420# checks for system dependent C++ extensions support
2421case "$ac_sys_system" in
2422 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
2423echo "configure:2424: checking for genuine AIX C++ extensions support" >&5
2424 cat > conftest.$ac_ext <<EOF
2425#line 2426 "configure"
2426#include "confdefs.h"
2427#include "/usr/lpp/xlC/include/load.h"
2428int main() {
2429loadAndInit("", 0, "")
2430; return 0; }
2431EOF
2432if { (eval echo configure:2433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2433 rm -rf conftest*
2434 cat >> confdefs.h <<\EOF
2435#define AIX_GENUINE_CPLUSPLUS 1
2436EOF
2437
2438 echo "$ac_t""yes" 1>&6
2439else
2440 echo "configure: failed program was:" >&5
2441 cat conftest.$ac_ext >&5
2442 rm -rf conftest*
2443 echo "$ac_t""no" 1>&6
2444fi
2445rm -f conftest*;;
2446 *) ;;
2447esac
2448
Guido van Rossum70c7f481998-03-26 18:44:10 +00002449# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2450# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002451# BeOS' sockets are stashed in libnet.
2452case "$ac_sys_system" in
2453IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002454*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002455echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002456echo "configure:2457: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002457ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002459 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002460else
2461 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002462LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002463cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002464#line 2465 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002465#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002466/* Override any gcc2 internal prototype to avoid an error. */
2467/* We use char because int might match the return type of a gcc2
2468 builtin and then its argument prototype would still apply. */
2469char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002470
Guido van Rossumf78abae1997-01-21 22:02:36 +00002471int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002472t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002473; return 0; }
2474EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002475if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002476 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002477 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002478else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002479 echo "configure: failed program was:" >&5
2480 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002481 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002482 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002483fi
2484rm -f conftest*
2485LIBS="$ac_save_LIBS"
2486
2487fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002488if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002489 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002490 LIBS="-lnsl $LIBS"
2491else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002492 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002493fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002494 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002495echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002496echo "configure:2497: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002497ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002499 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002500else
2501 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002502LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002503cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002504#line 2505 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002505#include "confdefs.h"
2506/* Override any gcc2 internal prototype to avoid an error. */
2507/* We use char because int might match the return type of a gcc2
2508 builtin and then its argument prototype would still apply. */
2509char socket();
2510
2511int main() {
2512socket()
2513; return 0; }
2514EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002515if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002516 rm -rf conftest*
2517 eval "ac_cv_lib_$ac_lib_var=yes"
2518else
2519 echo "configure: failed program was:" >&5
2520 cat conftest.$ac_ext >&5
2521 rm -rf conftest*
2522 eval "ac_cv_lib_$ac_lib_var=no"
2523fi
2524rm -f conftest*
2525LIBS="$ac_save_LIBS"
2526
2527fi
2528if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2529 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002530 LIBS="-lsocket $LIBS"
2531else
2532 echo "$ac_t""no" 1>&6
2533fi
2534 # SVR4 sockets
2535echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002536echo "configure:2537: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002537ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
2538if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2539 echo $ac_n "(cached) $ac_c" 1>&6
2540else
2541 ac_save_LIBS="$LIBS"
2542LIBS="-lnet $LIBS $LIBS"
2543cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002544#line 2545 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002545#include "confdefs.h"
2546/* Override any gcc2 internal prototype to avoid an error. */
2547/* We use char because int might match the return type of a gcc2
2548 builtin and then its argument prototype would still apply. */
2549char socket();
2550
2551int main() {
2552socket()
2553; return 0; }
2554EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002555if { (eval echo configure:2556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002556 rm -rf conftest*
2557 eval "ac_cv_lib_$ac_lib_var=yes"
2558else
2559 echo "configure: failed program was:" >&5
2560 cat conftest.$ac_ext >&5
2561 rm -rf conftest*
2562 eval "ac_cv_lib_$ac_lib_var=no"
2563fi
2564rm -f conftest*
2565LIBS="$ac_save_LIBS"
2566
2567fi
2568if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2569 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002570 LIBS="-lnet $LIBS"
2571else
2572 echo "$ac_t""no" 1>&6
2573fi
2574 # BeOS
2575;;
2576esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002577
Guido van Rossuma68acba1996-07-31 17:36:39 +00002578echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002579echo "configure:2580: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002580# Check whether --with-libs or --without-libs was given.
2581if test "${with_libs+set}" = set; then
2582 withval="$with_libs"
2583
2584echo "$ac_t""$withval" 1>&6
2585LIBS="$withval $LIBS"
2586
2587else
2588 echo "$ac_t""no" 1>&6
2589fi
2590
Guido van Rossum7f43da71994-08-01 12:15:30 +00002591
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002592echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002593echo "configure:2594: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002594# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002595if test "${with_readline+set}" = set; then
2596 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002597 echo "$ac_t""$withval" 1>&6
2598{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002599else
Guido van Rossumb06df271997-08-05 21:50:20 +00002600 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002601fi
2602
Guido van Rossum7f43da71994-08-01 12:15:30 +00002603
Guido van Rossum009f7871997-12-04 00:51:42 +00002604
2605USE_THREAD_MODULE="#"
2606
Guido van Rossumec2f0731997-01-22 20:54:01 +00002607echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002608echo "configure:2609: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002609
2610# Check whether --with-dec-threads or --without-dec-threads was given.
2611if test "${with_dec_threads+set}" = set; then
2612 withval="$with_dec_threads"
2613 echo "$ac_t""$withval" 1>&6
2614LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002615if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002616 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002617fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002618else
2619 echo "$ac_t""no" 1>&6
2620fi
2621
2622
2623echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002624echo "configure:2625: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002625# Check whether --with-threads or --without-threads was given.
2626if test "${with_threads+set}" = set; then
2627 withval="$with_threads"
2628 echo "$ac_t""$withval" 1>&6
2629if test "${with_thread+set}" != set; then
2630 with_thread="$withval";
2631fi
2632else
2633 echo "$ac_t""no" 1>&6
2634fi
2635
2636
2637echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002638echo "configure:2639: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002639# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002640if test "${with_thread+set}" = set; then
2641 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002642
Guido van Rossum009f7871997-12-04 00:51:42 +00002643USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002644echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002645if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002646then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002647fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002648cat >> confdefs.h <<\EOF
2649#define _REENTRANT 1
2650EOF
2651
Guido van Rossumf78abae1997-01-21 22:02:36 +00002652ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002653echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002654echo "configure:2655: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002655if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2656 echo $ac_n "(cached) $ac_c" 1>&6
2657else
2658 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002659#line 2660 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002660#include "confdefs.h"
2661#include <mach/cthreads.h>
2662EOF
2663ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002664{ (eval echo configure:2665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002665ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002666if test -z "$ac_err"; then
2667 rm -rf conftest*
2668 eval "ac_cv_header_$ac_safe=yes"
2669else
2670 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002671 echo "configure: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002673 rm -rf conftest*
2674 eval "ac_cv_header_$ac_safe=no"
2675fi
2676rm -f conftest*
2677fi
2678if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2679 echo "$ac_t""yes" 1>&6
2680 cat >> confdefs.h <<\EOF
2681#define WITH_THREAD 1
2682EOF
2683
2684cat >> confdefs.h <<\EOF
2685#define C_THREADS 1
2686EOF
2687
2688LIBOBJS="$LIBOBJS thread.o"
2689else
2690 echo "$ac_t""no" 1>&6
2691
Guido van Rossumea516321998-12-17 18:08:55 +00002692echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002693echo "configure:2694: checking for pthread_detach" >&5
Guido van Rossumea516321998-12-17 18:08:55 +00002694if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002695 echo $ac_n "(cached) $ac_c" 1>&6
2696else
2697 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002698#line 2699 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002699#include "confdefs.h"
2700/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00002701 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00002702#include <assert.h>
2703/* Override any gcc2 internal prototype to avoid an error. */
2704/* We use char because int might match the return type of a gcc2
2705 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00002706char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002707
2708int main() {
2709
2710/* The GNU C library defines this for functions which it implements
2711 to always fail with ENOSYS. Some functions are actually named
2712 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00002713#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00002714choke me
2715#else
Guido van Rossumea516321998-12-17 18:08:55 +00002716pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002717#endif
2718
2719; return 0; }
2720EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002721if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002722 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002723 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00002724else
2725 echo "configure: failed program was:" >&5
2726 cat conftest.$ac_ext >&5
2727 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002728 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00002729fi
2730rm -f conftest*
2731fi
2732
Guido van Rossumea516321998-12-17 18:08:55 +00002733if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002734 echo "$ac_t""yes" 1>&6
2735 cat >> confdefs.h <<\EOF
2736#define WITH_THREAD 1
2737EOF
2738
2739cat >> confdefs.h <<\EOF
2740#define _POSIX_THREADS 1
2741EOF
2742
2743LIBOBJS="$LIBOBJS thread.o"
2744else
2745 echo "$ac_t""no" 1>&6
2746
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002747ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
2748echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002749echo "configure:2750: checking for kernel/OS.h" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002750if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2751 echo $ac_n "(cached) $ac_c" 1>&6
2752else
2753 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002754#line 2755 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002755#include "confdefs.h"
2756#include <kernel/OS.h>
2757EOF
2758ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002759{ (eval echo configure:2760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002760ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002761if test -z "$ac_err"; then
2762 rm -rf conftest*
2763 eval "ac_cv_header_$ac_safe=yes"
2764else
2765 echo "$ac_err" >&5
2766 echo "configure: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 rm -rf conftest*
2769 eval "ac_cv_header_$ac_safe=no"
2770fi
2771rm -f conftest*
2772fi
2773if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2774 echo "$ac_t""yes" 1>&6
2775 cat >> confdefs.h <<\EOF
2776#define WITH_THREAD 1
2777EOF
2778
2779cat >> confdefs.h <<\EOF
2780#define BEOS_THREADS 1
2781EOF
2782
2783LIBOBJS="$LIBOBJS thread.o"
2784else
2785 echo "$ac_t""no" 1>&6
2786
Guido van Rossumf78abae1997-01-21 22:02:36 +00002787echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002788echo "configure:2789: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002789ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002790if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002791 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792else
2793 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002794LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002795cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002796#line 2797 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002797#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002798/* Override any gcc2 internal prototype to avoid an error. */
2799/* We use char because int might match the return type of a gcc2
2800 builtin and then its argument prototype would still apply. */
2801char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002802
Guido van Rossumf78abae1997-01-21 22:02:36 +00002803int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002804pthread_create()
2805; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002806EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002807if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002808 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002809 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002810else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002811 echo "configure: failed program was:" >&5
2812 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002813 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002814 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002815fi
2816rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002817LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002818
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002820if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002821 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002822 cat >> confdefs.h <<\EOF
2823#define WITH_THREAD 1
2824EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002825
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002826cat >> confdefs.h <<\EOF
2827#define _POSIX_THREADS 1
2828EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002829
2830LIBS="$LIBS -lpthreads"
2831LIBOBJS="$LIBOBJS thread.o"
2832else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002833 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002834
Guido van Rossumf78abae1997-01-21 22:02:36 +00002835echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002836echo "configure:2837: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002837ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002838if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2839 echo $ac_n "(cached) $ac_c" 1>&6
2840else
2841 ac_save_LIBS="$LIBS"
2842LIBS="-lpthread $LIBS"
2843cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002844#line 2845 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002845#include "confdefs.h"
2846/* Override any gcc2 internal prototype to avoid an error. */
2847/* We use char because int might match the return type of a gcc2
2848 builtin and then its argument prototype would still apply. */
2849char pthread_create();
2850
Guido van Rossumf78abae1997-01-21 22:02:36 +00002851int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002852pthread_create()
2853; return 0; }
2854EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002855if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002856 rm -rf conftest*
2857 eval "ac_cv_lib_$ac_lib_var=yes"
2858else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002859 echo "configure: failed program was:" >&5
2860 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002861 rm -rf conftest*
2862 eval "ac_cv_lib_$ac_lib_var=no"
2863fi
2864rm -f conftest*
2865LIBS="$ac_save_LIBS"
2866
2867fi
2868if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2869 echo "$ac_t""yes" 1>&6
2870 cat >> confdefs.h <<\EOF
2871#define WITH_THREAD 1
2872EOF
2873
2874cat >> confdefs.h <<\EOF
2875#define _POSIX_THREADS 1
2876EOF
2877
2878LIBS="$LIBS -lpthread"
2879LIBOBJS="$LIBOBJS thread.o"
2880else
2881 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002882
Guido van Rossum49545951997-12-02 19:28:29 +00002883echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002884echo "configure:2885: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00002885ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2886if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2887 echo $ac_n "(cached) $ac_c" 1>&6
2888else
2889 ac_save_LIBS="$LIBS"
2890LIBS="-lc_r $LIBS"
2891cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002892#line 2893 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00002893#include "confdefs.h"
2894/* Override any gcc2 internal prototype to avoid an error. */
2895/* We use char because int might match the return type of a gcc2
2896 builtin and then its argument prototype would still apply. */
2897char pthread_create();
2898
2899int main() {
2900pthread_create()
2901; return 0; }
2902EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002903if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00002904 rm -rf conftest*
2905 eval "ac_cv_lib_$ac_lib_var=yes"
2906else
2907 echo "configure: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2909 rm -rf conftest*
2910 eval "ac_cv_lib_$ac_lib_var=no"
2911fi
2912rm -f conftest*
2913LIBS="$ac_save_LIBS"
2914
2915fi
2916if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2917 echo "$ac_t""yes" 1>&6
2918 cat >> confdefs.h <<\EOF
2919#define WITH_THREAD 1
2920EOF
2921
2922cat >> confdefs.h <<\EOF
2923#define _POSIX_THREADS 1
2924EOF
2925
2926LIBS="$LIBS -lc_r"
2927LIBOBJS="$LIBOBJS thread.o"
2928else
2929 echo "$ac_t""no" 1>&6
2930
Guido van Rossum0be3e491997-05-22 20:33:33 +00002931echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002932echo "configure:2933: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002933ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2934if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2935 echo $ac_n "(cached) $ac_c" 1>&6
2936else
2937 ac_save_LIBS="$LIBS"
2938LIBS="-lthread $LIBS"
2939cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002940#line 2941 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002941#include "confdefs.h"
2942/* Override any gcc2 internal prototype to avoid an error. */
2943/* We use char because int might match the return type of a gcc2
2944 builtin and then its argument prototype would still apply. */
2945char __d6_pthread_create();
2946
2947int main() {
2948__d6_pthread_create()
2949; return 0; }
2950EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002951if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002952 rm -rf conftest*
2953 eval "ac_cv_lib_$ac_lib_var=yes"
2954else
2955 echo "configure: failed program was:" >&5
2956 cat conftest.$ac_ext >&5
2957 rm -rf conftest*
2958 eval "ac_cv_lib_$ac_lib_var=no"
2959fi
2960rm -f conftest*
2961LIBS="$ac_save_LIBS"
2962
2963fi
2964if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2965 echo "$ac_t""yes" 1>&6
2966 cat >> confdefs.h <<\EOF
2967#define WITH_THREAD 1
2968EOF
2969
2970cat >> confdefs.h <<\EOF
2971#define _POSIX_THREADS 1
2972EOF
2973
2974LIBS="$LIBS -lthread"
2975LIBOBJS="$LIBOBJS thread.o"
2976else
2977 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002978
2979echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002980echo "configure:2981: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00002981ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
2982if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2983 echo $ac_n "(cached) $ac_c" 1>&6
2984else
2985 ac_save_LIBS="$LIBS"
2986LIBS="-lcma $LIBS"
2987cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002988#line 2989 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00002989#include "confdefs.h"
2990/* Override any gcc2 internal prototype to avoid an error. */
2991/* We use char because int might match the return type of a gcc2
2992 builtin and then its argument prototype would still apply. */
2993char pthread_create();
2994
2995int main() {
2996pthread_create()
2997; return 0; }
2998EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002999if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003000 rm -rf conftest*
3001 eval "ac_cv_lib_$ac_lib_var=yes"
3002else
3003 echo "configure: failed program was:" >&5
3004 cat conftest.$ac_ext >&5
3005 rm -rf conftest*
3006 eval "ac_cv_lib_$ac_lib_var=no"
3007fi
3008rm -f conftest*
3009LIBS="$ac_save_LIBS"
3010
3011fi
3012if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3013 echo "$ac_t""yes" 1>&6
3014 cat >> confdefs.h <<\EOF
3015#define WITH_THREAD 1
3016EOF
3017
3018cat >> confdefs.h <<\EOF
3019#define _POSIX_THREADS 1
3020EOF
3021
3022LIBS="$LIBS -lcma"
3023LIBOBJS="$LIBOBJS thread.o"
3024else
3025 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00003026fi
3027
3028
Guido van Rossum627b2d71993-12-24 10:39:16 +00003029fi
3030
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003031fi
3032
Guido van Rossum0be3e491997-05-22 20:33:33 +00003033fi
3034
Guido van Rossum49545951997-12-02 19:28:29 +00003035fi
3036
Guido van Rossumb93a8621998-05-07 13:27:32 +00003037fi
3038
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003039fi
3040
Guido van Rossumad678af1998-10-02 14:42:15 +00003041fi
3042
Guido van Rossum0be3e491997-05-22 20:33:33 +00003043
Guido van Rossumf78abae1997-01-21 22:02:36 +00003044echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003045echo "configure:3046: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003046ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003047if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003048 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003049else
3050 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003051LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003052cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003053#line 3054 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003054#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003055/* Override any gcc2 internal prototype to avoid an error. */
3056/* We use char because int might match the return type of a gcc2
3057 builtin and then its argument prototype would still apply. */
3058char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003059
Guido van Rossumf78abae1997-01-21 22:02:36 +00003060int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003061usconfig()
3062; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003063EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003064if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003065 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003066 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003067else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003068 echo "configure: failed program was:" >&5
3069 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003070 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003071 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003072fi
3073rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003074LIBS="$ac_save_LIBS"
3075
3076fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003077if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003078 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003079 cat >> confdefs.h <<\EOF
3080#define WITH_THREAD 1
3081EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003082
Guido van Rossum7f43da71994-08-01 12:15:30 +00003083LIBS="$LIBS -lmpc"
3084LIBOBJS="$LIBOBJS thread.o"
3085else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003086 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003087fi
3088
Guido van Rossumf78abae1997-01-21 22:02:36 +00003089echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003090echo "configure:3091: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003091ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003092if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003093 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003094else
3095 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003096LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003097cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003098#line 3099 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003099#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003100/* Override any gcc2 internal prototype to avoid an error. */
3101/* We use char because int might match the return type of a gcc2
3102 builtin and then its argument prototype would still apply. */
3103char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003104
Guido van Rossumf78abae1997-01-21 22:02:36 +00003105int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003106thr_create()
3107; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003108EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003109if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003110 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003111 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003113 echo "configure: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003116 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003117fi
3118rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003119LIBS="$ac_save_LIBS"
3120
3121fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003122if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003123 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003124 cat >> confdefs.h <<\EOF
3125#define WITH_THREAD 1
3126EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003127
Guido van Rossum7f43da71994-08-01 12:15:30 +00003128LIBS="$LIBS -lthread"
3129LIBOBJS="$LIBOBJS thread.o"
3130else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003131 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003132fi
3133
Guido van Rossum7f43da71994-08-01 12:15:30 +00003134
Guido van Rossumda88dad1995-01-26 00:46:29 +00003135else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003136 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003137fi
3138
Guido van Rossum7f43da71994-08-01 12:15:30 +00003139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003140# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003141
3142DLINCLDIR=/
3143
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003144echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003145echo "configure:3146: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003146# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003147if test "${with_sgi_dl+set}" = set; then
3148 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003150echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003151cat >> confdefs.h <<\EOF
3152#define WITH_SGI_DL 1
3153EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003154
3155dldir=$withval
3156if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003157then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003158else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003159fi
3160DLINCLDIR=${dldir}
3161LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003162else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003163 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003164fi
3165
3166
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003167echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003168echo "configure:3169: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003170if test "${with_dl_dld+set}" = set; then
3171 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003172
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003173echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003174cat >> confdefs.h <<\EOF
3175#define WITH_DL_DLD 1
3176EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003177
3178dldir=`echo "$withval" | sed 's/,.*//'`
3179dlddir=`echo "$withval" | sed 's/.*,//'`
3180if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003181then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003182else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003183fi
3184DLINCLDIR=${dldir}
3185LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003186else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003187 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003188fi
3189
3190
Guido van Rossum627b2d71993-12-24 10:39:16 +00003191# checks for library functions
Guido van Rossumdf693651999-01-07 21:50:41 +00003192for ac_func in alarm chown clock dlopen execv flock fork \
3193 fsync fdatasync ftime ftruncate \
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00003194 getpeername getpgrp getpid getpwent gettimeofday getwd \
Guido van Rossumad678af1998-10-02 14:42:15 +00003195 kill link lstat mkfifo mktime nice pause plock pthread_init putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00003196 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003197 sigaction siginterrupt sigrelse strftime strptime symlink \
Guido van Rossum08d6be41998-06-11 15:19:05 +00003198 tcgetpgrp tcsetpgrp timegm times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00003199do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003200echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003201echo "configure:3202: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003202if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3203 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003204else
3205 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003206#line 3207 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003207#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003208/* System header to define __stub macros and hopefully few prototypes,
3209 which can conflict with char $ac_func(); below. */
3210#include <assert.h>
3211/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003212/* We use char because int might match the return type of a gcc2
3213 builtin and then its argument prototype would still apply. */
3214char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003215
Guido van Rossumf78abae1997-01-21 22:02:36 +00003216int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003217
Guido van Rossum627b2d71993-12-24 10:39:16 +00003218/* The GNU C library defines this for functions which it implements
3219 to always fail with ENOSYS. Some functions are actually named
3220 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003221#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003222choke me
3223#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003224$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003225#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003226
Guido van Rossum7f43da71994-08-01 12:15:30 +00003227; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003228EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003229if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003230 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003231 eval "ac_cv_func_$ac_func=yes"
3232else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003233 echo "configure: failed program was:" >&5
3234 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235 rm -rf conftest*
3236 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003237fi
3238rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003239fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003240
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003242 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003243 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003244 cat >> confdefs.h <<EOF
3245#define $ac_tr_func 1
3246EOF
3247
3248else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003249 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003250fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003251done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003252
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003253
3254# check for long file support functions
3255for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003256do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003257echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003258echo "configure:3259: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003259if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3260 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261else
3262 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003263#line 3264 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003264#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003265/* System header to define __stub macros and hopefully few prototypes,
3266 which can conflict with char $ac_func(); below. */
3267#include <assert.h>
3268/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003269/* We use char because int might match the return type of a gcc2
3270 builtin and then its argument prototype would still apply. */
3271char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003272
Guido van Rossumf78abae1997-01-21 22:02:36 +00003273int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003274
Guido van Rossum627b2d71993-12-24 10:39:16 +00003275/* The GNU C library defines this for functions which it implements
3276 to always fail with ENOSYS. Some functions are actually named
3277 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003279choke me
3280#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003281$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003282#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283
Guido van Rossum7f43da71994-08-01 12:15:30 +00003284; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003285EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003286if { (eval echo configure:3287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003287 rm -rf conftest*
3288 eval "ac_cv_func_$ac_func=yes"
3289else
3290 echo "configure: failed program was:" >&5
3291 cat conftest.$ac_ext >&5
3292 rm -rf conftest*
3293 eval "ac_cv_func_$ac_func=no"
3294fi
3295rm -f conftest*
3296fi
3297
3298if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3299 echo "$ac_t""yes" 1>&6
3300 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3301 cat >> confdefs.h <<EOF
3302#define $ac_tr_func 1
3303EOF
3304
3305else
3306 echo "$ac_t""no" 1>&6
3307fi
3308done
3309
3310
3311for ac_func in dup2 getcwd strdup strerror memmove
3312do
3313echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003314echo "configure:3315: checking for $ac_func" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003315if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3316 echo $ac_n "(cached) $ac_c" 1>&6
3317else
3318 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003319#line 3320 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003320#include "confdefs.h"
3321/* System header to define __stub macros and hopefully few prototypes,
3322 which can conflict with char $ac_func(); below. */
3323#include <assert.h>
3324/* Override any gcc2 internal prototype to avoid an error. */
3325/* We use char because int might match the return type of a gcc2
3326 builtin and then its argument prototype would still apply. */
3327char $ac_func();
3328
3329int main() {
3330
3331/* The GNU C library defines this for functions which it implements
3332 to always fail with ENOSYS. Some functions are actually named
3333 something starting with __ and the normal name is an alias. */
3334#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3335choke me
3336#else
3337$ac_func();
3338#endif
3339
3340; return 0; }
3341EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003342if { (eval echo configure:3343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003343 rm -rf conftest*
3344 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003345else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003346 echo "configure: failed program was:" >&5
3347 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003348 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003349 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003350fi
3351rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003352fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003353
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003354if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003355 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003356 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3357 cat >> confdefs.h <<EOF
3358#define $ac_tr_func 1
3359EOF
3360
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003361else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003362 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003363LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003364fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003365done
3366
Guido van Rossumf78abae1997-01-21 22:02:36 +00003367
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003368echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003369echo "configure:3370: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003370if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
3371 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003372else
3373 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003374#line 3375 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003375#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003376/* System header to define __stub macros and hopefully few prototypes,
3377 which can conflict with char getpgrp(); below. */
3378#include <assert.h>
3379/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003380/* We use char because int might match the return type of a gcc2
3381 builtin and then its argument prototype would still apply. */
3382char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003383
Guido van Rossumf78abae1997-01-21 22:02:36 +00003384int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385
Guido van Rossum627b2d71993-12-24 10:39:16 +00003386/* The GNU C library defines this for functions which it implements
3387 to always fail with ENOSYS. Some functions are actually named
3388 something starting with __ and the normal name is an alias. */
3389#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
3390choke me
3391#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003392getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003393#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003394
3395; return 0; }
3396EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003397if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003398 rm -rf conftest*
3399 eval "ac_cv_func_getpgrp=yes"
3400else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003401 echo "configure: failed program was:" >&5
3402 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003403 rm -rf conftest*
3404 eval "ac_cv_func_getpgrp=no"
3405fi
3406rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003407fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003409if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003410 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003411 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003412#line 3413 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003413#include "confdefs.h"
3414#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003415int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003416getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003417; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003418EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003419if { (eval echo configure:3420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003420 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003421 cat >> confdefs.h <<\EOF
3422#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003423EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003424
Guido van Rossumf78abae1997-01-21 22:02:36 +00003425else
3426 echo "configure: failed program was:" >&5
3427 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003428fi
3429rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003430else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003431 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003432fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003433
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003434echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003435echo "configure:3436: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003436if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
3437 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003438else
3439 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003440#line 3441 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003441#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003442/* System header to define __stub macros and hopefully few prototypes,
3443 which can conflict with char setpgrp(); below. */
3444#include <assert.h>
3445/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003446/* We use char because int might match the return type of a gcc2
3447 builtin and then its argument prototype would still apply. */
3448char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003449
Guido van Rossumf78abae1997-01-21 22:02:36 +00003450int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003451
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003452/* The GNU C library defines this for functions which it implements
3453 to always fail with ENOSYS. Some functions are actually named
3454 something starting with __ and the normal name is an alias. */
3455#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
3456choke me
3457#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003458setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003459#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003460
3461; return 0; }
3462EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003463if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003464 rm -rf conftest*
3465 eval "ac_cv_func_setpgrp=yes"
3466else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003467 echo "configure: failed program was:" >&5
3468 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003469 rm -rf conftest*
3470 eval "ac_cv_func_setpgrp=no"
3471fi
3472rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003473fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003475if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003476 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003477 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003478#line 3479 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003479#include "confdefs.h"
3480#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003481int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003482setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003483; return 0; }
3484EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003485if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003486 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003487 cat >> confdefs.h <<\EOF
3488#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003489EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003490
Guido van Rossumf78abae1997-01-21 22:02:36 +00003491else
3492 echo "configure: failed program was:" >&5
3493 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003494fi
3495rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003496else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003497 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003498fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003499
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003500echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003501echo "configure:3502: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003502if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3503 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003504else
3505 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003506#line 3507 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003507#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003508/* System header to define __stub macros and hopefully few prototypes,
3509 which can conflict with char gettimeofday(); below. */
3510#include <assert.h>
3511/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003512/* We use char because int might match the return type of a gcc2
3513 builtin and then its argument prototype would still apply. */
3514char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003515
Guido van Rossumf78abae1997-01-21 22:02:36 +00003516int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003517
3518/* The GNU C library defines this for functions which it implements
3519 to always fail with ENOSYS. Some functions are actually named
3520 something starting with __ and the normal name is an alias. */
3521#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3522choke me
3523#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003524gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003525#endif
3526
3527; return 0; }
3528EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003529if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003530 rm -rf conftest*
3531 eval "ac_cv_func_gettimeofday=yes"
3532else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003533 echo "configure: failed program was:" >&5
3534 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003535 rm -rf conftest*
3536 eval "ac_cv_func_gettimeofday=no"
3537fi
3538rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003539fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003540
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003541if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003542 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003543 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003544#line 3545 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003545#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003546#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003547int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003548gettimeofday((struct timeval*)0,(struct timezone*)0);
3549; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003550EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003551if { (eval echo configure:3552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003552 :
3553else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003554 echo "configure: failed program was:" >&5
3555 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003556 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003557 cat >> confdefs.h <<\EOF
3558#define GETTIMEOFDAY_NO_TZ 1
3559EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003560
3561fi
3562rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003563else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003564 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003565fi
3566
3567
3568# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003569echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003570echo "configure:3571: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003571if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3572 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003573else
3574 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003575#line 3576 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003576#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003577#include <sys/types.h>
3578#include <sys/time.h>
3579#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003580int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003581struct tm *tp;
3582; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003583EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003584if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003585 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003586 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003587else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003588 echo "configure: failed program was:" >&5
3589 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003590 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003591 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003592fi
3593rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003594fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003595
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003596echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597if test $ac_cv_header_time = yes; then
3598 cat >> confdefs.h <<\EOF
3599#define TIME_WITH_SYS_TIME 1
3600EOF
3601
3602fi
3603
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003604echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003605echo "configure:3606: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003606if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3607 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003608else
3609 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003610#line 3611 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003611#include "confdefs.h"
3612#include <sys/types.h>
3613#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003614int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003615struct tm *tp; tp->tm_sec;
3616; return 0; }
3617EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003618if { (eval echo configure:3619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003619 rm -rf conftest*
3620 ac_cv_struct_tm=time.h
3621else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003622 echo "configure: failed program was:" >&5
3623 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003624 rm -rf conftest*
3625 ac_cv_struct_tm=sys/time.h
3626fi
3627rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003628fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003629
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003630echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003631if test $ac_cv_struct_tm = sys/time.h; then
3632 cat >> confdefs.h <<\EOF
3633#define TM_IN_SYS_TIME 1
3634EOF
3635
3636fi
3637
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003638echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003639echo "configure:3640: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003640if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3641 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003642else
3643 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003644#line 3645 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003645#include "confdefs.h"
3646#include <sys/types.h>
3647#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003648int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003649struct tm tm; tm.tm_zone;
3650; return 0; }
3651EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003652if { (eval echo configure:3653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003653 rm -rf conftest*
3654 ac_cv_struct_tm_zone=yes
3655else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003656 echo "configure: failed program was:" >&5
3657 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003658 rm -rf conftest*
3659 ac_cv_struct_tm_zone=no
3660fi
3661rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003662fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003663
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003664echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003665if test "$ac_cv_struct_tm_zone" = yes; then
3666 cat >> confdefs.h <<\EOF
3667#define HAVE_TM_ZONE 1
3668EOF
3669
3670else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003671 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003672echo "configure:3673: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003673if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3674 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003675else
3676 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003677#line 3678 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003678#include "confdefs.h"
3679#include <time.h>
3680#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003681extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003682#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003683int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003684atoi(*tzname);
3685; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003686EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003687if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003688 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003689 ac_cv_var_tzname=yes
3690else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003691 echo "configure: failed program was:" >&5
3692 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003693 rm -rf conftest*
3694 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003695fi
3696rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003697fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003698
3699echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003700 if test $ac_cv_var_tzname = yes; then
3701 cat >> confdefs.h <<\EOF
3702#define HAVE_TZNAME 1
3703EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003704
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003705 fi
3706fi
3707
3708
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003709echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003710echo "configure:3711: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003711if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3712 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003713else
3714 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003715#line 3716 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003716#include "confdefs.h"
3717#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003718int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003719return altzone;
3720; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003721EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003722if { (eval echo configure:3723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003723 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724 ac_cv_header_time_altzone=yes
3725else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003726 echo "configure: failed program was:" >&5
3727 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728 rm -rf conftest*
3729 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003730fi
3731rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003732fi
3733
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003734echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003735if test $ac_cv_header_time_altzone = yes; then
3736 cat >> confdefs.h <<\EOF
3737#define HAVE_ALTZONE 1
3738EOF
3739
3740fi
3741
Guido van Rossumda88dad1995-01-26 00:46:29 +00003742was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003743echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003744echo "configure:3745: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003746#line 3747 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003747#include "confdefs.h"
3748
3749#include <sys/types.h>
3750#include <sys/select.h>
3751#include <sys/time.h>
3752
Guido van Rossumf78abae1997-01-21 22:02:36 +00003753int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003754;
3755; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003756EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003757if { (eval echo configure:3758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003758 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003759 cat >> confdefs.h <<\EOF
3760#define SYS_SELECT_WITH_SYS_TIME 1
3761EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003762 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003763else
3764 echo "configure: failed program was:" >&5
3765 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003766fi
3767rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003768echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003769
3770# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003771
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003772echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003773echo "configure:3774: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003774if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3775 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003776else
3777 if test "$GCC" = yes; then
3778 # GCC predefines this symbol on systems where it applies.
3779cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003780#line 3781 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003781#include "confdefs.h"
3782#ifdef __CHAR_UNSIGNED__
3783 yes
3784#endif
3785
3786EOF
3787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3788 egrep "yes" >/dev/null 2>&1; then
3789 rm -rf conftest*
3790 ac_cv_c_char_unsigned=yes
3791else
3792 rm -rf conftest*
3793 ac_cv_c_char_unsigned=no
3794fi
3795rm -f conftest*
3796
3797else
3798if test "$cross_compiling" = yes; then
3799 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3800else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003801 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003802#line 3803 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003803#include "confdefs.h"
3804/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003805#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003806#define volatile
3807#endif
3808main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003809 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003810}
3811EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003812if { (eval echo configure:3813: \"$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 +00003813then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003814 ac_cv_c_char_unsigned=yes
3815else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003816 echo "configure: failed program was:" >&5
3817 cat conftest.$ac_ext >&5
3818 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003819 ac_cv_c_char_unsigned=no
3820fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003821rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003822fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003823
3824fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003825fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003826
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003827echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003828if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3829 cat >> confdefs.h <<\EOF
3830#define __CHAR_UNSIGNED__ 1
3831EOF
3832
3833fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003834
3835
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003836echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003837echo "configure:3838: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003838if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3839 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003840else
3841 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003842#line 3843 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003843#include "confdefs.h"
3844
Guido van Rossumf78abae1997-01-21 22:02:36 +00003845int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003846
3847/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003848typedef int charset[2]; const charset x;
3849/* SunOS 4.1.1 cc rejects this. */
3850char const *const *ccp;
3851char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003852/* NEC SVR4.0.2 mips cc rejects this. */
3853struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003854static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003855/* AIX XL C 1.02.0.0 rejects this.
3856 It does not let you subtract one const X* pointer from another in an arm
3857 of an if-expression whose if-part is not a constant expression */
3858const char *g = "string";
3859ccp = &g + (g ? g-g : 0);
3860/* HPUX 7.0 cc rejects these. */
3861++ccp;
3862p = (char**) ccp;
3863ccp = (char const *const *) p;
3864{ /* SCO 3.2v4 cc rejects this. */
3865 char *t;
3866 char const *s = 0 ? (char *) 0 : (char const *) 0;
3867
3868 *t++ = 0;
3869}
3870{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003871 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003872 const int *foo = &x[0];
3873 ++foo;
3874}
3875{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3876 typedef const int *iptr;
3877 iptr p = 0;
3878 ++p;
3879}
3880{ /* AIX XL C 1.02.0.0 rejects this saying
3881 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3882 struct s { int j; const int *ap[3]; };
3883 struct s *b; b->j = 5;
3884}
3885{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3886 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887}
3888
3889; return 0; }
3890EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003891if { (eval echo configure:3892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003892 rm -rf conftest*
3893 ac_cv_c_const=yes
3894else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003895 echo "configure: failed program was:" >&5
3896 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003897 rm -rf conftest*
3898 ac_cv_c_const=no
3899fi
3900rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003901fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003903echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003904if test $ac_cv_c_const = no; then
3905 cat >> confdefs.h <<\EOF
3906#define const
3907EOF
3908
3909fi
3910
3911
Guido van Rossumda88dad1995-01-26 00:46:29 +00003912works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003913echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003914echo "configure:3915: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003915cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003916#line 3917 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003917#include "confdefs.h"
3918
Guido van Rossumf78abae1997-01-21 22:02:36 +00003919int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920volatile int x; x = 0;
3921; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003922EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003923if { (eval echo configure:3924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003924 rm -rf conftest*
3925 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003926else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003927 echo "configure: failed program was:" >&5
3928 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003929 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003930 cat >> confdefs.h <<\EOF
3931#define volatile
3932EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003933
3934fi
3935rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003936echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003937
Guido van Rossumda88dad1995-01-26 00:46:29 +00003938works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003939echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003940echo "configure:3941: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003941cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003942#line 3943 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003943#include "confdefs.h"
3944
Guido van Rossumf78abae1997-01-21 22:02:36 +00003945int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003946signed char c;
3947; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003948EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003949if { (eval echo configure:3950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003950 rm -rf conftest*
3951 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003952else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003953 echo "configure: failed program was:" >&5
3954 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003955 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003956 cat >> confdefs.h <<\EOF
3957#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003958EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003959
3960fi
3961rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003962echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003963
Guido van Rossumda88dad1995-01-26 00:46:29 +00003964have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003965echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003966echo "configure:3967: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003967cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003968#line 3969 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003969#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003970int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003971int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003972return foo(10);
3973; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003974EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003975if { (eval echo configure:3976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003976 rm -rf conftest*
3977 cat >> confdefs.h <<\EOF
3978#define HAVE_PROTOTYPES 1
3979EOF
3980 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003981else
3982 echo "configure: failed program was:" >&5
3983 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003984fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003985rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003986echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003987
Guido van Rossumda88dad1995-01-26 00:46:29 +00003988works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003989echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003990echo "configure:3991: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003992#line 3993 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003993#include "confdefs.h"
3994
3995#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003996int foo(int x, ...) {
3997 va_list va;
3998 va_start(va, x);
3999 va_arg(va, int);
4000 va_arg(va, char *);
4001 va_arg(va, double);
4002 return 0;
4003}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004004
Guido van Rossumf78abae1997-01-21 22:02:36 +00004005int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004006return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004007; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004008EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004009if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010 rm -rf conftest*
4011 cat >> confdefs.h <<\EOF
4012#define HAVE_STDARG_PROTOTYPES 1
4013EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004014 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004015else
4016 echo "configure: failed program was:" >&5
4017 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004018fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004019rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004020echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004021
Guido van Rossumda88dad1995-01-26 00:46:29 +00004022if test "$have_prototypes" = yes; then
4023bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004024echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004025echo "configure:4026: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004027#line 4028 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004028#include "confdefs.h"
4029#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004030int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031char **t;execve("@",t,t);
4032; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004033EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004034if { (eval echo configure:4035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004035 :
4036else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004037 echo "configure: failed program was:" >&5
4038 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004039 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040 cat >> confdefs.h <<\EOF
4041#define BAD_EXEC_PROTOTYPES 1
4042EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004043 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004044fi
4045rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004046echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004047fi
4048
Guido van Rossumda88dad1995-01-26 00:46:29 +00004049bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004050echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004051echo "configure:4052: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052if test "$cross_compiling" = yes; then
4053 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4054else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004055 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004056#line 4057 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004057#include "confdefs.h"
4058
4059struct s { int a; int b; };
4060static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061int foobar() {
4062 static int random;
4063 random = (int) &foo;
4064 return random;
4065}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004066static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004067main() {
4068 exit(!((int)&foo == foobar()));
4069}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004070
4071EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004072if { (eval echo configure:4073: \"$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 +00004073then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004074 :
4075else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004076 echo "configure: failed program was:" >&5
4077 cat conftest.$ac_ext >&5
4078 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004079 cat >> confdefs.h <<\EOF
4080#define BAD_STATIC_FORWARD 1
4081EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004082 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004083fi
4084rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004085fi
4086
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004087echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004088
Guido van Rossumda88dad1995-01-26 00:46:29 +00004089va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004090echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004091echo "configure:4092: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004092cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004093#line 4094 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094#include "confdefs.h"
4095
4096#ifdef HAVE_STDARG_PROTOTYPES
4097#include <stdarg.h>
4098#else
4099#include <varargs.h>
4100#endif
4101
Guido van Rossumf78abae1997-01-21 22:02:36 +00004102int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004103va_list list1, list2; list1 = list2;
4104; return 0; }
4105EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004106if { (eval echo configure:4107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004107 :
4108else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004109 echo "configure: failed program was:" >&5
4110 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004111 rm -rf conftest*
4112 cat >> confdefs.h <<\EOF
4113#define VA_LIST_IS_ARRAY 1
4114EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004115 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004116fi
4117rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004118echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004119
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004120# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4121echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004122echo "configure:4123: checking for gethostbyname_r" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004123if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
4124 echo $ac_n "(cached) $ac_c" 1>&6
4125else
4126 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004127#line 4128 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004128#include "confdefs.h"
4129/* System header to define __stub macros and hopefully few prototypes,
4130 which can conflict with char gethostbyname_r(); below. */
4131#include <assert.h>
4132/* Override any gcc2 internal prototype to avoid an error. */
4133/* We use char because int might match the return type of a gcc2
4134 builtin and then its argument prototype would still apply. */
4135char gethostbyname_r();
4136
4137int main() {
4138
4139/* The GNU C library defines this for functions which it implements
4140 to always fail with ENOSYS. Some functions are actually named
4141 something starting with __ and the normal name is an alias. */
4142#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
4143choke me
4144#else
4145gethostbyname_r();
4146#endif
4147
4148; return 0; }
4149EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004150if { (eval echo configure:4151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004151 rm -rf conftest*
4152 eval "ac_cv_func_gethostbyname_r=yes"
4153else
4154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
4156 rm -rf conftest*
4157 eval "ac_cv_func_gethostbyname_r=no"
4158fi
4159rm -f conftest*
4160fi
4161
4162if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
4163 echo "$ac_t""yes" 1>&6
4164
4165 cat >> confdefs.h <<\EOF
4166#define HAVE_GETHOSTBYNAME_R 1
4167EOF
4168
4169 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004170echo "configure:4171: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004171 OLD_CFLAGS=$CFLAGS
4172 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
4173 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004174#line 4175 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004175#include "confdefs.h"
4176
4177# include <netdb.h>
4178
4179int main() {
4180
4181 char *name;
4182 struct hostent *he, *res;
4183 char buffer[2048];
4184 int buflen = 2048;
4185 int h_errnop;
4186
4187 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
4188
4189; return 0; }
4190EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004191if { (eval echo configure:4192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004192 rm -rf conftest*
4193
4194 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004195#define HAVE_GETHOSTBYNAME_R 1
4196EOF
4197
4198 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004199#define HAVE_GETHOSTBYNAME_R_6_ARG 1
4200EOF
4201
4202 echo "$ac_t""yes" 1>&6
4203
4204else
4205 echo "configure: failed program was:" >&5
4206 cat conftest.$ac_ext >&5
4207 rm -rf conftest*
4208
4209 echo "$ac_t""no" 1>&6
4210 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004211echo "configure:4212: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004212 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004213#line 4214 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004214#include "confdefs.h"
4215
4216# include <netdb.h>
4217
4218int main() {
4219
4220 char *name;
4221 struct hostent *he;
4222 char buffer[2048];
4223 int buflen = 2048;
4224 int h_errnop;
4225
4226 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
4227
4228; return 0; }
4229EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004230if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004231 rm -rf conftest*
4232
4233 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004234#define HAVE_GETHOSTBYNAME_R 1
4235EOF
4236
4237 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004238#define HAVE_GETHOSTBYNAME_R_5_ARG 1
4239EOF
4240
4241 echo "$ac_t""yes" 1>&6
4242
4243else
4244 echo "configure: failed program was:" >&5
4245 cat conftest.$ac_ext >&5
4246 rm -rf conftest*
4247
4248 echo "$ac_t""no" 1>&6
4249 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004250echo "configure:4251: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004251 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004252#line 4253 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004253#include "confdefs.h"
4254
4255# include <netdb.h>
4256
4257int main() {
4258
4259 char *name;
4260 struct hostent *he;
4261 struct hostent_data data;
4262
4263 (void) gethostbyname_r(name, he, &data);
4264
4265; return 0; }
4266EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004267if { (eval echo configure:4268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004268 rm -rf conftest*
4269
4270 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004271#define HAVE_GETHOSTBYNAME_R 1
4272EOF
4273
4274 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004275#define HAVE_GETHOSTBYNAME_R_3_ARG 1
4276EOF
4277
4278 echo "$ac_t""yes" 1>&6
4279
4280else
4281 echo "configure: failed program was:" >&5
4282 cat conftest.$ac_ext >&5
4283 rm -rf conftest*
4284
4285 echo "$ac_t""no" 1>&6
4286
4287fi
4288rm -f conftest*
4289
4290fi
4291rm -f conftest*
4292
4293fi
4294rm -f conftest*
4295 CFLAGS=$OLD_CFLAGS
4296
4297else
4298 echo "$ac_t""no" 1>&6
4299
4300 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004301echo "configure:4302: checking for gethostbyname" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004302if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4303 echo $ac_n "(cached) $ac_c" 1>&6
4304else
4305 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004306#line 4307 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004307#include "confdefs.h"
4308/* System header to define __stub macros and hopefully few prototypes,
4309 which can conflict with char gethostbyname(); below. */
4310#include <assert.h>
4311/* Override any gcc2 internal prototype to avoid an error. */
4312/* We use char because int might match the return type of a gcc2
4313 builtin and then its argument prototype would still apply. */
4314char gethostbyname();
4315
4316int main() {
4317
4318/* The GNU C library defines this for functions which it implements
4319 to always fail with ENOSYS. Some functions are actually named
4320 something starting with __ and the normal name is an alias. */
4321#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4322choke me
4323#else
4324gethostbyname();
4325#endif
4326
4327; return 0; }
4328EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004329if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004330 rm -rf conftest*
4331 eval "ac_cv_func_gethostbyname=yes"
4332else
4333 echo "configure: failed program was:" >&5
4334 cat conftest.$ac_ext >&5
4335 rm -rf conftest*
4336 eval "ac_cv_func_gethostbyname=no"
4337fi
4338rm -f conftest*
4339fi
4340
4341if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4342 echo "$ac_t""yes" 1>&6
4343 cat >> confdefs.h <<\EOF
4344#define HAVE_GETHOSTBYNAME 1
4345EOF
4346
4347else
4348 echo "$ac_t""no" 1>&6
4349fi
4350
4351
4352fi
4353
4354
4355
4356
4357
4358
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004359
Guido van Rossum627b2d71993-12-24 10:39:16 +00004360# checks for system services
4361# (none yet)
4362
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004363# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00004364echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004365echo "configure:4366: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004366ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004367if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004368 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369else
4370 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004371LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004372cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004373#line 4374 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004374#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004375/* Override any gcc2 internal prototype to avoid an error. */
4376/* We use char because int might match the return type of a gcc2
4377 builtin and then its argument prototype would still apply. */
4378char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004379
Guido van Rossumf78abae1997-01-21 22:02:36 +00004380int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381__fpu_control()
4382; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004383EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004384if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004385 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004386 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004387else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004388 echo "configure: failed program was:" >&5
4389 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004390 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004391 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004392fi
4393rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004396fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004397if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004398 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004399 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4400 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401 cat >> confdefs.h <<EOF
4402#define $ac_tr_lib 1
4403EOF
4404
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004405 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406
4407else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004408 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004409fi
4410
4411
Guido van Rossum7f253911997-05-09 02:42:48 +00004412# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00004413echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004414echo "configure:4415: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00004415# Check whether --with-fpectl or --without-fpectl was given.
4416if test "${with_fpectl+set}" = set; then
4417 withval="$with_fpectl"
4418
4419if test "$withval" != no
4420then cat >> confdefs.h <<\EOF
4421#define WANT_SIGFPE_HANDLER 1
4422EOF
4423 echo "$ac_t""yes" 1>&6
4424else echo "$ac_t""no" 1>&6
4425fi
4426fi
4427
4428
Guido van Rossum7f43da71994-08-01 12:15:30 +00004429# check for --with-libm=...
4430
Guido van Rossum563e7081996-09-10 18:20:48 +00004431case $ac_sys_system in
4432next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004433BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00004434*) LIBM=-lm
4435esac
Guido van Rossum7f253911997-05-09 02:42:48 +00004436echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004437echo "configure:4438: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004438# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004439if test "${with_libm+set}" = set; then
4440 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004441
Guido van Rossum7f253911997-05-09 02:42:48 +00004442if test "$withval" = no
4443then LIBM=
4444 echo "$ac_t""force LIBM empty" 1>&6
4445elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004446then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004447 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004448else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004449fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004450else
4451 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004452fi
4453
4454
4455# check for --with-libc=...
4456
Guido van Rossum7f253911997-05-09 02:42:48 +00004457echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004458echo "configure:4459: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004459# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004460if test "${with_libc+set}" = set; then
4461 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004462
Guido van Rossum7f253911997-05-09 02:42:48 +00004463if test "$withval" = no
4464then LIBC=
4465 echo "$ac_t""force LIBC empty" 1>&6
4466elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004467then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004468 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004469else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004470fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004471else
4472 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004473fi
4474
4475
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004476# check for hypot() in math library
4477LIBS_SAVE=$LIBS
4478LIBS="$LIBS $LIBM"
4479for ac_func in hypot
4480do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004481echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004482echo "configure:4483: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004483if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4484 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004485else
4486 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004487#line 4488 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004488#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004489/* System header to define __stub macros and hopefully few prototypes,
4490 which can conflict with char $ac_func(); below. */
4491#include <assert.h>
4492/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004493/* We use char because int might match the return type of a gcc2
4494 builtin and then its argument prototype would still apply. */
4495char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004496
Guido van Rossumf78abae1997-01-21 22:02:36 +00004497int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004498
4499/* The GNU C library defines this for functions which it implements
4500 to always fail with ENOSYS. Some functions are actually named
4501 something starting with __ and the normal name is an alias. */
4502#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4503choke me
4504#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004505$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004506#endif
4507
4508; return 0; }
4509EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004510if { (eval echo configure:4511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004511 rm -rf conftest*
4512 eval "ac_cv_func_$ac_func=yes"
4513else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004514 echo "configure: failed program was:" >&5
4515 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004516 rm -rf conftest*
4517 eval "ac_cv_func_$ac_func=no"
4518fi
4519rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004520fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004521
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004522if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004523 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004524 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004525 cat >> confdefs.h <<EOF
4526#define $ac_tr_func 1
4527EOF
4528
4529else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004530 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004531fi
4532done
4533
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004534for ac_func in hypot
4535do
4536echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004537echo "configure:4538: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004538if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4539 echo $ac_n "(cached) $ac_c" 1>&6
4540else
4541 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004542#line 4543 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004543#include "confdefs.h"
4544/* System header to define __stub macros and hopefully few prototypes,
4545 which can conflict with char $ac_func(); below. */
4546#include <assert.h>
4547/* Override any gcc2 internal prototype to avoid an error. */
4548/* We use char because int might match the return type of a gcc2
4549 builtin and then its argument prototype would still apply. */
4550char $ac_func();
4551
Guido van Rossumf78abae1997-01-21 22:02:36 +00004552int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004553
4554/* The GNU C library defines this for functions which it implements
4555 to always fail with ENOSYS. Some functions are actually named
4556 something starting with __ and the normal name is an alias. */
4557#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4558choke me
4559#else
4560$ac_func();
4561#endif
4562
4563; return 0; }
4564EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004565if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004566 rm -rf conftest*
4567 eval "ac_cv_func_$ac_func=yes"
4568else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004569 echo "configure: failed program was:" >&5
4570 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004571 rm -rf conftest*
4572 eval "ac_cv_func_$ac_func=no"
4573fi
4574rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004575fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004576
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004577if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4578 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004579 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4580 cat >> confdefs.h <<EOF
4581#define $ac_tr_func 1
4582EOF
4583
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004584else
4585 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004586LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004587fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004588done
4589
Guido van Rossumf78abae1997-01-21 22:02:36 +00004590
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004591LIBS=$LIBS_SAVE
4592
Guido van Rossumda88dad1995-01-26 00:46:29 +00004593# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004594echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004595echo "configure:4596: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004596if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
4597 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004598else
4599 if test "$cross_compiling" = yes; then
4600 ac_cv_func_getopt=no
4601else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004602 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004603#line 4604 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004604#include "confdefs.h"
4605#include <stdio.h>
4606extern int optind, opterr, getopt();
4607extern char* optarg;
4608int main() {
4609 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
4610 opterr = 0;
4611 if (getopt(3, av, "f:") == 'f') { exit(1); }
4612 exit(0);
4613}
4614EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004615if { (eval echo configure:4616: \"$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 +00004616then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004617 ac_cv_func_getopt=yes
4618else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004619 echo "configure: failed program was:" >&5
4620 cat conftest.$ac_ext >&5
4621 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00004622 ac_cv_func_getopt=no
4623fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004624rm -fr conftest*
4625fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004626
4627fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004628echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004629test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
4630
Guido van Rossumad713701997-07-10 22:42:38 +00004631# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00004632echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004633echo "configure:4634: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00004634if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
4635 echo $ac_n "(cached) $ac_c" 1>&6
4636else
4637 if test "$cross_compiling" = yes; then
4638 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4639else
4640 cat > conftest.$ac_ext <<EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004641#line 4642 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00004642#include "confdefs.h"
4643#include <stdio.h>
4644#ifdef HAVE_STDLIB
4645#include <stdlib.h>
4646#else
4647char *malloc(), *realloc();
4648int *free();
4649#endif
4650main() {
4651 char *p;
4652 p = malloc(0);
4653 if (p == NULL) exit(1);
4654 p = realloc(p, 0);
4655 if (p == NULL) exit(1);
4656 free(p);
4657 exit(0);
4658}
4659EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00004660if { (eval echo configure:4661: \"$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 +00004661then
4662 ac_cv_malloc_zero=nonnull
4663else
4664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4666 rm -fr conftest*
4667 ac_cv_malloc_zero=null
4668fi
4669rm -fr conftest*
4670fi
4671
4672fi
4673
4674echo "$ac_t""$ac_cv_malloc_zero" 1>&6
4675if test "$ac_cv_malloc_zero" = null
4676then
4677 cat >> confdefs.h <<\EOF
4678#define MALLOC_ZERO_RETURNS_NULL 1
4679EOF
4680
4681fi
4682
Guido van Rossum627b2d71993-12-24 10:39:16 +00004683# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004684trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004685cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004686# This file is a shell script that caches the results of configure
4687# tests run on this system so they can be shared between configure
4688# scripts and configure runs. It is not useful on other systems.
4689# If it contains results you don't want to keep, you may remove or edit it.
4690#
4691# By default, configure uses ./config.cache as the cache file,
4692# creating it if it does not exist already. You can give configure
4693# the --cache-file=FILE option to use a different cache file; that is
4694# what configure does when it calls configure scripts in
4695# subdirectories, so they share the cache.
4696# Giving --cache-file=/dev/null disables caching, for debugging configure.
4697# config.status only pays attention to the cache file if you give it the
4698# --recheck option to rerun configure.
4699#
4700EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004701# The following way of writing the cache mishandles newlines in values,
4702# but we know of no workaround that is simple, portable, and efficient.
4703# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004704# Ultrix sh set writes to stderr and can't be redirected directly,
4705# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004706(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004707 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004708 *ac_space=\ *)
4709 # `set' does not quote correctly, so add quotes (double-quote substitution
4710 # turns \\\\ into \\, and sed turns \\ into \).
4711 sed -n \
4712 -e "s/'/'\\\\''/g" \
4713 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4714 ;;
4715 *)
4716 # `set' quotes correctly as required by POSIX, so do not add quotes.
4717 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4718 ;;
4719 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004720if cmp -s $cache_file confcache; then
4721 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004722else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004723 if test -w $cache_file; then
4724 echo "updating cache $cache_file"
4725 cat confcache > $cache_file
4726 else
4727 echo "not updating unwritable cache $cache_file"
4728 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004730rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00004731
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004732trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004733
4734test "x$prefix" = xNONE && prefix=$ac_default_prefix
4735# Let make expand exec_prefix.
4736test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00004737
Guido van Rossum7f43da71994-08-01 12:15:30 +00004738# Any assignment to VPATH causes Sun make to only execute
4739# the first set of double-colon rules, so remove it if not needed.
4740# If there is a colon in the path, we need to keep it.
4741if test "x$srcdir" = x.; then
4742 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4743fi
4744
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004745trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00004746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004747DEFS=-DHAVE_CONFIG_H
4748
4749# Without the "./", some shells look in PATH for config.status.
4750: ${CONFIG_STATUS=./config.status}
4751
4752echo creating $CONFIG_STATUS
4753rm -f $CONFIG_STATUS
4754cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004755#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00004756# Generated automatically by configure.
4757# Run this file to recreate the current configuration.
4758# This directory was configured as follows,
4759# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4760#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004761# $0 $ac_configure_args
4762#
4763# Compiler output produced by configure, useful for debugging
4764# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00004765
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004766ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004767for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00004768do
Guido van Rossum7f43da71994-08-01 12:15:30 +00004769 case "\$ac_option" in
4770 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004771 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4772 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00004773 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004774 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004775 exit 0 ;;
4776 -help | --help | --hel | --he | --h)
4777 echo "\$ac_cs_usage"; exit 0 ;;
4778 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004779 esac
4780done
4781
Guido van Rossum7f43da71994-08-01 12:15:30 +00004782ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00004783
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004784trap 'rm -fr `echo "Makefile \
4785 Objects/Makefile \
4786 Parser/Makefile \
4787 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004788 Modules/Makefile.pre \
4789 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004790EOF
4791cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004792
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004793# Protect against being on the right side of a sed subst in config.status.
4794sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4795 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004796$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00004797$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004798s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004799s%@CFLAGS@%$CFLAGS%g
4800s%@CPPFLAGS@%$CPPFLAGS%g
4801s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004802s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004803s%@DEFS@%$DEFS%g
4804s%@LDFLAGS@%$LDFLAGS%g
4805s%@LIBS@%$LIBS%g
4806s%@exec_prefix@%$exec_prefix%g
4807s%@prefix@%$prefix%g
4808s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004809s%@bindir@%$bindir%g
4810s%@sbindir@%$sbindir%g
4811s%@libexecdir@%$libexecdir%g
4812s%@datadir@%$datadir%g
4813s%@sysconfdir@%$sysconfdir%g
4814s%@sharedstatedir@%$sharedstatedir%g
4815s%@localstatedir@%$localstatedir%g
4816s%@libdir@%$libdir%g
4817s%@includedir@%$includedir%g
4818s%@oldincludedir@%$oldincludedir%g
4819s%@infodir@%$infodir%g
4820s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00004821s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004822s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00004823s%@SGI_ABI@%$SGI_ABI%g
4824s%@SET_CCC@%$SET_CCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004825s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004826s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
4827s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004828s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004829s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004830s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004831s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00004832s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4833s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004834s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004835s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004836s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004837s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00004838s%@SO@%$SO%g
4839s%@LDSHARED@%$LDSHARED%g
4840s%@CCSHARED@%$CCSHARED%g
4841s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00004842s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00004843s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004844s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004845s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004846s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
4847s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
4848s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004849s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004850s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004851s%@LIBM@%$LIBM%g
4852s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004853
4854CEOF
4855EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004856
4857cat >> $CONFIG_STATUS <<\EOF
4858
4859# Split the substitutions into bite-sized pieces for seds with
4860# small command number limits, like on Digital OSF/1 and HP-UX.
4861ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4862ac_file=1 # Number of current file.
4863ac_beg=1 # First line for current file.
4864ac_end=$ac_max_sed_cmds # Line after last line for current file.
4865ac_more_lines=:
4866ac_sed_cmds=""
4867while $ac_more_lines; do
4868 if test $ac_beg -gt 1; then
4869 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4870 else
4871 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4872 fi
4873 if test ! -s conftest.s$ac_file; then
4874 ac_more_lines=false
4875 rm -f conftest.s$ac_file
4876 else
4877 if test -z "$ac_sed_cmds"; then
4878 ac_sed_cmds="sed -f conftest.s$ac_file"
4879 else
4880 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4881 fi
4882 ac_file=`expr $ac_file + 1`
4883 ac_beg=$ac_end
4884 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4885 fi
4886done
4887if test -z "$ac_sed_cmds"; then
4888 ac_sed_cmds=cat
4889fi
4890EOF
4891
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892cat >> $CONFIG_STATUS <<EOF
4893
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004894CONFIG_FILES=\${CONFIG_FILES-"Makefile \
4895 Objects/Makefile \
4896 Parser/Makefile \
4897 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004898 Modules/Makefile.pre \
4899 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004900EOF
4901cat >> $CONFIG_STATUS <<\EOF
4902for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004903 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004904 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004905 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004906 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4907 *) ac_file_in="${ac_file}.in" ;;
4908 esac
4909
Guido van Rossumf78abae1997-01-21 22:02:36 +00004910 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004911
4912 # Remove last slash and all that follows it. Not all systems have dirname.
4913 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4914 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4915 # The file is in a subdirectory.
4916 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004917 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004918 # A "../" for each directory in $ac_dir_suffix.
4919 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4920 else
4921 ac_dir_suffix= ac_dots=
4922 fi
4923
4924 case "$ac_given_srcdir" in
4925 .) srcdir=.
4926 if test -z "$ac_dots"; then top_srcdir=.
4927 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4928 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4929 *) # Relative path.
4930 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4931 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4932 esac
4933
Guido van Rossumf78abae1997-01-21 22:02:36 +00004934
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935 echo creating "$ac_file"
4936 rm -f "$ac_file"
4937 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4938 case "$ac_file" in
4939 *Makefile*) ac_comsub="1i\\
4940# $configure_input" ;;
4941 *) ac_comsub= ;;
4942 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00004943
4944 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 +00004945 sed -e "$ac_comsub
4946s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004947s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004948s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00004949" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00004950fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00004951rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004952
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4954# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004955#
4956# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004957ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4958ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004959ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004961# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004962ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4963ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004964ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004966# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004967ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4968ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004969ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004970ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004971
Guido van Rossumf78abae1997-01-21 22:02:36 +00004972if test "${CONFIG_HEADERS+set}" != set; then
4973EOF
4974cat >> $CONFIG_STATUS <<EOF
4975 CONFIG_HEADERS="config.h"
4976EOF
4977cat >> $CONFIG_STATUS <<\EOF
4978fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004979for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004980 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004981 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004982 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004983 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4984 *) ac_file_in="${ac_file}.in" ;;
4985 esac
4986
Guido van Rossum7f43da71994-08-01 12:15:30 +00004987 echo creating $ac_file
4988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004989 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00004990 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4991 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004992
4993EOF
4994
4995# Transform confdefs.h into a sed script conftest.vals that substitutes
4996# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004997# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004998# Protect against being in an unquoted here document in config.status.
4999rm -f conftest.vals
5000cat > conftest.hdr <<\EOF
5001s/[\\&%]/\\&/g
5002s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005003s%#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 +00005004s%ac_d%ac_u%gp
5005s%ac_u%ac_e%gp
5006EOF
5007sed -n -f conftest.hdr confdefs.h > conftest.vals
5008rm -f conftest.hdr
5009
5010# This sed command replaces #undef with comments. This is necessary, for
5011# example, in the case of _POSIX_SOURCE, which is predefined and required
5012# on some systems where configure will not decide to define it.
5013cat >> conftest.vals <<\EOF
5014s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5015EOF
5016
5017# Break up conftest.vals because some shells have a limit on
5018# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005019
5020rm -f conftest.tail
5021while :
5022do
5023 ac_lines=`grep -c . conftest.vals`
5024 # grep -c gives empty output for an empty file on some AIX systems.
5025 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5026 # Write a limited-size here document to conftest.frag.
5027 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5028 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5029 echo 'CEOF
5030 sed -f conftest.frag conftest.in > conftest.out
5031 rm -f conftest.in
5032 mv conftest.out conftest.in
5033' >> $CONFIG_STATUS
5034 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5035 rm -f conftest.vals
5036 mv conftest.tail conftest.vals
5037done
5038rm -f conftest.vals
5039
5040cat >> $CONFIG_STATUS <<\EOF
5041 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00005042 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005043 cat conftest.in >> conftest.h
5044 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00005045 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005046 echo "$ac_file is unchanged"
5047 rm -f conftest.h
5048 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005049 # Remove last slash and all that follows it. Not all systems have dirname.
5050 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5051 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5052 # The file is in a subdirectory.
5053 test ! -d "$ac_dir" && mkdir "$ac_dir"
5054 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005055 rm -f $ac_file
5056 mv conftest.h $ac_file
5057 fi
5058fi; done
5059
Guido van Rossumf78abae1997-01-21 22:02:36 +00005060EOF
5061cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005062
Guido van Rossumf78abae1997-01-21 22:02:36 +00005063EOF
5064cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005065
5066exit 0
5067EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005068chmod +x $CONFIG_STATUS
5069rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005070test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005071