blob: f11f825a6e3bfec504d6eb69315cb50b57b1e10e [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 Rossum79e8f1b1999-02-23 18:07:51 +00003# From configure.in Revision: 1.97
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)
693 CC="mwcc -I$PWD/BeOS"
694 without_gcc=yes
695 OPT="-DUSE_DL_EXPORT -O7 -opt schedule604"
696 CCSHARED=-UUSE_DL_EXPORT
697 LDFLAGS="$LDFLAGS -nodup"
698
699 AR="$PWD/BeOS/ar-fake"
700 RANLIB=:
701
702 cat >> confdefs.h <<\EOF
703#define DL_EXPORT_HEADER "dl_export.h"
704EOF
705
706 ;;
707 x86)
708 CC="gcc -I$PWD/BeOS"
709 without_gcc=no
710 OPT="-DUSE_DL_EXPORT -O3 -mpentiumpro"
711 CCSHARED=-UUSE_DL_EXPORT
712
713 AR="$PWD/BeOS/ar-fake"
714 RANLIB=:
715
716 cat >> confdefs.h <<\EOF
717#define DL_EXPORT_HEADER "dl_export.h"
718EOF
719
720 ;;
721 *)
722 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
723 ;;
724 esac
725 ;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000726 *) without_gcc=no;;
727 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728fi
729
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000730echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000731
Guido van Rossum8b131c51995-03-09 14:10:13 +0000732# If the user switches compilers, we can't believe the cache
733if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
734then
735 { echo "configure: error: cached CC is different -- throw away $cache_file
736(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
737fi
738
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000739# Extract the first word of "gcc", so it can be a program name with args.
740set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000741echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000742echo "configure:743: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000743if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
744 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000745else
746 if test -n "$CC"; then
747 ac_cv_prog_CC="$CC" # Let the user override the test.
748else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000749 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
750 ac_dummy="$PATH"
751 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752 test -z "$ac_dir" && ac_dir=.
753 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000754 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000755 break
756 fi
757 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000758 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000759fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760fi
761CC="$ac_cv_prog_CC"
762if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000763 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000765 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000768if test -z "$CC"; then
769 # Extract the first word of "cc", so it can be a program name with args.
770set dummy cc; ac_word=$2
771echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000772echo "configure:773: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000773if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
775else
776 if test -n "$CC"; then
777 ac_cv_prog_CC="$CC" # Let the user override the test.
778else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000779 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000781 ac_dummy="$PATH"
782 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783 test -z "$ac_dir" && ac_dir=.
784 if test -f $ac_dir/$ac_word; then
785 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
786 ac_prog_rejected=yes
787 continue
788 fi
789 ac_cv_prog_CC="cc"
790 break
791 fi
792 done
793 IFS="$ac_save_ifs"
794if test $ac_prog_rejected = yes; then
795 # We found a bogon in the path, so make sure we never use it.
796 set dummy $ac_cv_prog_CC
797 shift
798 if test $# -gt 0; then
799 # We chose a different compiler from the bogus one.
800 # However, it has the same basename, so the bogon will be chosen
801 # first if we set CC to just the basename; use the full file name.
802 shift
803 set dummy "$ac_dir/$ac_word" "$@"
804 shift
805 ac_cv_prog_CC="$@"
806 fi
807fi
808fi
809fi
810CC="$ac_cv_prog_CC"
811if test -n "$CC"; then
812 echo "$ac_t""$CC" 1>&6
813else
814 echo "$ac_t""no" 1>&6
815fi
816
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000817 if test -z "$CC"; then
818 case "`uname -s`" in
819 *win32* | *WIN32*)
820 # Extract the first word of "cl", so it can be a program name with args.
821set dummy cl; ac_word=$2
822echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000823echo "configure:824: checking for $ac_word" >&5
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000824if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
825 echo $ac_n "(cached) $ac_c" 1>&6
826else
827 if test -n "$CC"; then
828 ac_cv_prog_CC="$CC" # Let the user override the test.
829else
830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
831 ac_dummy="$PATH"
832 for ac_dir in $ac_dummy; do
833 test -z "$ac_dir" && ac_dir=.
834 if test -f $ac_dir/$ac_word; then
835 ac_cv_prog_CC="cl"
836 break
837 fi
838 done
839 IFS="$ac_save_ifs"
840fi
841fi
842CC="$ac_cv_prog_CC"
843if test -n "$CC"; then
844 echo "$ac_t""$CC" 1>&6
845else
846 echo "$ac_t""no" 1>&6
847fi
848 ;;
849 esac
850 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
852fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853
Guido van Rossumf78abae1997-01-21 22:02:36 +0000854echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000855echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000856
857ac_ext=c
858# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
859ac_cpp='$CPP $CPPFLAGS'
860ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000861ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000862cross_compiling=$ac_cv_prog_cc_cross
863
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000864cat > conftest.$ac_ext << EOF
865
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000866#line 867 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000867#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000868
Guido van Rossumf78abae1997-01-21 22:02:36 +0000869main(){return(0);}
870EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000871if { (eval echo configure:872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000872 ac_cv_prog_cc_works=yes
873 # If we can't run a trivial program, we are probably using a cross compiler.
874 if (./conftest; exit) 2>/dev/null; then
875 ac_cv_prog_cc_cross=no
876 else
877 ac_cv_prog_cc_cross=yes
878 fi
879else
880 echo "configure: failed program was:" >&5
881 cat conftest.$ac_ext >&5
882 ac_cv_prog_cc_works=no
883fi
884rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000885ac_ext=c
886# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
887ac_cpp='$CPP $CPPFLAGS'
888ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
889ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
890cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000891
892echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
893if test $ac_cv_prog_cc_works = no; then
894 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
895fi
896echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000897echo "configure:898: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000898echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
899cross_compiling=$ac_cv_prog_cc_cross
900
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000901echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000902echo "configure:903: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000903if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
904 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905else
906 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909#endif
910EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000911if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912 ac_cv_prog_gcc=yes
913else
914 ac_cv_prog_gcc=no
915fi
916fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000918echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000919
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920if test $ac_cv_prog_gcc = yes; then
921 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000922else
923 GCC=
924fi
925
926ac_test_CFLAGS="${CFLAGS+set}"
927ac_save_CFLAGS="$CFLAGS"
928CFLAGS=
929echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000930echo "configure:931: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000931if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000932 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933else
934 echo 'void f(){}' > conftest.c
935if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000936 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000938 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000939fi
940rm -f conftest*
941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
Guido van Rossumf78abae1997-01-21 22:02:36 +0000944echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000945if test "$ac_test_CFLAGS" = set; then
946 CFLAGS="$ac_save_CFLAGS"
947elif test $ac_cv_prog_cc_g = yes; then
948 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000949 CFLAGS="-g -O2"
950 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000951 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 fi
953else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000954 if test "$GCC" = yes; then
955 CFLAGS="-O2"
956 else
957 CFLAGS=
958 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959fi
960
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000961
Guido van Rossumdd997f71998-10-07 19:58:26 +0000962case $MACHDEP in
963bsdos*)
964 case $CC in
965 gcc) CC="$CC -D_HAVE_BSDI";;
966 esac;;
967esac
968
Guido van Rossum24b1e751997-08-21 02:29:16 +0000969case $ac_sys_system in
970hp*|HP*)
971 case $CC in
972 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
973 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000974BeOS*)
975 case $CC in
976 cc) CC=cc;;
977 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +0000978esac
979
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000980# LDLIBRARY is the name of the library to link against (as opposed to the
981# name of the library into which to insert object files). On systems
982# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
983# the Makefiles).
984
985
986LDLIBRARY=''
987
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000988# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000989# This is altered for AIX and BeOS in order to build the export list before
990# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000991
992echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000993echo "configure:994: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000994if test -z "$LINKCC"
995then
996 case $ac_sys_system in
997 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +0000998 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000999 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001000 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001001 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001002 dgux*)
1003 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001004 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001005 esac
1006fi
1007echo "$ac_t""$LINKCC" 1>&6
1008
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001009echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
1010echo "configure:1011: checking LDLIBRARY" >&5
1011
1012# NeXT framework builds require that the 'ar' library be converted into
1013# a bundle using libtool.
1014if test "$with_next_framework"
1015then
1016 LDLIBRARY='libpython$(VERSION).dylib'
1017fi
1018
1019# DG/UX requires some fancy ld contortions to produce a .so from an .a
1020if test "$MACHDEP" = "dguxR4"
1021then
1022 LDLIBRARY='libpython$(VERSION).so'
1023 OPT="$OPT -pic"
1024fi
1025echo "$ac_t""$LDLIBRARY" 1>&6
1026
1027# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1028if test -z "$LDLIBRARY"
1029then
1030 LDLIBRARY='libpython$(VERSION).a'
1031 MAKE_LDLIBRARY="true"
1032else
1033 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1034fi
1035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036# Extract the first word of "ranlib", so it can be a program name with args.
1037set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001038echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001039echo "configure:1040: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001040if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1041 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042else
1043 if test -n "$RANLIB"; then
1044 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1045else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001046 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1047 ac_dummy="$PATH"
1048 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 test -z "$ac_dir" && ac_dir=.
1050 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001051 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001052 break
1053 fi
1054 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001056 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001057fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001058fi
1059RANLIB="$ac_cv_prog_RANLIB"
1060if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001061 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001063 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001065
1066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067for ac_prog in ar aal
1068do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069# Extract the first word of "$ac_prog", so it can be a program name with args.
1070set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001071echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001072echo "configure:1073: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001073if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075else
1076 if test -n "$AR"; then
1077 ac_cv_prog_AR="$AR" # Let the user override the test.
1078else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001079 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1080 ac_dummy="$PATH"
1081 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 test -z "$ac_dir" && ac_dir=.
1083 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 break
1086 fi
1087 done
1088 IFS="$ac_save_ifs"
1089fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090fi
1091AR="$ac_cv_prog_AR"
1092if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001093 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001094else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001095 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001096fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098test -n "$AR" && break
1099done
1100test -n "$AR" || AR="ar"
1101
1102
Guido van Rossumda88dad1995-01-26 00:46:29 +00001103
1104
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001105# Install just never works :-(
1106if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001107then
1108 INSTALL=cp
1109 INSTALL_PROGRAM=cp
1110 INSTALL_DATA=cp
1111else
1112 INSTALL_PROGRAM="$INSTALL"
1113 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001114fi
1115
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001116# Not every filesystem supports hard links
1117
1118if test -z "$LN" ; then
1119 case $ac_sys_system in
1120 BeOS*) LN="ln -s";;
1121 *) LN=ln;;
1122 esac
1123fi
1124
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001125# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001126
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001127if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001128then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001129 case $GCC in
1130 yes)
1131 case $ac_cv_prog_cc_g in
1132 yes) OPT="-g -O2";;
1133 *) OPT="-O2";;
1134 esac
1135 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001136 *) OPT="-O";;
1137 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001138fi
1139
Guido van Rossum563e7081996-09-10 18:20:48 +00001140if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001141then
1142 OPT="$OPT $ac_arch_flags"
1143fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001144# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001145echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001146echo "configure:1147: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001147# On Suns, sometimes $CPP names a directory.
1148if test -n "$CPP" && test -d "$CPP"; then
1149 CPP=
1150fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001151if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001152if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1153 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001154else
1155 # This must be in double quotes, not single quotes, because CPP may get
1156 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001157 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 # On the NeXT, cc -E runs the code through the compiler's parser,
1159 # not just through cpp.
1160 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001161#line 1162 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001162#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001164Syntax Error
1165EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001167{ (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001168ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169if test -z "$ac_err"; then
1170 :
1171else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001173 echo "configure: failed program was:" >&5
1174 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 rm -rf conftest*
1176 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001178#line 1179 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181Syntax Error
1182EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001184{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001185ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1186if test -z "$ac_err"; then
1187 :
1188else
1189 echo "$ac_err" >&5
1190 echo "configure: failed program was:" >&5
1191 cat conftest.$ac_ext >&5
1192 rm -rf conftest*
1193 CPP="${CC-cc} -nologo -E"
1194 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001195#line 1196 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001196#include "confdefs.h"
1197#include <assert.h>
1198Syntax Error
1199EOF
1200ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001201{ (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001202ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001204 :
1205else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001207 echo "configure: failed program was:" >&5
1208 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001209 rm -rf conftest*
1210 CPP=/lib/cpp
1211fi
1212rm -f conftest*
1213fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001215fi
1216rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001219 CPP="$ac_cv_prog_CPP"
1220else
1221 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001223echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001225echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001226echo "configure:1227: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001228#line 1229 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001229#include "confdefs.h"
1230#ifdef _AIX
1231 yes
1232#endif
1233
1234EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1236 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001237 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001238 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239#define _ALL_SOURCE 1
1240EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242else
1243 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001244 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245fi
1246rm -f conftest*
1247
1248
Guido van Rossumf78abae1997-01-21 22:02:36 +00001249ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001250echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001251echo "configure:1252: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001252if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1253 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001254else
1255 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001256#line 1257 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257#include "confdefs.h"
1258#include <minix/config.h>
1259EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001261{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001262ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001265 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001268 echo "configure: failed program was:" >&5
1269 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270 rm -rf conftest*
1271 eval "ac_cv_header_$ac_safe=no"
1272fi
1273rm -f conftest*
1274fi
1275if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001276 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001277 MINIX=yes
1278else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001279 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281fi
1282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283if test "$MINIX" = yes; then
1284 cat >> confdefs.h <<\EOF
1285#define _POSIX_SOURCE 1
1286EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288 cat >> confdefs.h <<\EOF
1289#define _POSIX_1_SOURCE 2
1290EOF
1291
1292 cat >> confdefs.h <<\EOF
1293#define _MINIX 1
1294EOF
1295
1296fi
1297
Guido van Rossumda88dad1995-01-26 00:46:29 +00001298
Guido van Rossum91922671997-10-09 20:24:13 +00001299echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001300echo "configure:1301: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum91922671997-10-09 20:24:13 +00001301if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1302 echo $ac_n "(cached) $ac_c" 1>&6
1303else
1304 ac_save_cc="$CC"
1305CC="$CC -OPT:Olimit=0"
1306if test "$cross_compiling" = yes; then
1307 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1308else
1309 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001310#line 1311 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001311#include "confdefs.h"
1312int main() { return 0; }
1313EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001314if { (eval echo configure:1315: \"$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 +00001315then
1316 ac_cv_opt_olimit_ok=yes
1317else
1318 echo "configure: failed program was:" >&5
1319 cat conftest.$ac_ext >&5
1320 rm -fr conftest*
1321 ac_cv_opt_olimit_ok=no
1322fi
1323rm -fr conftest*
1324fi
1325
1326CC="$ac_save_cc"
1327fi
1328
1329echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001330if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001331 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001332else
1333 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001334echo "configure:1335: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001335 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1337else
1338 ac_save_cc="$CC"
1339 CC="$CC -Olimit 1500"
1340 if test "$cross_compiling" = yes; then
1341 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1342else
1343 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001344#line 1345 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001345#include "confdefs.h"
1346int main() { return 0; }
1347EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001348if { (eval echo configure:1349: \"$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 +00001349then
1350 ac_cv_olimit_ok=yes
1351else
1352 echo "configure: failed program was:" >&5
1353 cat conftest.$ac_ext >&5
1354 rm -fr conftest*
1355 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001356fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001357rm -fr conftest*
1358fi
1359
1360 CC="$ac_save_cc"
1361fi
1362
1363 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1364 if test $ac_cv_olimit_ok = yes; then
1365 OPT="$OPT -Olimit 1500"
1366 fi
1367fi
1368
Guido van Rossum84e7b241996-08-19 21:59:00 +00001369# check for ANSI or K&R ("traditional") preprocessor
1370echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001371echo "configure:1372: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001372cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001373#line 1374 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001374#include "confdefs.h"
1375
1376#define spam(name, doc) {#name, &name, #name "() -- " doc}
1377int foo;
1378struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1379
Guido van Rossumf78abae1997-01-21 22:02:36 +00001380int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001381;
1382; return 0; }
1383EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001384if { (eval echo configure:1385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001385 rm -rf conftest*
1386 cpp_type=ansi
1387else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001390 rm -rf conftest*
1391 cat >> confdefs.h <<\EOF
1392#define HAVE_OLD_CPP 1
1393EOF
1394 cpp_type=traditional
1395fi
1396rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001397echo "$ac_t""$cpp_type" 1>&6
1398
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001399# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001400echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001401echo "configure:1402: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001402if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1403 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001404else
1405 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001406#line 1407 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001407#include "confdefs.h"
1408#include <stdlib.h>
1409#include <stdarg.h>
1410#include <string.h>
1411#include <float.h>
1412EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001413ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001414{ (eval echo configure:1415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001415ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001416if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001417 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001418 ac_cv_header_stdc=yes
1419else
1420 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001421 echo "configure: failed program was:" >&5
1422 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001423 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001424 ac_cv_header_stdc=no
1425fi
1426rm -f conftest*
1427
1428if test $ac_cv_header_stdc = yes; then
1429 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1430cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001431#line 1432 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001432#include "confdefs.h"
1433#include <string.h>
1434EOF
1435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1436 egrep "memchr" >/dev/null 2>&1; then
1437 :
1438else
1439 rm -rf conftest*
1440 ac_cv_header_stdc=no
1441fi
1442rm -f conftest*
1443
1444fi
1445
1446if test $ac_cv_header_stdc = yes; then
1447 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1448cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001449#line 1450 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450#include "confdefs.h"
1451#include <stdlib.h>
1452EOF
1453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1454 egrep "free" >/dev/null 2>&1; then
1455 :
1456else
1457 rm -rf conftest*
1458 ac_cv_header_stdc=no
1459fi
1460rm -f conftest*
1461
1462fi
1463
1464if test $ac_cv_header_stdc = yes; then
1465 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1466if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001467 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001468else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001469 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001470#line 1471 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001471#include "confdefs.h"
1472#include <ctype.h>
1473#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1474#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001475#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001476int main () { int i; for (i = 0; i < 256; i++)
1477if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1478exit (0); }
1479
1480EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001481if { (eval echo configure:1482: \"$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 +00001482then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001483 :
1484else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001485 echo "configure: failed program was:" >&5
1486 cat conftest.$ac_ext >&5
1487 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001489fi
1490rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001492
1493fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001494fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001495
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001496echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497if test $ac_cv_header_stdc = yes; then
1498 cat >> confdefs.h <<\EOF
1499#define STDC_HEADERS 1
1500EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001501
1502fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001503
Guido van Rossum96013151997-10-08 22:47:52 +00001504for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001505signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001506sys/audioio.h sys/file.h sys/lock.h \
1507sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001508sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001509do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001510ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001511echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001512echo "configure:1513: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001513if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001515else
1516 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001517#line 1518 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001518#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001519#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001520EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001521ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001522{ (eval echo configure:1523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001523ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001524if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001525 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001526 eval "ac_cv_header_$ac_safe=yes"
1527else
1528 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001529 echo "configure: failed program was:" >&5
1530 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531 rm -rf conftest*
1532 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001533fi
1534rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001535fi
1536if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001537 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001538 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539 cat >> confdefs.h <<EOF
1540#define $ac_tr_hdr 1
1541EOF
1542
1543else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001544 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001546done
1547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001548ac_header_dirent=no
1549for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1550do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001551ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001552echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001553echo "configure:1554: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001554if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1555 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001556else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001557 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001558#line 1559 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001559#include "confdefs.h"
1560#include <sys/types.h>
1561#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001562int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001563DIR *dirp = 0;
1564; return 0; }
1565EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001566if { (eval echo configure:1567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001567 rm -rf conftest*
1568 eval "ac_cv_header_dirent_$ac_safe=yes"
1569else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001570 echo "configure: failed program was:" >&5
1571 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572 rm -rf conftest*
1573 eval "ac_cv_header_dirent_$ac_safe=no"
1574fi
1575rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001576fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001578 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001579 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001580 cat >> confdefs.h <<EOF
1581#define $ac_tr_hdr 1
1582EOF
1583 ac_header_dirent=$ac_hdr; break
1584else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001585 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001586fi
1587done
1588# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1589if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001590echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001591echo "configure:1592: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001592ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001593if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001594 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001595else
1596 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001597LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001598cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001599#line 1600 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001600#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001601/* Override any gcc2 internal prototype to avoid an error. */
1602/* We use char because int might match the return type of a gcc2
1603 builtin and then its argument prototype would still apply. */
1604char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001605
Guido van Rossumf78abae1997-01-21 22:02:36 +00001606int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607opendir()
1608; return 0; }
1609EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001610if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001611 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001612 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001613else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001614 echo "configure: failed program was:" >&5
1615 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001617 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001618fi
1619rm -f conftest*
1620LIBS="$ac_save_LIBS"
1621
1622fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001623if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001624 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001625 LIBS="$LIBS -ldir"
1626else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001627 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001628fi
1629
1630else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001631echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001632echo "configure:1633: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001633ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001634if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001635 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001636else
1637 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001638LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001639cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001640#line 1641 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001641#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001642/* Override any gcc2 internal prototype to avoid an error. */
1643/* We use char because int might match the return type of a gcc2
1644 builtin and then its argument prototype would still apply. */
1645char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001646
Guido van Rossumf78abae1997-01-21 22:02:36 +00001647int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648opendir()
1649; return 0; }
1650EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001651if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001652 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001653 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001654else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001655 echo "configure: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001658 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001659fi
1660rm -f conftest*
1661LIBS="$ac_save_LIBS"
1662
1663fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001664if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001665 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001666 LIBS="$LIBS -lx"
1667else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001668 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001669fi
1670
1671fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001672
1673
1674# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001675was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001676echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001677echo "configure:1678: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001679#line 1680 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001680#include "confdefs.h"
1681#include <time.h>
1682EOF
1683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1684 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001685 rm -rf conftest*
1686 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001687else
1688 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 cat >> confdefs.h <<\EOF
1690#define clock_t long
1691EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001692
1693fi
1694rm -f conftest*
1695
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001696echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001697
Guido van Rossum84e7b241996-08-19 21:59:00 +00001698# Add some code to confdefs.h so that the test for off_t works on SCO
1699cat >> confdefs.h <<\EOF
1700#if defined(SCO_DS)
1701#undef _OFF_T
1702#endif
1703EOF
1704
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001705echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001706echo "configure:1707: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001707if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1708 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709else
1710 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001711#line 1712 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712#include "confdefs.h"
1713#include <sys/types.h>
1714#if STDC_HEADERS
1715#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001716#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717#endif
1718EOF
1719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001720 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 +00001721 rm -rf conftest*
1722 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001723else
1724 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001726fi
1727rm -f conftest*
1728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001729fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001730echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001731if test $ac_cv_type_mode_t = no; then
1732 cat >> confdefs.h <<\EOF
1733#define mode_t int
1734EOF
1735
1736fi
1737
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001738echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001739echo "configure:1740: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001740if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1741 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001742else
1743 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001744#line 1745 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001745#include "confdefs.h"
1746#include <sys/types.h>
1747#if STDC_HEADERS
1748#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001749#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001750#endif
1751EOF
1752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001753 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 +00001754 rm -rf conftest*
1755 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001756else
1757 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001758 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001759fi
1760rm -f conftest*
1761
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001762fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001763echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001764if test $ac_cv_type_off_t = no; then
1765 cat >> confdefs.h <<\EOF
1766#define off_t long
1767EOF
1768
1769fi
1770
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001771echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001772echo "configure:1773: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001773if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775else
1776 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001777#line 1778 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778#include "confdefs.h"
1779#include <sys/types.h>
1780#if STDC_HEADERS
1781#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001782#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783#endif
1784EOF
1785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001786 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 +00001787 rm -rf conftest*
1788 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001789else
1790 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001792fi
1793rm -f conftest*
1794
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001795fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001796echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797if test $ac_cv_type_pid_t = no; then
1798 cat >> confdefs.h <<\EOF
1799#define pid_t int
1800EOF
1801
1802fi
1803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001804echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001805echo "configure:1806: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001806if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808else
1809 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001810#line 1811 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001811#include "confdefs.h"
1812#include <sys/types.h>
1813#include <signal.h>
1814#ifdef signal
1815#undef signal
1816#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001817#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001818extern "C" void (*signal (int, void (*)(int)))(int);
1819#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001820void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001821#endif
1822
Guido van Rossumf78abae1997-01-21 22:02:36 +00001823int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824int i;
1825; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001826EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001827if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001828 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001829 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001830else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001831 echo "configure: failed program was:" >&5
1832 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001833 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001834 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001835fi
1836rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001838
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001839echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840cat >> confdefs.h <<EOF
1841#define RETSIGTYPE $ac_cv_type_signal
1842EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001844
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001845echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001846echo "configure:1847: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001847if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001849else
1850 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001851#line 1852 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852#include "confdefs.h"
1853#include <sys/types.h>
1854#if STDC_HEADERS
1855#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001856#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001857#endif
1858EOF
1859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001860 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 +00001861 rm -rf conftest*
1862 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001863else
1864 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001865 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001866fi
1867rm -f conftest*
1868
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001869fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001870echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871if test $ac_cv_type_size_t = no; then
1872 cat >> confdefs.h <<\EOF
1873#define size_t unsigned
1874EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001875
1876fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001877
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001878echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001879echo "configure:1880: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001880if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1881 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001882else
1883 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001884#line 1885 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885#include "confdefs.h"
1886#include <sys/types.h>
1887EOF
1888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1889 egrep "uid_t" >/dev/null 2>&1; then
1890 rm -rf conftest*
1891 ac_cv_type_uid_t=yes
1892else
1893 rm -rf conftest*
1894 ac_cv_type_uid_t=no
1895fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001896rm -f conftest*
1897
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001899
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001900echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901if test $ac_cv_type_uid_t = no; then
1902 cat >> confdefs.h <<\EOF
1903#define uid_t int
1904EOF
1905
1906 cat >> confdefs.h <<\EOF
1907#define gid_t int
1908EOF
1909
1910fi
1911
Guido van Rossum627b2d71993-12-24 10:39:16 +00001912
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001913echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001914echo "configure:1915: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001915if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1916 echo $ac_n "(cached) $ac_c" 1>&6
1917else
1918 if test "$cross_compiling" = yes; then
1919 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1920else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001921 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001922#line 1923 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001923#include "confdefs.h"
1924#include <stdio.h>
1925main()
1926{
1927 FILE *f=fopen("conftestval", "w");
1928 if (!f) exit(1);
1929 fprintf(f, "%d\n", sizeof(int));
1930 exit(0);
1931}
1932EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001933if { (eval echo configure:1934: \"$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 +00001934then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001935 ac_cv_sizeof_int=`cat conftestval`
1936else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001937 echo "configure: failed program was:" >&5
1938 cat conftest.$ac_ext >&5
1939 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001940 ac_cv_sizeof_int=0
1941fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001942rm -fr conftest*
1943fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001944
1945fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001946echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1947cat >> confdefs.h <<EOF
1948#define SIZEOF_INT $ac_cv_sizeof_int
1949EOF
1950
1951
1952echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001953echo "configure:1954: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001954if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1955 echo $ac_n "(cached) $ac_c" 1>&6
1956else
1957 if test "$cross_compiling" = yes; then
1958 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1959else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001960 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001961#line 1962 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001962#include "confdefs.h"
1963#include <stdio.h>
1964main()
1965{
1966 FILE *f=fopen("conftestval", "w");
1967 if (!f) exit(1);
1968 fprintf(f, "%d\n", sizeof(long));
1969 exit(0);
1970}
1971EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001972if { (eval echo configure:1973: \"$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 +00001973then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001974 ac_cv_sizeof_long=`cat conftestval`
1975else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001976 echo "configure: failed program was:" >&5
1977 cat conftest.$ac_ext >&5
1978 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001979 ac_cv_sizeof_long=0
1980fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001981rm -fr conftest*
1982fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001983
1984fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001985echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1986cat >> confdefs.h <<EOF
1987#define SIZEOF_LONG $ac_cv_sizeof_long
1988EOF
1989
1990
Guido van Rossumad678af1998-10-02 14:42:15 +00001991echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001992echo "configure:1993: checking size of void *" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00001993if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
1994 echo $ac_n "(cached) $ac_c" 1>&6
1995else
1996 if test "$cross_compiling" = yes; then
1997 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1998else
1999 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002000#line 2001 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002001#include "confdefs.h"
2002#include <stdio.h>
2003main()
2004{
2005 FILE *f=fopen("conftestval", "w");
2006 if (!f) exit(1);
2007 fprintf(f, "%d\n", sizeof(void *));
2008 exit(0);
2009}
2010EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002011if { (eval echo configure:2012: \"$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 +00002012then
2013 ac_cv_sizeof_void_p=`cat conftestval`
2014else
2015 echo "configure: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2017 rm -fr conftest*
2018 ac_cv_sizeof_void_p=0
2019fi
2020rm -fr conftest*
2021fi
2022
2023fi
2024echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2025cat >> confdefs.h <<EOF
2026#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2027EOF
2028
2029
Guido van Rossum0a516c91994-09-12 10:58:40 +00002030
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002031echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002032echo "configure:2033: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002033have_long_long=no
2034cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002035#line 2036 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002036#include "confdefs.h"
2037
2038int main() {
2039long long x; x = (long long)0;
2040; return 0; }
2041EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002042if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002043 rm -rf conftest*
2044 cat >> confdefs.h <<\EOF
2045#define HAVE_LONG_LONG 1
2046EOF
2047 have_long_long=yes
2048else
2049 echo "configure: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051fi
2052rm -f conftest*
2053echo "$ac_t""$have_long_long" 1>&6
2054if test $have_long_long = yes ; then
2055echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002056echo "configure:2057: checking size of long long" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002057if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2058 echo $ac_n "(cached) $ac_c" 1>&6
2059else
2060 if test "$cross_compiling" = yes; then
2061 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2062else
2063 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002064#line 2065 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002065#include "confdefs.h"
2066#include <stdio.h>
2067main()
2068{
2069 FILE *f=fopen("conftestval", "w");
2070 if (!f) exit(1);
2071 fprintf(f, "%d\n", sizeof(long long));
2072 exit(0);
2073}
2074EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002075if { (eval echo configure:2076: \"$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 +00002076then
2077 ac_cv_sizeof_long_long=`cat conftestval`
2078else
2079 echo "configure: failed program was:" >&5
2080 cat conftest.$ac_ext >&5
2081 rm -fr conftest*
2082 ac_cv_sizeof_long_long=0
2083fi
2084rm -fr conftest*
2085fi
2086
2087fi
2088echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2089cat >> confdefs.h <<EOF
2090#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2091EOF
2092
2093
2094fi
2095
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002096# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2097echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002098echo "configure:2099: checking size of off_t" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002099if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2100 echo $ac_n "(cached) $ac_c" 1>&6
2101else
2102 if test "$cross_compiling" = yes; then
2103 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2104else
2105 cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002106#line 2107 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002107#include "confdefs.h"
2108#include <stdio.h>
2109#include <sys/types.h>
2110main()
2111{
2112 FILE *f=fopen("conftestval", "w");
2113 if (!f) exit(1);
2114 fprintf(f, "%d\n", sizeof(off_t));
2115 exit(0);
2116}
2117EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002118if { (eval echo configure:2119: \"$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 +00002119then
2120 ac_cv_sizeof_off_t=`cat conftestval`
2121else
2122 echo "configure: failed program was:" >&5
2123 cat conftest.$ac_ext >&5
2124 rm -fr conftest*
2125 ac_cv_sizeof_off_t=0
2126fi
2127rm -fr conftest*
2128fi
2129
2130
2131fi
2132
2133echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2134cat >> confdefs.h <<EOF
2135#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2136EOF
2137
2138
2139echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002140echo "configure:2141: checking whether to enable large file support" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002141if test $have_long_long = yes -a \
2142 $ac_cv_sizeof_off_t -gt $ac_cv_sizeof_long -a \
2143 $ac_cv_sizeof_long_long -ge $ac_cv_sizeof_off_t; then
2144 cat >> confdefs.h <<\EOF
2145#define HAVE_LARGEFILE_SUPPORT 1
2146EOF
2147
2148 echo "$ac_t""yes" 1>&6
2149else
2150 echo "$ac_t""no" 1>&6
2151fi
2152
2153
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002154# Minor variations in building a framework between NextStep versions 4 and 5
2155
2156case $ac_sys_system/$ac_sys_release in
2157 next/4*)
2158 ns_undef_sym='__environ'
2159 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2160 next/5*)
2161 ns_undef_sym='_environ'
2162 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2163esac
2164
2165echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
2166echo "configure:2167: checking for --with-next-framework" >&5
2167if test "$with_next_framework"
2168then
2169 OPT="$OPT -fno-common"
2170 # -U __environ is needed since bundles don't have access
2171 # to crt0 when built but will always be linked against it
2172 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2173 cat >> confdefs.h <<\EOF
2174#define WITH_NEXT_FRAMEWORK 1
2175EOF
2176
2177 echo "$ac_t""yes" 1>&6
2178else
2179 echo "$ac_t""no" 1>&6
2180fi
2181
2182echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
2183echo "configure:2184: checking for --with-dyld" >&5
2184if test "$with_next_framework" -o "$with_dyld"
2185then
2186 if test "$with_dyld"
2187 then
2188 echo "$ac_t""yes" 1>&6
2189 else
2190 echo "$ac_t""required for framework build" 1>&6
2191 fi
2192 cat >> confdefs.h <<\EOF
2193#define WITH_DYLD 1
2194EOF
2195
2196 ns_dyld='set'
2197else
2198 echo "$ac_t""no" 1>&6
2199fi
2200
Guido van Rossum0a516c91994-09-12 10:58:40 +00002201# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002202
2203
2204
2205
Guido van Rossum0a516c91994-09-12 10:58:40 +00002206# SO is the extension of shared libraries `(including the dot!)
2207# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002208echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002209echo "configure:2210: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002210if test -z "$SO"
2211then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002212 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002213 hp*|HP*) SO=.sl;;
2214 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002215 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002216fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002217echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002218# LDSHARED is the ld *command* used to create shared library
2219# -- "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 +00002220# (Shared libraries in this instance are shared modules to be loaded into
2221# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002222echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002223echo "configure:2224: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002224if test -z "$LDSHARED"
2225then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002226 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002227 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002228 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002229 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002230 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002231 SunOS/4*) LDSHARED="ld";;
2232 SunOS/5*) LDSHARED="ld -G";;
2233 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002234 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2235 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002236 next/*)
2237 if test "$ns_dyld"
2238 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2239 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2240 fi
2241 if test "$with_next_framework" ; then
2242 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2243 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002244 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002245 dgux*) LDSHARED="ld -G";;
Guido van Rossumea516321998-12-17 18:08:55 +00002246 FreeBSD*/3*) LDSHARED="gcc -shared";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002247 FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
2248 NetBSD*)
2249 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2250 then
2251 LDSHARED="cc -shared"
2252 else
2253 LDSHARED="ld -Bshareable"
2254 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002255 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002256 *) LDSHARED="ld";;
2257 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002258fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002259echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002260# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002261# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002262echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002263echo "configure:2264: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002264if test -z "$CCSHARED"
2265then
Guido van Rossum07397971997-04-29 21:49:50 +00002266 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002267 hp*|HP*) if test "$GCC" = yes;
2268 then CCSHARED="-fpic";
2269 else CCSHARED="+z";
2270 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002271 Linux*) CCSHARED="-fpic";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002272 FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
2273 NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002274 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002275 IRIX*/6*) case $CC in
2276 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002277 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002278 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002279 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002280fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002281echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002282# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002283# the python executable -- this is only needed for a few systems
2284echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002285echo "configure:2286: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002286if test -z "$LINKFORSHARED"
2287then
Guido van Rossum07397971997-04-29 21:49:50 +00002288 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002289 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002290 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002291 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumea516321998-12-17 18:08:55 +00002292 FreeBSD/3*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002293 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002294 # -u libsys_s pulls in all symbols in libsys
2295 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2296 # -u __dummy makes the linker aware of the objc runtime
2297 # in System.framework; otherwise, __objcInit (referenced in
2298 # crt1.o) gets erroneously defined as common, which breaks dynamic
2299 # loading of any modules which reference it in System.framework
2300 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002301 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002302 NetBSD*)
2303 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2304 then
2305 LINKFORSHARED="-Wl,--export-dynamic"
2306 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002307 SunOS/5*) case $CC in
2308 *gcc*)
2309 if $CC -Xlinker -V 2>/dev/null | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002310 then
2311 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002312 fi;;
2313 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002314 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002315fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002316echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002317
Guido van Rossum627b2d71993-12-24 10:39:16 +00002318# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002319echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002320echo "configure:2321: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002321ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002322if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002323 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002324else
2325 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002326LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002327cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002328#line 2329 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002329#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002330/* Override any gcc2 internal prototype to avoid an error. */
2331/* We use char because int might match the return type of a gcc2
2332 builtin and then its argument prototype would still apply. */
2333char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002334
Guido van Rossumf78abae1997-01-21 22:02:36 +00002335int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002336dlopen()
2337; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002338EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002339if { (eval echo configure:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002340 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002341 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002343 echo "configure: failed program was:" >&5
2344 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002345 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002346 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002347fi
2348rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002349LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002350
Guido van Rossum627b2d71993-12-24 10:39:16 +00002351fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002352if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002353 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002354 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2355 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002356 cat >> confdefs.h <<EOF
2357#define $ac_tr_lib 1
2358EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002359
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002360 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002361
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002362else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002363 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002364fi
2365 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002366echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002367echo "configure:2368: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002368ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002369if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002370 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002371else
2372 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002373LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374cat > conftest.$ac_ext <<EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002375#line 2376 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002376#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002377/* Override any gcc2 internal prototype to avoid an error. */
2378/* We use char because int might match the return type of a gcc2
2379 builtin and then its argument prototype would still apply. */
2380char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002381
Guido van Rossumf78abae1997-01-21 22:02:36 +00002382int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002383shl_load()
2384; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002385EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002386if { (eval echo configure:2387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002387 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002388 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002389else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002390 echo "configure: failed program was:" >&5
2391 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002393 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002394fi
2395rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002396LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002397
Guido van Rossum627b2d71993-12-24 10:39:16 +00002398fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002399if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002400 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002401 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2402 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002403 cat >> confdefs.h <<EOF
2404#define $ac_tr_lib 1
2405EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002406
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002407 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002408
2409else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002410 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002411fi
2412 # Dynamic linking for HP-UX
Guido van Rossum70c7f481998-03-26 18:44:10 +00002413# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2414# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002415# BeOS' sockets are stashed in libnet.
2416case "$ac_sys_system" in
2417IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002418*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002419echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002420echo "configure:2421: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002421ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002422if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002423 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002424else
2425 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002426LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002427cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002428#line 2429 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002429#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002430/* Override any gcc2 internal prototype to avoid an error. */
2431/* We use char because int might match the return type of a gcc2
2432 builtin and then its argument prototype would still apply. */
2433char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002434
Guido van Rossumf78abae1997-01-21 22:02:36 +00002435int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002436t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002437; return 0; }
2438EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002439if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002440 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002441 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002442else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002443 echo "configure: failed program was:" >&5
2444 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002445 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002446 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002447fi
2448rm -f conftest*
2449LIBS="$ac_save_LIBS"
2450
2451fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002452if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002453 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002454 LIBS="-lnsl $LIBS"
2455else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002456 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002457fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002458 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002459echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002460echo "configure:2461: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002461ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002463 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002464else
2465 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002466LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002467cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002468#line 2469 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002469#include "confdefs.h"
2470/* Override any gcc2 internal prototype to avoid an error. */
2471/* We use char because int might match the return type of a gcc2
2472 builtin and then its argument prototype would still apply. */
2473char socket();
2474
2475int main() {
2476socket()
2477; return 0; }
2478EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002479if { (eval echo configure:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002480 rm -rf conftest*
2481 eval "ac_cv_lib_$ac_lib_var=yes"
2482else
2483 echo "configure: failed program was:" >&5
2484 cat conftest.$ac_ext >&5
2485 rm -rf conftest*
2486 eval "ac_cv_lib_$ac_lib_var=no"
2487fi
2488rm -f conftest*
2489LIBS="$ac_save_LIBS"
2490
2491fi
2492if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2493 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002494 LIBS="-lsocket $LIBS"
2495else
2496 echo "$ac_t""no" 1>&6
2497fi
2498 # SVR4 sockets
2499echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002500echo "configure:2501: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002501ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
2502if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2503 echo $ac_n "(cached) $ac_c" 1>&6
2504else
2505 ac_save_LIBS="$LIBS"
2506LIBS="-lnet $LIBS $LIBS"
2507cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002508#line 2509 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002509#include "confdefs.h"
2510/* Override any gcc2 internal prototype to avoid an error. */
2511/* We use char because int might match the return type of a gcc2
2512 builtin and then its argument prototype would still apply. */
2513char socket();
2514
2515int main() {
2516socket()
2517; return 0; }
2518EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002519if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002520 rm -rf conftest*
2521 eval "ac_cv_lib_$ac_lib_var=yes"
2522else
2523 echo "configure: failed program was:" >&5
2524 cat conftest.$ac_ext >&5
2525 rm -rf conftest*
2526 eval "ac_cv_lib_$ac_lib_var=no"
2527fi
2528rm -f conftest*
2529LIBS="$ac_save_LIBS"
2530
2531fi
2532if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2533 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002534 LIBS="-lnet $LIBS"
2535else
2536 echo "$ac_t""no" 1>&6
2537fi
2538 # BeOS
2539;;
2540esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002541
Guido van Rossuma68acba1996-07-31 17:36:39 +00002542echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002543echo "configure:2544: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002544# Check whether --with-libs or --without-libs was given.
2545if test "${with_libs+set}" = set; then
2546 withval="$with_libs"
2547
2548echo "$ac_t""$withval" 1>&6
2549LIBS="$withval $LIBS"
2550
2551else
2552 echo "$ac_t""no" 1>&6
2553fi
2554
Guido van Rossum7f43da71994-08-01 12:15:30 +00002555
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002556echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002557echo "configure:2558: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002558# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002559if test "${with_readline+set}" = set; then
2560 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002561 echo "$ac_t""$withval" 1>&6
2562{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002563else
Guido van Rossumb06df271997-08-05 21:50:20 +00002564 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002565fi
2566
Guido van Rossum7f43da71994-08-01 12:15:30 +00002567
Guido van Rossum009f7871997-12-04 00:51:42 +00002568
2569USE_THREAD_MODULE="#"
2570
Guido van Rossumec2f0731997-01-22 20:54:01 +00002571echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002572echo "configure:2573: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002573
2574# Check whether --with-dec-threads or --without-dec-threads was given.
2575if test "${with_dec_threads+set}" = set; then
2576 withval="$with_dec_threads"
2577 echo "$ac_t""$withval" 1>&6
2578LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002579if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002580 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002581fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002582else
2583 echo "$ac_t""no" 1>&6
2584fi
2585
2586
2587echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002588echo "configure:2589: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002589# Check whether --with-threads or --without-threads was given.
2590if test "${with_threads+set}" = set; then
2591 withval="$with_threads"
2592 echo "$ac_t""$withval" 1>&6
2593if test "${with_thread+set}" != set; then
2594 with_thread="$withval";
2595fi
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600
2601echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002602echo "configure:2603: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002604if test "${with_thread+set}" = set; then
2605 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002606
Guido van Rossum009f7871997-12-04 00:51:42 +00002607USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002608echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002609if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002610then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002611fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002612cat >> confdefs.h <<\EOF
2613#define _REENTRANT 1
2614EOF
2615
Guido van Rossumf78abae1997-01-21 22:02:36 +00002616ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002617echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002618echo "configure:2619: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002619if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2620 echo $ac_n "(cached) $ac_c" 1>&6
2621else
2622 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002623#line 2624 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002624#include "confdefs.h"
2625#include <mach/cthreads.h>
2626EOF
2627ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002628{ (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002629ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002630if test -z "$ac_err"; then
2631 rm -rf conftest*
2632 eval "ac_cv_header_$ac_safe=yes"
2633else
2634 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002635 echo "configure: failed program was:" >&5
2636 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002637 rm -rf conftest*
2638 eval "ac_cv_header_$ac_safe=no"
2639fi
2640rm -f conftest*
2641fi
2642if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2643 echo "$ac_t""yes" 1>&6
2644 cat >> confdefs.h <<\EOF
2645#define WITH_THREAD 1
2646EOF
2647
2648cat >> confdefs.h <<\EOF
2649#define C_THREADS 1
2650EOF
2651
2652LIBOBJS="$LIBOBJS thread.o"
2653else
2654 echo "$ac_t""no" 1>&6
2655
Guido van Rossumea516321998-12-17 18:08:55 +00002656echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002657echo "configure:2658: checking for pthread_detach" >&5
Guido van Rossumea516321998-12-17 18:08:55 +00002658if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002659 echo $ac_n "(cached) $ac_c" 1>&6
2660else
2661 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002662#line 2663 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002663#include "confdefs.h"
2664/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00002665 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00002666#include <assert.h>
2667/* Override any gcc2 internal prototype to avoid an error. */
2668/* We use char because int might match the return type of a gcc2
2669 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00002670char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002671
2672int main() {
2673
2674/* The GNU C library defines this for functions which it implements
2675 to always fail with ENOSYS. Some functions are actually named
2676 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00002677#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00002678choke me
2679#else
Guido van Rossumea516321998-12-17 18:08:55 +00002680pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002681#endif
2682
2683; return 0; }
2684EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002685if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002686 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002687 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00002688else
2689 echo "configure: failed program was:" >&5
2690 cat conftest.$ac_ext >&5
2691 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002692 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00002693fi
2694rm -f conftest*
2695fi
2696
Guido van Rossumea516321998-12-17 18:08:55 +00002697if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002698 echo "$ac_t""yes" 1>&6
2699 cat >> confdefs.h <<\EOF
2700#define WITH_THREAD 1
2701EOF
2702
2703cat >> confdefs.h <<\EOF
2704#define _POSIX_THREADS 1
2705EOF
2706
2707LIBOBJS="$LIBOBJS thread.o"
2708else
2709 echo "$ac_t""no" 1>&6
2710
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002711ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
2712echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002713echo "configure:2714: checking for kernel/OS.h" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002714if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2716else
2717 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002718#line 2719 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002719#include "confdefs.h"
2720#include <kernel/OS.h>
2721EOF
2722ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002723{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002724ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002725if test -z "$ac_err"; then
2726 rm -rf conftest*
2727 eval "ac_cv_header_$ac_safe=yes"
2728else
2729 echo "$ac_err" >&5
2730 echo "configure: failed program was:" >&5
2731 cat conftest.$ac_ext >&5
2732 rm -rf conftest*
2733 eval "ac_cv_header_$ac_safe=no"
2734fi
2735rm -f conftest*
2736fi
2737if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2738 echo "$ac_t""yes" 1>&6
2739 cat >> confdefs.h <<\EOF
2740#define WITH_THREAD 1
2741EOF
2742
2743cat >> confdefs.h <<\EOF
2744#define BEOS_THREADS 1
2745EOF
2746
2747LIBOBJS="$LIBOBJS thread.o"
2748else
2749 echo "$ac_t""no" 1>&6
2750
Guido van Rossumf78abae1997-01-21 22:02:36 +00002751echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002752echo "configure:2753: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002753ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002754if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002755 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756else
2757 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002758LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002759cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002760#line 2761 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002761#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002762/* Override any gcc2 internal prototype to avoid an error. */
2763/* We use char because int might match the return type of a gcc2
2764 builtin and then its argument prototype would still apply. */
2765char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002766
Guido van Rossumf78abae1997-01-21 22:02:36 +00002767int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768pthread_create()
2769; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002770EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002771if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002772 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002773 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002775 echo "configure: failed program was:" >&5
2776 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002778 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002779fi
2780rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002781LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002784if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002785 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786 cat >> confdefs.h <<\EOF
2787#define WITH_THREAD 1
2788EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002789
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790cat >> confdefs.h <<\EOF
2791#define _POSIX_THREADS 1
2792EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002793
2794LIBS="$LIBS -lpthreads"
2795LIBOBJS="$LIBOBJS thread.o"
2796else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002797 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002798
Guido van Rossumf78abae1997-01-21 22:02:36 +00002799echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002800echo "configure:2801: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002801ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002802if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2803 echo $ac_n "(cached) $ac_c" 1>&6
2804else
2805 ac_save_LIBS="$LIBS"
2806LIBS="-lpthread $LIBS"
2807cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002808#line 2809 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002809#include "confdefs.h"
2810/* Override any gcc2 internal prototype to avoid an error. */
2811/* We use char because int might match the return type of a gcc2
2812 builtin and then its argument prototype would still apply. */
2813char pthread_create();
2814
Guido van Rossumf78abae1997-01-21 22:02:36 +00002815int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002816pthread_create()
2817; return 0; }
2818EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002819if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002820 rm -rf conftest*
2821 eval "ac_cv_lib_$ac_lib_var=yes"
2822else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002823 echo "configure: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002825 rm -rf conftest*
2826 eval "ac_cv_lib_$ac_lib_var=no"
2827fi
2828rm -f conftest*
2829LIBS="$ac_save_LIBS"
2830
2831fi
2832if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2833 echo "$ac_t""yes" 1>&6
2834 cat >> confdefs.h <<\EOF
2835#define WITH_THREAD 1
2836EOF
2837
2838cat >> confdefs.h <<\EOF
2839#define _POSIX_THREADS 1
2840EOF
2841
2842LIBS="$LIBS -lpthread"
2843LIBOBJS="$LIBOBJS thread.o"
2844else
2845 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002846
Guido van Rossum49545951997-12-02 19:28:29 +00002847echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002848echo "configure:2849: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00002849ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2850if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2851 echo $ac_n "(cached) $ac_c" 1>&6
2852else
2853 ac_save_LIBS="$LIBS"
2854LIBS="-lc_r $LIBS"
2855cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002856#line 2857 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00002857#include "confdefs.h"
2858/* Override any gcc2 internal prototype to avoid an error. */
2859/* We use char because int might match the return type of a gcc2
2860 builtin and then its argument prototype would still apply. */
2861char pthread_create();
2862
2863int main() {
2864pthread_create()
2865; return 0; }
2866EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002867if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00002868 rm -rf conftest*
2869 eval "ac_cv_lib_$ac_lib_var=yes"
2870else
2871 echo "configure: failed program was:" >&5
2872 cat conftest.$ac_ext >&5
2873 rm -rf conftest*
2874 eval "ac_cv_lib_$ac_lib_var=no"
2875fi
2876rm -f conftest*
2877LIBS="$ac_save_LIBS"
2878
2879fi
2880if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2881 echo "$ac_t""yes" 1>&6
2882 cat >> confdefs.h <<\EOF
2883#define WITH_THREAD 1
2884EOF
2885
2886cat >> confdefs.h <<\EOF
2887#define _POSIX_THREADS 1
2888EOF
2889
2890LIBS="$LIBS -lc_r"
2891LIBOBJS="$LIBOBJS thread.o"
2892else
2893 echo "$ac_t""no" 1>&6
2894
Guido van Rossum0be3e491997-05-22 20:33:33 +00002895echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002896echo "configure:2897: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002897ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2898if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2899 echo $ac_n "(cached) $ac_c" 1>&6
2900else
2901 ac_save_LIBS="$LIBS"
2902LIBS="-lthread $LIBS"
2903cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002904#line 2905 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002905#include "confdefs.h"
2906/* Override any gcc2 internal prototype to avoid an error. */
2907/* We use char because int might match the return type of a gcc2
2908 builtin and then its argument prototype would still apply. */
2909char __d6_pthread_create();
2910
2911int main() {
2912__d6_pthread_create()
2913; return 0; }
2914EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002915if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002916 rm -rf conftest*
2917 eval "ac_cv_lib_$ac_lib_var=yes"
2918else
2919 echo "configure: failed program was:" >&5
2920 cat conftest.$ac_ext >&5
2921 rm -rf conftest*
2922 eval "ac_cv_lib_$ac_lib_var=no"
2923fi
2924rm -f conftest*
2925LIBS="$ac_save_LIBS"
2926
2927fi
2928if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2929 echo "$ac_t""yes" 1>&6
2930 cat >> confdefs.h <<\EOF
2931#define WITH_THREAD 1
2932EOF
2933
2934cat >> confdefs.h <<\EOF
2935#define _POSIX_THREADS 1
2936EOF
2937
2938LIBS="$LIBS -lthread"
2939LIBOBJS="$LIBOBJS thread.o"
2940else
2941 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002942
2943echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002944echo "configure:2945: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00002945ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
2946if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2947 echo $ac_n "(cached) $ac_c" 1>&6
2948else
2949 ac_save_LIBS="$LIBS"
2950LIBS="-lcma $LIBS"
2951cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002952#line 2953 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00002953#include "confdefs.h"
2954/* Override any gcc2 internal prototype to avoid an error. */
2955/* We use char because int might match the return type of a gcc2
2956 builtin and then its argument prototype would still apply. */
2957char pthread_create();
2958
2959int main() {
2960pthread_create()
2961; return 0; }
2962EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00002963if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00002964 rm -rf conftest*
2965 eval "ac_cv_lib_$ac_lib_var=yes"
2966else
2967 echo "configure: failed program was:" >&5
2968 cat conftest.$ac_ext >&5
2969 rm -rf conftest*
2970 eval "ac_cv_lib_$ac_lib_var=no"
2971fi
2972rm -f conftest*
2973LIBS="$ac_save_LIBS"
2974
2975fi
2976if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2977 echo "$ac_t""yes" 1>&6
2978 cat >> confdefs.h <<\EOF
2979#define WITH_THREAD 1
2980EOF
2981
2982cat >> confdefs.h <<\EOF
2983#define _POSIX_THREADS 1
2984EOF
2985
2986LIBS="$LIBS -lcma"
2987LIBOBJS="$LIBOBJS thread.o"
2988else
2989 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002990fi
2991
2992
Guido van Rossum627b2d71993-12-24 10:39:16 +00002993fi
2994
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002995fi
2996
Guido van Rossum0be3e491997-05-22 20:33:33 +00002997fi
2998
Guido van Rossum49545951997-12-02 19:28:29 +00002999fi
3000
Guido van Rossumb93a8621998-05-07 13:27:32 +00003001fi
3002
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003003fi
3004
Guido van Rossumad678af1998-10-02 14:42:15 +00003005fi
3006
Guido van Rossum0be3e491997-05-22 20:33:33 +00003007
Guido van Rossumf78abae1997-01-21 22:02:36 +00003008echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003009echo "configure:3010: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003010ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003011if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003012 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003013else
3014 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003015LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003016cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003017#line 3018 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003018#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003019/* Override any gcc2 internal prototype to avoid an error. */
3020/* We use char because int might match the return type of a gcc2
3021 builtin and then its argument prototype would still apply. */
3022char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003023
Guido van Rossumf78abae1997-01-21 22:02:36 +00003024int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003025usconfig()
3026; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003027EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003028if { (eval echo configure:3029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003029 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003030 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003031else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003032 echo "configure: failed program was:" >&5
3033 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003034 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003035 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003036fi
3037rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003038LIBS="$ac_save_LIBS"
3039
3040fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003041if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003042 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003043 cat >> confdefs.h <<\EOF
3044#define WITH_THREAD 1
3045EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003046
Guido van Rossum7f43da71994-08-01 12:15:30 +00003047LIBS="$LIBS -lmpc"
3048LIBOBJS="$LIBOBJS thread.o"
3049else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003050 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003051fi
3052
Guido van Rossumf78abae1997-01-21 22:02:36 +00003053echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003054echo "configure:3055: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003055ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003056if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003057 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003058else
3059 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003060LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003061cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003062#line 3063 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003063#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003064/* Override any gcc2 internal prototype to avoid an error. */
3065/* We use char because int might match the return type of a gcc2
3066 builtin and then its argument prototype would still apply. */
3067char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003068
Guido van Rossumf78abae1997-01-21 22:02:36 +00003069int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003070thr_create()
3071; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003072EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003073if { (eval echo configure:3074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003074 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003075 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003076else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003077 echo "configure: failed program was:" >&5
3078 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003079 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003080 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003081fi
3082rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003083LIBS="$ac_save_LIBS"
3084
3085fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003086if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003087 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003088 cat >> confdefs.h <<\EOF
3089#define WITH_THREAD 1
3090EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003091
Guido van Rossum7f43da71994-08-01 12:15:30 +00003092LIBS="$LIBS -lthread"
3093LIBOBJS="$LIBOBJS thread.o"
3094else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003095 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003096fi
3097
Guido van Rossum7f43da71994-08-01 12:15:30 +00003098
Guido van Rossumda88dad1995-01-26 00:46:29 +00003099else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003100 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003101fi
3102
Guido van Rossum7f43da71994-08-01 12:15:30 +00003103
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003104# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003105
3106DLINCLDIR=/
3107
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003108echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003109echo "configure:3110: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003110# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003111if test "${with_sgi_dl+set}" = set; then
3112 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003113
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003114echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115cat >> confdefs.h <<\EOF
3116#define WITH_SGI_DL 1
3117EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003118
3119dldir=$withval
3120if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003121then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003123fi
3124DLINCLDIR=${dldir}
3125LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003126else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003127 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003128fi
3129
3130
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003131echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003132echo "configure:3133: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003133# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003134if test "${with_dl_dld+set}" = set; then
3135 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003136
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003137echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003138cat >> confdefs.h <<\EOF
3139#define WITH_DL_DLD 1
3140EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003141
3142dldir=`echo "$withval" | sed 's/,.*//'`
3143dlddir=`echo "$withval" | sed 's/.*,//'`
3144if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003145then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003146else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003147fi
3148DLINCLDIR=${dldir}
3149LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003150else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003151 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003152fi
3153
3154
Guido van Rossum627b2d71993-12-24 10:39:16 +00003155# checks for library functions
Guido van Rossumdf693651999-01-07 21:50:41 +00003156for ac_func in alarm chown clock dlopen execv flock fork \
3157 fsync fdatasync ftime ftruncate \
Guido van Rossum1171ee61997-08-22 20:42:00 +00003158 gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
Guido van Rossumad678af1998-10-02 14:42:15 +00003159 kill link lstat mkfifo mktime nice pause plock pthread_init putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00003160 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003161 sigaction siginterrupt sigrelse strftime strptime symlink \
Guido van Rossum08d6be41998-06-11 15:19:05 +00003162 tcgetpgrp tcsetpgrp timegm times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00003163do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003164echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003165echo "configure:3166: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003166if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3167 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003168else
3169 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003170#line 3171 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003171#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003172/* System header to define __stub macros and hopefully few prototypes,
3173 which can conflict with char $ac_func(); below. */
3174#include <assert.h>
3175/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003176/* We use char because int might match the return type of a gcc2
3177 builtin and then its argument prototype would still apply. */
3178char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003179
Guido van Rossumf78abae1997-01-21 22:02:36 +00003180int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181
Guido van Rossum627b2d71993-12-24 10:39:16 +00003182/* The GNU C library defines this for functions which it implements
3183 to always fail with ENOSYS. Some functions are actually named
3184 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003185#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003186choke me
3187#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003188$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003189#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003190
Guido van Rossum7f43da71994-08-01 12:15:30 +00003191; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003192EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003193if { (eval echo configure:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003194 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003195 eval "ac_cv_func_$ac_func=yes"
3196else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003197 echo "configure: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003199 rm -rf conftest*
3200 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003201fi
3202rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003203fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003204
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003206 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003207 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208 cat >> confdefs.h <<EOF
3209#define $ac_tr_func 1
3210EOF
3211
3212else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003213 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003214fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003215done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003216
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003217
3218# check for long file support functions
3219for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003220do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003221echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003222echo "configure:3223: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003223if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3224 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225else
3226 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003227#line 3228 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003228#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003229/* System header to define __stub macros and hopefully few prototypes,
3230 which can conflict with char $ac_func(); below. */
3231#include <assert.h>
3232/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003233/* We use char because int might match the return type of a gcc2
3234 builtin and then its argument prototype would still apply. */
3235char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003236
Guido van Rossumf78abae1997-01-21 22:02:36 +00003237int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003238
Guido van Rossum627b2d71993-12-24 10:39:16 +00003239/* The GNU C library defines this for functions which it implements
3240 to always fail with ENOSYS. Some functions are actually named
3241 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003242#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003243choke me
3244#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003245$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003246#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003247
Guido van Rossum7f43da71994-08-01 12:15:30 +00003248; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003249EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003250if { (eval echo configure:3251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003251 rm -rf conftest*
3252 eval "ac_cv_func_$ac_func=yes"
3253else
3254 echo "configure: failed program was:" >&5
3255 cat conftest.$ac_ext >&5
3256 rm -rf conftest*
3257 eval "ac_cv_func_$ac_func=no"
3258fi
3259rm -f conftest*
3260fi
3261
3262if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3263 echo "$ac_t""yes" 1>&6
3264 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3265 cat >> confdefs.h <<EOF
3266#define $ac_tr_func 1
3267EOF
3268
3269else
3270 echo "$ac_t""no" 1>&6
3271fi
3272done
3273
3274
3275for ac_func in dup2 getcwd strdup strerror memmove
3276do
3277echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003278echo "configure:3279: checking for $ac_func" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003279if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3280 echo $ac_n "(cached) $ac_c" 1>&6
3281else
3282 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003283#line 3284 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003284#include "confdefs.h"
3285/* System header to define __stub macros and hopefully few prototypes,
3286 which can conflict with char $ac_func(); below. */
3287#include <assert.h>
3288/* Override any gcc2 internal prototype to avoid an error. */
3289/* We use char because int might match the return type of a gcc2
3290 builtin and then its argument prototype would still apply. */
3291char $ac_func();
3292
3293int main() {
3294
3295/* The GNU C library defines this for functions which it implements
3296 to always fail with ENOSYS. Some functions are actually named
3297 something starting with __ and the normal name is an alias. */
3298#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3299choke me
3300#else
3301$ac_func();
3302#endif
3303
3304; return 0; }
3305EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003306if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003307 rm -rf conftest*
3308 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003309else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003310 echo "configure: failed program was:" >&5
3311 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003312 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003313 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003314fi
3315rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003317
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003318if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003319 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003320 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3321 cat >> confdefs.h <<EOF
3322#define $ac_tr_func 1
3323EOF
3324
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003325else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003326 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003327LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329done
3330
Guido van Rossumf78abae1997-01-21 22:02:36 +00003331
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003332echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003333echo "configure:3334: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003334if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
3335 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336else
3337 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003338#line 3339 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003339#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003340/* System header to define __stub macros and hopefully few prototypes,
3341 which can conflict with char getpgrp(); below. */
3342#include <assert.h>
3343/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003344/* We use char because int might match the return type of a gcc2
3345 builtin and then its argument prototype would still apply. */
3346char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003347
Guido van Rossumf78abae1997-01-21 22:02:36 +00003348int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003349
Guido van Rossum627b2d71993-12-24 10:39:16 +00003350/* The GNU C library defines this for functions which it implements
3351 to always fail with ENOSYS. Some functions are actually named
3352 something starting with __ and the normal name is an alias. */
3353#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
3354choke me
3355#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003356getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003357#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358
3359; return 0; }
3360EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003361if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003362 rm -rf conftest*
3363 eval "ac_cv_func_getpgrp=yes"
3364else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003365 echo "configure: failed program was:" >&5
3366 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003367 rm -rf conftest*
3368 eval "ac_cv_func_getpgrp=no"
3369fi
3370rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003373if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003374 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003375 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003376#line 3377 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003377#include "confdefs.h"
3378#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003379int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003380getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003381; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003382EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003383if { (eval echo configure:3384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003384 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385 cat >> confdefs.h <<\EOF
3386#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003387EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003388
Guido van Rossumf78abae1997-01-21 22:02:36 +00003389else
3390 echo "configure: failed program was:" >&5
3391 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003392fi
3393rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003394else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003395 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003396fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003397
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003398echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003399echo "configure:3400: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003400if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
3401 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003402else
3403 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003404#line 3405 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003405#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003406/* System header to define __stub macros and hopefully few prototypes,
3407 which can conflict with char setpgrp(); below. */
3408#include <assert.h>
3409/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003410/* We use char because int might match the return type of a gcc2
3411 builtin and then its argument prototype would still apply. */
3412char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003413
Guido van Rossumf78abae1997-01-21 22:02:36 +00003414int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003415
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003416/* The GNU C library defines this for functions which it implements
3417 to always fail with ENOSYS. Some functions are actually named
3418 something starting with __ and the normal name is an alias. */
3419#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
3420choke me
3421#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003422setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003423#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003424
3425; return 0; }
3426EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003427if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003428 rm -rf conftest*
3429 eval "ac_cv_func_setpgrp=yes"
3430else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003431 echo "configure: failed program was:" >&5
3432 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003433 rm -rf conftest*
3434 eval "ac_cv_func_setpgrp=no"
3435fi
3436rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003437fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003439if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003440 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003441 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003442#line 3443 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003443#include "confdefs.h"
3444#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003445int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003446setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003447; return 0; }
3448EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003449if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003450 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003451 cat >> confdefs.h <<\EOF
3452#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003453EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003454
Guido van Rossumf78abae1997-01-21 22:02:36 +00003455else
3456 echo "configure: failed program was:" >&5
3457 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003458fi
3459rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003460else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003461 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003462fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003463
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003464echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003465echo "configure:3466: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003466if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3467 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003468else
3469 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003470#line 3471 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003471#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003472/* System header to define __stub macros and hopefully few prototypes,
3473 which can conflict with char gettimeofday(); below. */
3474#include <assert.h>
3475/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003476/* We use char because int might match the return type of a gcc2
3477 builtin and then its argument prototype would still apply. */
3478char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003479
Guido van Rossumf78abae1997-01-21 22:02:36 +00003480int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003481
3482/* The GNU C library defines this for functions which it implements
3483 to always fail with ENOSYS. Some functions are actually named
3484 something starting with __ and the normal name is an alias. */
3485#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3486choke me
3487#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003488gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003489#endif
3490
3491; return 0; }
3492EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003493if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003494 rm -rf conftest*
3495 eval "ac_cv_func_gettimeofday=yes"
3496else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003497 echo "configure: failed program was:" >&5
3498 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003499 rm -rf conftest*
3500 eval "ac_cv_func_gettimeofday=no"
3501fi
3502rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003503fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003504
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003505if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003506 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003507 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003508#line 3509 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003509#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003510#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003511int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003512gettimeofday((struct timeval*)0,(struct timezone*)0);
3513; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003514EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003515if { (eval echo configure:3516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003516 :
3517else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003518 echo "configure: failed program was:" >&5
3519 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003520 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003521 cat >> confdefs.h <<\EOF
3522#define GETTIMEOFDAY_NO_TZ 1
3523EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003524
3525fi
3526rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003527else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003528 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003529fi
3530
3531
3532# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003533echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003534echo "configure:3535: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003535if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3536 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003537else
3538 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003539#line 3540 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003540#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003541#include <sys/types.h>
3542#include <sys/time.h>
3543#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003544int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003545struct tm *tp;
3546; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003547EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003548if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003549 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003551else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003552 echo "configure: failed program was:" >&5
3553 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003554 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003555 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003556fi
3557rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003558fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003559
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003560echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003561if test $ac_cv_header_time = yes; then
3562 cat >> confdefs.h <<\EOF
3563#define TIME_WITH_SYS_TIME 1
3564EOF
3565
3566fi
3567
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003568echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003569echo "configure:3570: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003570if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3571 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003572else
3573 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003574#line 3575 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003575#include "confdefs.h"
3576#include <sys/types.h>
3577#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003578int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003579struct tm *tp; tp->tm_sec;
3580; return 0; }
3581EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003582if { (eval echo configure:3583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003583 rm -rf conftest*
3584 ac_cv_struct_tm=time.h
3585else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003586 echo "configure: failed program was:" >&5
3587 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003588 rm -rf conftest*
3589 ac_cv_struct_tm=sys/time.h
3590fi
3591rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003592fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003593
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003594echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003595if test $ac_cv_struct_tm = sys/time.h; then
3596 cat >> confdefs.h <<\EOF
3597#define TM_IN_SYS_TIME 1
3598EOF
3599
3600fi
3601
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003602echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003603echo "configure:3604: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003604if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3605 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003606else
3607 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003608#line 3609 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003609#include "confdefs.h"
3610#include <sys/types.h>
3611#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003612int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003613struct tm tm; tm.tm_zone;
3614; return 0; }
3615EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003616if { (eval echo configure:3617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003617 rm -rf conftest*
3618 ac_cv_struct_tm_zone=yes
3619else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003620 echo "configure: failed program was:" >&5
3621 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003622 rm -rf conftest*
3623 ac_cv_struct_tm_zone=no
3624fi
3625rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003626fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003627
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003628echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003629if test "$ac_cv_struct_tm_zone" = yes; then
3630 cat >> confdefs.h <<\EOF
3631#define HAVE_TM_ZONE 1
3632EOF
3633
3634else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003635 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003636echo "configure:3637: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003637if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3638 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003639else
3640 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003641#line 3642 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003642#include "confdefs.h"
3643#include <time.h>
3644#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003645extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003646#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003647int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003648atoi(*tzname);
3649; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003650EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003651if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003652 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003653 ac_cv_var_tzname=yes
3654else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003655 echo "configure: failed program was:" >&5
3656 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003657 rm -rf conftest*
3658 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003659fi
3660rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003661fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003662
3663echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003664 if test $ac_cv_var_tzname = yes; then
3665 cat >> confdefs.h <<\EOF
3666#define HAVE_TZNAME 1
3667EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003668
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003669 fi
3670fi
3671
3672
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003673echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003674echo "configure:3675: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003675if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3676 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003677else
3678 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003679#line 3680 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003680#include "confdefs.h"
3681#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003682int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003683return altzone;
3684; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003685EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003686if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003687 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003688 ac_cv_header_time_altzone=yes
3689else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003690 echo "configure: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003692 rm -rf conftest*
3693 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003694fi
3695rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003696fi
3697
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003698echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003699if test $ac_cv_header_time_altzone = yes; then
3700 cat >> confdefs.h <<\EOF
3701#define HAVE_ALTZONE 1
3702EOF
3703
3704fi
3705
Guido van Rossumda88dad1995-01-26 00:46:29 +00003706was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003707echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003708echo "configure:3709: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003709cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003710#line 3711 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003711#include "confdefs.h"
3712
3713#include <sys/types.h>
3714#include <sys/select.h>
3715#include <sys/time.h>
3716
Guido van Rossumf78abae1997-01-21 22:02:36 +00003717int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003718;
3719; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003720EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003721if { (eval echo configure:3722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003722 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003723 cat >> confdefs.h <<\EOF
3724#define SYS_SELECT_WITH_SYS_TIME 1
3725EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003726 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003727else
3728 echo "configure: failed program was:" >&5
3729 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003730fi
3731rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003732echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003733
3734# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003736echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003737echo "configure:3738: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003738if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3739 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003740else
3741 if test "$GCC" = yes; then
3742 # GCC predefines this symbol on systems where it applies.
3743cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003744#line 3745 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745#include "confdefs.h"
3746#ifdef __CHAR_UNSIGNED__
3747 yes
3748#endif
3749
3750EOF
3751if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3752 egrep "yes" >/dev/null 2>&1; then
3753 rm -rf conftest*
3754 ac_cv_c_char_unsigned=yes
3755else
3756 rm -rf conftest*
3757 ac_cv_c_char_unsigned=no
3758fi
3759rm -f conftest*
3760
3761else
3762if test "$cross_compiling" = yes; then
3763 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3764else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003765 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003766#line 3767 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003767#include "confdefs.h"
3768/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003769#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003770#define volatile
3771#endif
3772main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003773 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003774}
3775EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003776if { (eval echo configure:3777: \"$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 +00003777then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003778 ac_cv_c_char_unsigned=yes
3779else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003780 echo "configure: failed program was:" >&5
3781 cat conftest.$ac_ext >&5
3782 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003783 ac_cv_c_char_unsigned=no
3784fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003785rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003786fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003787
3788fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003789fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003791echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003792if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3793 cat >> confdefs.h <<\EOF
3794#define __CHAR_UNSIGNED__ 1
3795EOF
3796
3797fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003798
3799
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003800echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003801echo "configure:3802: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003802if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3803 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003804else
3805 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003806#line 3807 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807#include "confdefs.h"
3808
Guido van Rossumf78abae1997-01-21 22:02:36 +00003809int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003810
3811/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003812typedef int charset[2]; const charset x;
3813/* SunOS 4.1.1 cc rejects this. */
3814char const *const *ccp;
3815char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003816/* NEC SVR4.0.2 mips cc rejects this. */
3817struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003818static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003819/* AIX XL C 1.02.0.0 rejects this.
3820 It does not let you subtract one const X* pointer from another in an arm
3821 of an if-expression whose if-part is not a constant expression */
3822const char *g = "string";
3823ccp = &g + (g ? g-g : 0);
3824/* HPUX 7.0 cc rejects these. */
3825++ccp;
3826p = (char**) ccp;
3827ccp = (char const *const *) p;
3828{ /* SCO 3.2v4 cc rejects this. */
3829 char *t;
3830 char const *s = 0 ? (char *) 0 : (char const *) 0;
3831
3832 *t++ = 0;
3833}
3834{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003835 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003836 const int *foo = &x[0];
3837 ++foo;
3838}
3839{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3840 typedef const int *iptr;
3841 iptr p = 0;
3842 ++p;
3843}
3844{ /* AIX XL C 1.02.0.0 rejects this saying
3845 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3846 struct s { int j; const int *ap[3]; };
3847 struct s *b; b->j = 5;
3848}
3849{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3850 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851}
3852
3853; return 0; }
3854EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003855if { (eval echo configure:3856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003856 rm -rf conftest*
3857 ac_cv_c_const=yes
3858else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003859 echo "configure: failed program was:" >&5
3860 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861 rm -rf conftest*
3862 ac_cv_c_const=no
3863fi
3864rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003865fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003866
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003867echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868if test $ac_cv_c_const = no; then
3869 cat >> confdefs.h <<\EOF
3870#define const
3871EOF
3872
3873fi
3874
3875
Guido van Rossumda88dad1995-01-26 00:46:29 +00003876works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003877echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003878echo "configure:3879: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003879cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003880#line 3881 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003881#include "confdefs.h"
3882
Guido van Rossumf78abae1997-01-21 22:02:36 +00003883int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884volatile int x; x = 0;
3885; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003886EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003887if { (eval echo configure:3888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003888 rm -rf conftest*
3889 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003890else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003891 echo "configure: failed program was:" >&5
3892 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003893 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003894 cat >> confdefs.h <<\EOF
3895#define volatile
3896EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003897
3898fi
3899rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003900echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003901
Guido van Rossumda88dad1995-01-26 00:46:29 +00003902works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003903echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003904echo "configure:3905: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003905cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003906#line 3907 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003907#include "confdefs.h"
3908
Guido van Rossumf78abae1997-01-21 22:02:36 +00003909int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910signed char c;
3911; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003912EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003913if { (eval echo configure:3914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003914 rm -rf conftest*
3915 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003916else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003917 echo "configure: failed program was:" >&5
3918 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003919 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920 cat >> confdefs.h <<\EOF
3921#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003922EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003923
3924fi
3925rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003926echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003927
Guido van Rossumda88dad1995-01-26 00:46:29 +00003928have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003929echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003930echo "configure:3931: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003931cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003932#line 3933 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003933#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003934int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003935int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936return foo(10);
3937; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003938EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003939if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940 rm -rf conftest*
3941 cat >> confdefs.h <<\EOF
3942#define HAVE_PROTOTYPES 1
3943EOF
3944 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003945else
3946 echo "configure: failed program was:" >&5
3947 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003948fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003950echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003951
Guido van Rossumda88dad1995-01-26 00:46:29 +00003952works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003953echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003954echo "configure:3955: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003955cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003956#line 3957 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003957#include "confdefs.h"
3958
3959#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003960int foo(int x, ...) {
3961 va_list va;
3962 va_start(va, x);
3963 va_arg(va, int);
3964 va_arg(va, char *);
3965 va_arg(va, double);
3966 return 0;
3967}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003968
Guido van Rossumf78abae1997-01-21 22:02:36 +00003969int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003970return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003972EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003973if { (eval echo configure:3974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003974 rm -rf conftest*
3975 cat >> confdefs.h <<\EOF
3976#define HAVE_STDARG_PROTOTYPES 1
3977EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003978 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003979else
3980 echo "configure: failed program was:" >&5
3981 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003982fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003984echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003985
Guido van Rossumda88dad1995-01-26 00:46:29 +00003986if test "$have_prototypes" = yes; then
3987bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003988echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003989echo "configure:3990: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003990cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003991#line 3992 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003992#include "confdefs.h"
3993#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003994int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003995char **t;execve("@",t,t);
3996; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003997EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00003998if { (eval echo configure:3999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003999 :
4000else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004001 echo "configure: failed program was:" >&5
4002 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004004 cat >> confdefs.h <<\EOF
4005#define BAD_EXEC_PROTOTYPES 1
4006EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004007 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004008fi
4009rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004010echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004011fi
4012
Guido van Rossumda88dad1995-01-26 00:46:29 +00004013bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004014echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004015echo "configure:4016: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004016if test "$cross_compiling" = yes; then
4017 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4018else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004019 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004020#line 4021 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004021#include "confdefs.h"
4022
4023struct s { int a; int b; };
4024static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004025int foobar() {
4026 static int random;
4027 random = (int) &foo;
4028 return random;
4029}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004030static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031main() {
4032 exit(!((int)&foo == foobar()));
4033}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004034
4035EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004036if { (eval echo configure:4037: \"$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 +00004037then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004038 :
4039else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004040 echo "configure: failed program was:" >&5
4041 cat conftest.$ac_ext >&5
4042 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004043 cat >> confdefs.h <<\EOF
4044#define BAD_STATIC_FORWARD 1
4045EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004046 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004047fi
4048rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004049fi
4050
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004051echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004052
Guido van Rossumda88dad1995-01-26 00:46:29 +00004053va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004054echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004055echo "configure:4056: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004057#line 4058 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058#include "confdefs.h"
4059
4060#ifdef HAVE_STDARG_PROTOTYPES
4061#include <stdarg.h>
4062#else
4063#include <varargs.h>
4064#endif
4065
Guido van Rossumf78abae1997-01-21 22:02:36 +00004066int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004067va_list list1, list2; list1 = list2;
4068; return 0; }
4069EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004070if { (eval echo configure:4071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004071 :
4072else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004073 echo "configure: failed program was:" >&5
4074 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004075 rm -rf conftest*
4076 cat >> confdefs.h <<\EOF
4077#define VA_LIST_IS_ARRAY 1
4078EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004079 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004080fi
4081rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004082echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083
Guido van Rossum627b2d71993-12-24 10:39:16 +00004084# checks for system services
4085# (none yet)
4086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00004088echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004089echo "configure:4090: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004090ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004091if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004092 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004093else
4094 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004095LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004097#line 4098 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004098#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004099/* Override any gcc2 internal prototype to avoid an error. */
4100/* We use char because int might match the return type of a gcc2
4101 builtin and then its argument prototype would still apply. */
4102char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004103
Guido van Rossumf78abae1997-01-21 22:02:36 +00004104int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004105__fpu_control()
4106; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004107EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004108if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004109 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004110 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004111else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004112 echo "configure: failed program was:" >&5
4113 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004114 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004115 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004116fi
4117rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004118LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004120fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004121if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004122 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004123 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4124 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004125 cat >> confdefs.h <<EOF
4126#define $ac_tr_lib 1
4127EOF
4128
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004129 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004130
4131else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004132 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004133fi
4134
4135
Guido van Rossum7f253911997-05-09 02:42:48 +00004136# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00004137echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004138echo "configure:4139: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00004139# Check whether --with-fpectl or --without-fpectl was given.
4140if test "${with_fpectl+set}" = set; then
4141 withval="$with_fpectl"
4142
4143if test "$withval" != no
4144then cat >> confdefs.h <<\EOF
4145#define WANT_SIGFPE_HANDLER 1
4146EOF
4147 echo "$ac_t""yes" 1>&6
4148else echo "$ac_t""no" 1>&6
4149fi
4150fi
4151
4152
Guido van Rossum7f43da71994-08-01 12:15:30 +00004153# check for --with-libm=...
4154
Guido van Rossum563e7081996-09-10 18:20:48 +00004155case $ac_sys_system in
4156next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004157BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00004158*) LIBM=-lm
4159esac
Guido van Rossum7f253911997-05-09 02:42:48 +00004160echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004161echo "configure:4162: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004163if test "${with_libm+set}" = set; then
4164 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004165
Guido van Rossum7f253911997-05-09 02:42:48 +00004166if test "$withval" = no
4167then LIBM=
4168 echo "$ac_t""force LIBM empty" 1>&6
4169elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004170then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004171 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004173fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004174else
4175 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004176fi
4177
4178
4179# check for --with-libc=...
4180
Guido van Rossum7f253911997-05-09 02:42:48 +00004181echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004182echo "configure:4183: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004184if test "${with_libc+set}" = set; then
4185 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186
Guido van Rossum7f253911997-05-09 02:42:48 +00004187if test "$withval" = no
4188then LIBC=
4189 echo "$ac_t""force LIBC empty" 1>&6
4190elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004191then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004192 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004194fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004195else
4196 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004197fi
4198
4199
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004200# check for hypot() in math library
4201LIBS_SAVE=$LIBS
4202LIBS="$LIBS $LIBM"
4203for ac_func in hypot
4204do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004205echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004206echo "configure:4207: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004207if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4208 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004209else
4210 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004211#line 4212 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004212#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004213/* System header to define __stub macros and hopefully few prototypes,
4214 which can conflict with char $ac_func(); below. */
4215#include <assert.h>
4216/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004217/* We use char because int might match the return type of a gcc2
4218 builtin and then its argument prototype would still apply. */
4219char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004220
Guido van Rossumf78abae1997-01-21 22:02:36 +00004221int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004222
4223/* The GNU C library defines this for functions which it implements
4224 to always fail with ENOSYS. Some functions are actually named
4225 something starting with __ and the normal name is an alias. */
4226#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4227choke me
4228#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004229$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004230#endif
4231
4232; return 0; }
4233EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004234if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004235 rm -rf conftest*
4236 eval "ac_cv_func_$ac_func=yes"
4237else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004240 rm -rf conftest*
4241 eval "ac_cv_func_$ac_func=no"
4242fi
4243rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004244fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004245
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004246if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004247 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004248 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004249 cat >> confdefs.h <<EOF
4250#define $ac_tr_func 1
4251EOF
4252
4253else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004254 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004255fi
4256done
4257
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004258for ac_func in hypot
4259do
4260echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004261echo "configure:4262: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004262if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4263 echo $ac_n "(cached) $ac_c" 1>&6
4264else
4265 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004266#line 4267 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004267#include "confdefs.h"
4268/* System header to define __stub macros and hopefully few prototypes,
4269 which can conflict with char $ac_func(); below. */
4270#include <assert.h>
4271/* Override any gcc2 internal prototype to avoid an error. */
4272/* We use char because int might match the return type of a gcc2
4273 builtin and then its argument prototype would still apply. */
4274char $ac_func();
4275
Guido van Rossumf78abae1997-01-21 22:02:36 +00004276int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004277
4278/* The GNU C library defines this for functions which it implements
4279 to always fail with ENOSYS. Some functions are actually named
4280 something starting with __ and the normal name is an alias. */
4281#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4282choke me
4283#else
4284$ac_func();
4285#endif
4286
4287; return 0; }
4288EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004289if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004290 rm -rf conftest*
4291 eval "ac_cv_func_$ac_func=yes"
4292else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004293 echo "configure: failed program was:" >&5
4294 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004295 rm -rf conftest*
4296 eval "ac_cv_func_$ac_func=no"
4297fi
4298rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004299fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004300
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004301if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4302 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004303 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4304 cat >> confdefs.h <<EOF
4305#define $ac_tr_func 1
4306EOF
4307
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004308else
4309 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004310LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004311fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004312done
4313
Guido van Rossumf78abae1997-01-21 22:02:36 +00004314
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004315LIBS=$LIBS_SAVE
4316
Guido van Rossumda88dad1995-01-26 00:46:29 +00004317# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004318echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004319echo "configure:4320: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004320if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
4321 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004322else
4323 if test "$cross_compiling" = yes; then
4324 ac_cv_func_getopt=no
4325else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004326 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004327#line 4328 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004328#include "confdefs.h"
4329#include <stdio.h>
4330extern int optind, opterr, getopt();
4331extern char* optarg;
4332int main() {
4333 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
4334 opterr = 0;
4335 if (getopt(3, av, "f:") == 'f') { exit(1); }
4336 exit(0);
4337}
4338EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004339if { (eval echo configure:4340: \"$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 +00004340then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004341 ac_cv_func_getopt=yes
4342else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004343 echo "configure: failed program was:" >&5
4344 cat conftest.$ac_ext >&5
4345 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00004346 ac_cv_func_getopt=no
4347fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004348rm -fr conftest*
4349fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004350
4351fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004352echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004353test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
4354
Guido van Rossumad713701997-07-10 22:42:38 +00004355# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00004356echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004357echo "configure:4358: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00004358if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
4359 echo $ac_n "(cached) $ac_c" 1>&6
4360else
4361 if test "$cross_compiling" = yes; then
4362 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4363else
4364 cat > conftest.$ac_ext <<EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004365#line 4366 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00004366#include "confdefs.h"
4367#include <stdio.h>
4368#ifdef HAVE_STDLIB
4369#include <stdlib.h>
4370#else
4371char *malloc(), *realloc();
4372int *free();
4373#endif
4374main() {
4375 char *p;
4376 p = malloc(0);
4377 if (p == NULL) exit(1);
4378 p = realloc(p, 0);
4379 if (p == NULL) exit(1);
4380 free(p);
4381 exit(0);
4382}
4383EOF
Guido van Rossum79e8f1b1999-02-23 18:07:51 +00004384if { (eval echo configure:4385: \"$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 +00004385then
4386 ac_cv_malloc_zero=nonnull
4387else
4388 echo "configure: failed program was:" >&5
4389 cat conftest.$ac_ext >&5
4390 rm -fr conftest*
4391 ac_cv_malloc_zero=null
4392fi
4393rm -fr conftest*
4394fi
4395
4396fi
4397
4398echo "$ac_t""$ac_cv_malloc_zero" 1>&6
4399if test "$ac_cv_malloc_zero" = null
4400then
4401 cat >> confdefs.h <<\EOF
4402#define MALLOC_ZERO_RETURNS_NULL 1
4403EOF
4404
4405fi
4406
Guido van Rossum627b2d71993-12-24 10:39:16 +00004407# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004408trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004409cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004410# This file is a shell script that caches the results of configure
4411# tests run on this system so they can be shared between configure
4412# scripts and configure runs. It is not useful on other systems.
4413# If it contains results you don't want to keep, you may remove or edit it.
4414#
4415# By default, configure uses ./config.cache as the cache file,
4416# creating it if it does not exist already. You can give configure
4417# the --cache-file=FILE option to use a different cache file; that is
4418# what configure does when it calls configure scripts in
4419# subdirectories, so they share the cache.
4420# Giving --cache-file=/dev/null disables caching, for debugging configure.
4421# config.status only pays attention to the cache file if you give it the
4422# --recheck option to rerun configure.
4423#
4424EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004425# The following way of writing the cache mishandles newlines in values,
4426# but we know of no workaround that is simple, portable, and efficient.
4427# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004428# Ultrix sh set writes to stderr and can't be redirected directly,
4429# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004431 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004432 *ac_space=\ *)
4433 # `set' does not quote correctly, so add quotes (double-quote substitution
4434 # turns \\\\ into \\, and sed turns \\ into \).
4435 sed -n \
4436 -e "s/'/'\\\\''/g" \
4437 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4438 ;;
4439 *)
4440 # `set' quotes correctly as required by POSIX, so do not add quotes.
4441 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4442 ;;
4443 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004444if cmp -s $cache_file confcache; then
4445 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004446else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004447 if test -w $cache_file; then
4448 echo "updating cache $cache_file"
4449 cat confcache > $cache_file
4450 else
4451 echo "not updating unwritable cache $cache_file"
4452 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004453fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004454rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00004455
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004456trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004457
4458test "x$prefix" = xNONE && prefix=$ac_default_prefix
4459# Let make expand exec_prefix.
4460test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00004461
Guido van Rossum7f43da71994-08-01 12:15:30 +00004462# Any assignment to VPATH causes Sun make to only execute
4463# the first set of double-colon rules, so remove it if not needed.
4464# If there is a colon in the path, we need to keep it.
4465if test "x$srcdir" = x.; then
4466 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4467fi
4468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004469trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00004470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004471DEFS=-DHAVE_CONFIG_H
4472
4473# Without the "./", some shells look in PATH for config.status.
4474: ${CONFIG_STATUS=./config.status}
4475
4476echo creating $CONFIG_STATUS
4477rm -f $CONFIG_STATUS
4478cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004479#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00004480# Generated automatically by configure.
4481# Run this file to recreate the current configuration.
4482# This directory was configured as follows,
4483# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4484#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004485# $0 $ac_configure_args
4486#
4487# Compiler output produced by configure, useful for debugging
4488# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00004489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004490ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004491for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00004492do
Guido van Rossum7f43da71994-08-01 12:15:30 +00004493 case "\$ac_option" in
4494 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004495 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4496 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00004497 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004498 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004499 exit 0 ;;
4500 -help | --help | --hel | --he | --h)
4501 echo "\$ac_cs_usage"; exit 0 ;;
4502 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004503 esac
4504done
4505
Guido van Rossum7f43da71994-08-01 12:15:30 +00004506ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00004507
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004508trap 'rm -fr `echo "Makefile \
4509 Objects/Makefile \
4510 Parser/Makefile \
4511 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004512 Modules/Makefile.pre \
4513 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004514EOF
4515cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004516
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004517# Protect against being on the right side of a sed subst in config.status.
4518sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4519 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004520$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00004521$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004522s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523s%@CFLAGS@%$CFLAGS%g
4524s%@CPPFLAGS@%$CPPFLAGS%g
4525s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004526s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004527s%@DEFS@%$DEFS%g
4528s%@LDFLAGS@%$LDFLAGS%g
4529s%@LIBS@%$LIBS%g
4530s%@exec_prefix@%$exec_prefix%g
4531s%@prefix@%$prefix%g
4532s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004533s%@bindir@%$bindir%g
4534s%@sbindir@%$sbindir%g
4535s%@libexecdir@%$libexecdir%g
4536s%@datadir@%$datadir%g
4537s%@sysconfdir@%$sysconfdir%g
4538s%@sharedstatedir@%$sharedstatedir%g
4539s%@localstatedir@%$localstatedir%g
4540s%@libdir@%$libdir%g
4541s%@includedir@%$includedir%g
4542s%@oldincludedir@%$oldincludedir%g
4543s%@infodir@%$infodir%g
4544s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00004545s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004546s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00004547s%@SGI_ABI@%$SGI_ABI%g
4548s%@SET_CCC@%$SET_CCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004549s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004550s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
4551s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004552s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004553s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004554s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004555s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00004556s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4557s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004558s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004559s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004560s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004561s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00004562s%@SO@%$SO%g
4563s%@LDSHARED@%$LDSHARED%g
4564s%@CCSHARED@%$CCSHARED%g
4565s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00004566s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00004567s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004568s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004569s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004570s%@LIBM@%$LIBM%g
4571s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572
4573CEOF
4574EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004575
4576cat >> $CONFIG_STATUS <<\EOF
4577
4578# Split the substitutions into bite-sized pieces for seds with
4579# small command number limits, like on Digital OSF/1 and HP-UX.
4580ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4581ac_file=1 # Number of current file.
4582ac_beg=1 # First line for current file.
4583ac_end=$ac_max_sed_cmds # Line after last line for current file.
4584ac_more_lines=:
4585ac_sed_cmds=""
4586while $ac_more_lines; do
4587 if test $ac_beg -gt 1; then
4588 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4589 else
4590 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4591 fi
4592 if test ! -s conftest.s$ac_file; then
4593 ac_more_lines=false
4594 rm -f conftest.s$ac_file
4595 else
4596 if test -z "$ac_sed_cmds"; then
4597 ac_sed_cmds="sed -f conftest.s$ac_file"
4598 else
4599 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4600 fi
4601 ac_file=`expr $ac_file + 1`
4602 ac_beg=$ac_end
4603 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4604 fi
4605done
4606if test -z "$ac_sed_cmds"; then
4607 ac_sed_cmds=cat
4608fi
4609EOF
4610
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004611cat >> $CONFIG_STATUS <<EOF
4612
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004613CONFIG_FILES=\${CONFIG_FILES-"Makefile \
4614 Objects/Makefile \
4615 Parser/Makefile \
4616 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004617 Modules/Makefile.pre \
4618 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619EOF
4620cat >> $CONFIG_STATUS <<\EOF
4621for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004622 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004624 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4626 *) ac_file_in="${ac_file}.in" ;;
4627 esac
4628
Guido van Rossumf78abae1997-01-21 22:02:36 +00004629 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630
4631 # Remove last slash and all that follows it. Not all systems have dirname.
4632 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4633 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4634 # The file is in a subdirectory.
4635 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004636 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637 # A "../" for each directory in $ac_dir_suffix.
4638 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4639 else
4640 ac_dir_suffix= ac_dots=
4641 fi
4642
4643 case "$ac_given_srcdir" in
4644 .) srcdir=.
4645 if test -z "$ac_dots"; then top_srcdir=.
4646 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4647 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4648 *) # Relative path.
4649 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4650 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4651 esac
4652
Guido van Rossumf78abae1997-01-21 22:02:36 +00004653
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004654 echo creating "$ac_file"
4655 rm -f "$ac_file"
4656 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4657 case "$ac_file" in
4658 *Makefile*) ac_comsub="1i\\
4659# $configure_input" ;;
4660 *) ac_comsub= ;;
4661 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00004662
4663 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 +00004664 sed -e "$ac_comsub
4665s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004666s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004667s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00004668" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00004669fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00004670rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004672# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4673# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004674#
4675# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004676ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4677ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004678ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004679ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004680# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004681ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4682ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004683ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004684ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004685# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004686ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4687ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004688ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004689ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004690
Guido van Rossumf78abae1997-01-21 22:02:36 +00004691if test "${CONFIG_HEADERS+set}" != set; then
4692EOF
4693cat >> $CONFIG_STATUS <<EOF
4694 CONFIG_HEADERS="config.h"
4695EOF
4696cat >> $CONFIG_STATUS <<\EOF
4697fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004698for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004699 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004700 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004701 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004702 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4703 *) ac_file_in="${ac_file}.in" ;;
4704 esac
4705
Guido van Rossum7f43da71994-08-01 12:15:30 +00004706 echo creating $ac_file
4707
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004708 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00004709 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4710 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004711
4712EOF
4713
4714# Transform confdefs.h into a sed script conftest.vals that substitutes
4715# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004716# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004717# Protect against being in an unquoted here document in config.status.
4718rm -f conftest.vals
4719cat > conftest.hdr <<\EOF
4720s/[\\&%]/\\&/g
4721s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004722s%#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 +00004723s%ac_d%ac_u%gp
4724s%ac_u%ac_e%gp
4725EOF
4726sed -n -f conftest.hdr confdefs.h > conftest.vals
4727rm -f conftest.hdr
4728
4729# This sed command replaces #undef with comments. This is necessary, for
4730# example, in the case of _POSIX_SOURCE, which is predefined and required
4731# on some systems where configure will not decide to define it.
4732cat >> conftest.vals <<\EOF
4733s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4734EOF
4735
4736# Break up conftest.vals because some shells have a limit on
4737# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004738
4739rm -f conftest.tail
4740while :
4741do
4742 ac_lines=`grep -c . conftest.vals`
4743 # grep -c gives empty output for an empty file on some AIX systems.
4744 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4745 # Write a limited-size here document to conftest.frag.
4746 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4747 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4748 echo 'CEOF
4749 sed -f conftest.frag conftest.in > conftest.out
4750 rm -f conftest.in
4751 mv conftest.out conftest.in
4752' >> $CONFIG_STATUS
4753 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4754 rm -f conftest.vals
4755 mv conftest.tail conftest.vals
4756done
4757rm -f conftest.vals
4758
4759cat >> $CONFIG_STATUS <<\EOF
4760 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00004761 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004762 cat conftest.in >> conftest.h
4763 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00004764 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004765 echo "$ac_file is unchanged"
4766 rm -f conftest.h
4767 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004768 # Remove last slash and all that follows it. Not all systems have dirname.
4769 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4770 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4771 # The file is in a subdirectory.
4772 test ! -d "$ac_dir" && mkdir "$ac_dir"
4773 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004774 rm -f $ac_file
4775 mv conftest.h $ac_file
4776 fi
4777fi; done
4778
Guido van Rossumf78abae1997-01-21 22:02:36 +00004779EOF
4780cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004781
Guido van Rossumf78abae1997-01-21 22:02:36 +00004782EOF
4783cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004784
4785exit 0
4786EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004787chmod +x $CONFIG_STATUS
4788rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004789test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004790