blob: 40062cdf6bf23259f02e58912164edbf8933f9fc [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 Rossumccaf3b61996-12-06 21:19:16 +00003# From configure.in Revision: 1.40
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 Rossum48bdbfc1996-05-28 22:53:48 +00006# Generated automatically using autoconf version 2.10
7# 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 Rossum76be6ed1995-01-02 18:33:54 +000019--without-gcc never use gcc"
20ac_help="$ac_help
Guido van Rossuma68acba1996-07-31 17:36:39 +000021--with-libs='lib1 ...' link against additional libs"
22ac_help="$ac_help
Guido van Rossum2d38f911996-06-26 19:47:01 +000023--with-readline[=DIRECTORY] use GNU readline library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
25--with-thread[=DIRECTORY] make interpreter thread-safe"
26ac_help="$ac_help
27--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
28ac_help="$ac_help
29--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
30ac_help="$ac_help
31--with-libm=STRING math library"
32ac_help="$ac_help
33--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000034
Guido van Rossum7f43da71994-08-01 12:15:30 +000035# Initialize some variables set by options.
36# The variables have the same names as the options, with
37# dashes changed to underlines.
38build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000039cache_file=./config.cache
40exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000041host=NONE
42no_create=
43nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000044no_recursion=
45prefix=NONE
46program_prefix=NONE
47program_suffix=NONE
48program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000049silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000051srcdir=
52target=NONE
53verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000054x_includes=NONE
55x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000056bindir='${exec_prefix}/bin'
57sbindir='${exec_prefix}/sbin'
58libexecdir='${exec_prefix}/libexec'
59datadir='${prefix}/share'
60sysconfdir='${prefix}/etc'
61sharedstatedir='${prefix}/com'
62localstatedir='${prefix}/var'
63libdir='${exec_prefix}/lib'
64includedir='${prefix}/include'
65oldincludedir='/usr/include'
66infodir='${prefix}/info'
67mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068
69# Initialize some other variables.
70subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000071MFLAGS= MAKEFLAGS=
Guido van Rossum7f43da71994-08-01 12:15:30 +000072
73ac_prev=
74for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000075do
Guido van Rossum627b2d71993-12-24 10:39:16 +000076
Guido van Rossum7f43da71994-08-01 12:15:30 +000077 # If the previous option needs an argument, assign it.
78 if test -n "$ac_prev"; then
79 eval "$ac_prev=\$ac_option"
80 ac_prev=
81 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000082 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000083
Guido van Rossum7f43da71994-08-01 12:15:30 +000084 case "$ac_option" in
85 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
86 *) ac_optarg= ;;
87 esac
88
Guido van Rossum76be6ed1995-01-02 18:33:54 +000089 # Accept the important Cygnus configure options, so we can diagnose typos.
90
Guido van Rossum7f43da71994-08-01 12:15:30 +000091 case "$ac_option" in
92
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000093 -bindir | --bindir | --bindi | --bind | --bin | --bi)
94 ac_prev=bindir ;;
95 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
96 bindir="$ac_optarg" ;;
97
98 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +000099 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000100 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000101 build="$ac_optarg" ;;
102
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000103 -cache-file | --cache-file | --cache-fil | --cache-fi \
104 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
105 ac_prev=cache_file ;;
106 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
107 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
108 cache_file="$ac_optarg" ;;
109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000110 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111 ac_prev=datadir ;;
112 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113 | --da=*)
114 datadir="$ac_optarg" ;;
115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 -disable-* | --disable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000118 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000119 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000121 fi
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 eval "enable_${ac_feature}=no" ;;
124
125 -enable-* | --enable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000127 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000128 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000130 fi
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 case "$ac_option" in
133 *=*) ;;
134 *) ac_optarg=yes ;;
135 esac
136 eval "enable_${ac_feature}='$ac_optarg'" ;;
137
Guido van Rossum7f43da71994-08-01 12:15:30 +0000138 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
139 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
140 | --exec | --exe | --ex)
141 ac_prev=exec_prefix ;;
142 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
143 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
144 | --exec=* | --exe=* | --ex=*)
145 exec_prefix="$ac_optarg" ;;
146
147 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Obsolete; use --with-gas.
149 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000150
151 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000152 # Omit some internal or obsolete options to make the list less imposing.
153 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000154 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000155Usage: configure [options] [host]
156Options: [defaults in brackets after descriptions]
157Configuration:
158 --cache-file=FILE cache test results in FILE
159 --help print this message
160 --no-create do not create output files
161 --quiet, --silent do not print \`checking...' messages
162 --version print the version of autoconf that created configure
163Directory and file names:
164 --prefix=PREFIX install architecture-independent files in PREFIX
165 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000166 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000167 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000168 --bindir=DIR user executables in DIR [EPREFIX/bin]
169 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
170 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
171 --datadir=DIR read-only architecture-independent data in DIR
172 [PREFIX/share]
173 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
174 --sharedstatedir=DIR modifiable architecture-independent data in DIR
175 [PREFIX/com]
176 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
177 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
178 --includedir=DIR C header files in DIR [PREFIX/include]
179 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
180 --infodir=DIR info documentation in DIR [PREFIX/info]
181 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182 --srcdir=DIR find the sources in DIR [configure dir or ..]
183 --program-prefix=PREFIX prepend PREFIX to installed program names
184 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000185 --program-transform-name=PROGRAM
186 run sed PROGRAM on installed program names
187EOF
188 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000189Host type:
190 --build=BUILD configure for building on BUILD [BUILD=HOST]
191 --host=HOST configure for HOST [guessed]
192 --target=TARGET configure for TARGET [TARGET=HOST]
193Features and packages:
194 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
195 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
196 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
197 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
198 --x-includes=DIR X include files are in DIR
199 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000200EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000201 if test -n "$ac_help"; then
202 echo "--enable and --with options recognized:$ac_help"
203 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000204 exit 0 ;;
205
206 -host | --host | --hos | --ho)
207 ac_prev=host ;;
208 -host=* | --host=* | --hos=* | --ho=*)
209 host="$ac_optarg" ;;
210
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000211 -includedir | --includedir | --includedi | --included | --include \
212 | --includ | --inclu | --incl | --inc)
213 ac_prev=includedir ;;
214 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
215 | --includ=* | --inclu=* | --incl=* | --inc=*)
216 includedir="$ac_optarg" ;;
217
218 -infodir | --infodir | --infodi | --infod | --info | --inf)
219 ac_prev=infodir ;;
220 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
221 infodir="$ac_optarg" ;;
222
223 -libdir | --libdir | --libdi | --libd)
224 ac_prev=libdir ;;
225 -libdir=* | --libdir=* | --libdi=* | --libd=*)
226 libdir="$ac_optarg" ;;
227
228 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
229 | --libexe | --libex | --libe)
230 ac_prev=libexecdir ;;
231 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
232 | --libexe=* | --libex=* | --libe=*)
233 libexecdir="$ac_optarg" ;;
234
235 -localstatedir | --localstatedir | --localstatedi | --localstated \
236 | --localstate | --localstat | --localsta | --localst \
237 | --locals | --local | --loca | --loc | --lo)
238 ac_prev=localstatedir ;;
239 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
240 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
241 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
242 localstatedir="$ac_optarg" ;;
243
244 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
245 ac_prev=mandir ;;
246 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
247 mandir="$ac_optarg" ;;
248
Guido van Rossum7f43da71994-08-01 12:15:30 +0000249 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000250 # Obsolete; use --without-fp.
251 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000252
253 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
254 | --no-cr | --no-c)
255 no_create=yes ;;
256
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000257 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
258 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000260
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000261 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
262 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
263 | --oldin | --oldi | --old | --ol | --o)
264 ac_prev=oldincludedir ;;
265 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
266 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
267 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
268 oldincludedir="$ac_optarg" ;;
269
Guido van Rossum7f43da71994-08-01 12:15:30 +0000270 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
271 ac_prev=prefix ;;
272 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
273 prefix="$ac_optarg" ;;
274
275 -program-prefix | --program-prefix | --program-prefi | --program-pref \
276 | --program-pre | --program-pr | --program-p)
277 ac_prev=program_prefix ;;
278 -program-prefix=* | --program-prefix=* | --program-prefi=* \
279 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
280 program_prefix="$ac_optarg" ;;
281
282 -program-suffix | --program-suffix | --program-suffi | --program-suff \
283 | --program-suf | --program-su | --program-s)
284 ac_prev=program_suffix ;;
285 -program-suffix=* | --program-suffix=* | --program-suffi=* \
286 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
287 program_suffix="$ac_optarg" ;;
288
289 -program-transform-name | --program-transform-name \
290 | --program-transform-nam | --program-transform-na \
291 | --program-transform-n | --program-transform- \
292 | --program-transform | --program-transfor \
293 | --program-transfo | --program-transf \
294 | --program-trans | --program-tran \
295 | --progr-tra | --program-tr | --program-t)
296 ac_prev=program_transform_name ;;
297 -program-transform-name=* | --program-transform-name=* \
298 | --program-transform-nam=* | --program-transform-na=* \
299 | --program-transform-n=* | --program-transform-=* \
300 | --program-transform=* | --program-transfor=* \
301 | --program-transfo=* | --program-transf=* \
302 | --program-trans=* | --program-tran=* \
303 | --progr-tra=* | --program-tr=* | --program-t=*)
304 program_transform_name="$ac_optarg" ;;
305
306 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
307 | -silent | --silent | --silen | --sile | --sil)
308 silent=yes ;;
309
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000310 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
311 ac_prev=sbindir ;;
312 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
313 | --sbi=* | --sb=*)
314 sbindir="$ac_optarg" ;;
315
316 -sharedstatedir | --sharedstatedir | --sharedstatedi \
317 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
318 | --sharedst | --shareds | --shared | --share | --shar \
319 | --sha | --sh)
320 ac_prev=sharedstatedir ;;
321 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
322 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
323 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
324 | --sha=* | --sh=*)
325 sharedstatedir="$ac_optarg" ;;
326
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000327 -site | --site | --sit)
328 ac_prev=site ;;
329 -site=* | --site=* | --sit=*)
330 site="$ac_optarg" ;;
331
Guido van Rossum7f43da71994-08-01 12:15:30 +0000332 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
333 ac_prev=srcdir ;;
334 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
335 srcdir="$ac_optarg" ;;
336
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000337 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
338 | --syscon | --sysco | --sysc | --sys | --sy)
339 ac_prev=sysconfdir ;;
340 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
341 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
342 sysconfdir="$ac_optarg" ;;
343
Guido van Rossum7f43da71994-08-01 12:15:30 +0000344 -target | --target | --targe | --targ | --tar | --ta | --t)
345 ac_prev=target ;;
346 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
347 target="$ac_optarg" ;;
348
349 -v | -verbose | --verbose | --verbos | --verbo | --verb)
350 verbose=yes ;;
351
352 -version | --version | --versio | --versi | --vers)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000353 echo "configure generated by autoconf version 2.10"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354 exit 0 ;;
355
356 -with-* | --with-*)
357 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000358 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000361 fi
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 case "$ac_option" in
364 *=*) ;;
365 *) ac_optarg=yes ;;
366 esac
367 eval "with_${ac_package}='$ac_optarg'" ;;
368
369 -without-* | --without-*)
370 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
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 eval "with_${ac_package}=no" ;;
377
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000378 --x)
379 # Obsolete; use --with-x.
380 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381
382 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
383 | --x-incl | --x-inc | --x-in | --x-i)
384 ac_prev=x_includes ;;
385 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
386 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
387 x_includes="$ac_optarg" ;;
388
389 -x-libraries | --x-libraries | --x-librarie | --x-librari \
390 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
391 ac_prev=x_libraries ;;
392 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
393 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
394 x_libraries="$ac_optarg" ;;
395
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000396 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000397 ;;
398
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000399 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000400 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000401 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000403 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000404 { 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 +0000405 fi
406 nonopt="$ac_option"
407 ;;
408
409 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000410done
411
Guido van Rossum7f43da71994-08-01 12:15:30 +0000412if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000414fi
415
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000416trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000418# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000419# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000420# 1 file creation
421# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000422# 3 some systems may open it to /dev/tty
423# 4 used on the Kubota Titan
424# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000425# 5 compiler messages saved in config.log
426if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000427 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000429 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430fi
431exec 5>./config.log
432
433echo "\
434This file contains any messages produced by compilers while
435running configure, to aid debugging if configure makes a mistake.
436" 1>&5
437
438# Strip out --no-create and --no-recursion so they do not pile up.
439# Also quote any args containing shell metacharacters.
440ac_configure_args=
441for ac_arg
442do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000443 case "$ac_arg" in
444 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
445 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000446 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
447 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
448 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
449 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
450 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000451 esac
452done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000453
454# NLS nuisances.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455# Only set LANG and LC_ALL to C if already set.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000456# These must not be set unconditionally because not all systems understand
457# e.g. LANG=C (notably SCO).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000458if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
459if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000460
Guido van Rossum7f43da71994-08-01 12:15:30 +0000461# confdefs.h avoids OS command line length limits that DEFS can exceed.
462rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000463# AIX cpp loses on an empty file, so make sure it contains at least a newline.
464echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000465
466# A filename unique to this package, relative to the directory that
467# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000468ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000469
470# Find the source files, if location was not specified.
471if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000473 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000474 ac_prog=$0
475 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
476 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
477 srcdir=$ac_confdir
478 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000479 srcdir=..
480 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481else
482 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000484if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000485 if test "$ac_srcdir_defaulted" = yes; then
486 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000489 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000490fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
492
493# Prefer explicitly selected file to automatically selected ones.
494if test -z "$CONFIG_SITE"; then
495 if test "x$prefix" != xNONE; then
496 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
497 else
498 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 fi
500fi
501for ac_site_file in $CONFIG_SITE; do
502 if test -r "$ac_site_file"; then
503 echo "loading site script $ac_site_file"
504 . "$ac_site_file"
505 fi
506done
507
508if test -r "$cache_file"; then
509 echo "loading cache $cache_file"
510 . $cache_file
511else
512 echo "creating cache $cache_file"
513 > $cache_file
514fi
515
Guido van Rossum7f43da71994-08-01 12:15:30 +0000516ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000517# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000519ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
520ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000521
522if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
523 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
524 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
525 ac_n= ac_c='
526' ac_t=' '
527 else
528 ac_n=-n ac_c= ac_t=
529 fi
530else
531 ac_n= ac_c='\c' ac_t=
532fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000533
Guido van Rossum0a516c91994-09-12 10:58:40 +0000534
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000535
Guido van Rossum627b2d71993-12-24 10:39:16 +0000536
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000537# NEXTSTEP stuff
Guido van Rossum563e7081996-09-10 18:20:48 +0000538if test -f /usr/lib/NextStep/software_version; then
539
540 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
541 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000542if test "${with_next_archs+set}" = set; then
543 withval="$with_next_archs"
544
Guido van Rossum563e7081996-09-10 18:20:48 +0000545 if test -n "$withval"; then
546 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
547 # GCC does not currently support multi archs on the NeXT
548 with_gcc=no
549 fi
550 echo "$ac_t""$with_next_archs" 1>&6
551
552else
553 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000554fi
555
Guido van Rossum563e7081996-09-10 18:20:48 +0000556
557 if test -z "$MACHDEP"
558 then
559 set X `hostinfo | grep 'NeXT Mach.*:' | \
560 sed -e 's/://' -e 's/\./_/'` && \
561 ac_sys_system=next && ac_sys_release=$4
562
563 MACHDEP="$ac_sys_system$ac_sys_release"
564 fi
565fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000566
567# Set name for machine-dependent library files
568
569echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
570if test -z "$MACHDEP"
571then
Guido van Rossum563e7081996-09-10 18:20:48 +0000572 ac_sys_system=`uname -s`
573 if test "$ac_sys_system" = "AIX" ; then
574 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000575 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000576 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000577 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000578 ac_md_system=`echo $ac_sys_system |
579 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
580 ac_md_release=`echo $ac_sys_release |
581 tr -d '/ ' | sed 's/\..*//'`
582 MACHDEP="$ac_md_system$ac_md_release"
583
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000584 case MACHDEP in
585 '') MACHDEP=unknown;;
586 esac
587fi
588echo "$ac_t""$MACHDEP" 1>&6
589
Guido van Rossum627b2d71993-12-24 10:39:16 +0000590# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000591echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000592# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000593if test "${with_gcc+set}" = set; then
594 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595
596 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000597 no) CC=cc
598 without_gcc=yes;;
599 yes) CC=gcc
600 without_gcc=no;;
601 *) CC=$withval
602 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000603 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000604else
Guido van Rossume77438c1995-09-13 18:59:59 +0000605
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000606 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000607 OSF1) CC=cc
608 without_gcc=;;
609 *) without_gcc=no;;
610 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611fi
612
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000613echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000614
Guido van Rossum8b131c51995-03-09 14:10:13 +0000615# If the user switches compilers, we can't believe the cache
616if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
617then
618 { echo "configure: error: cached CC is different -- throw away $cache_file
619(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
620fi
621
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000622# Extract the first word of "gcc", so it can be a program name with args.
623set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000624echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
625if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
626 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000627else
628 if test -n "$CC"; then
629 ac_cv_prog_CC="$CC" # Let the user override the test.
630else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
632 for ac_dir in $PATH; do
633 test -z "$ac_dir" && ac_dir=.
634 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000635 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636 break
637 fi
638 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000639 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000640fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000641fi
642CC="$ac_cv_prog_CC"
643if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000644 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000645else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000646 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000647fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000648
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000649if test -z "$CC"; then
650 # Extract the first word of "cc", so it can be a program name with args.
651set dummy cc; ac_word=$2
652echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
653if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
654 echo $ac_n "(cached) $ac_c" 1>&6
655else
656 if test -n "$CC"; then
657 ac_cv_prog_CC="$CC" # Let the user override the test.
658else
659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
660 ac_prog_rejected=no
661 for ac_dir in $PATH; do
662 test -z "$ac_dir" && ac_dir=.
663 if test -f $ac_dir/$ac_word; then
664 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
665 ac_prog_rejected=yes
666 continue
667 fi
668 ac_cv_prog_CC="cc"
669 break
670 fi
671 done
672 IFS="$ac_save_ifs"
673if test $ac_prog_rejected = yes; then
674 # We found a bogon in the path, so make sure we never use it.
675 set dummy $ac_cv_prog_CC
676 shift
677 if test $# -gt 0; then
678 # We chose a different compiler from the bogus one.
679 # However, it has the same basename, so the bogon will be chosen
680 # first if we set CC to just the basename; use the full file name.
681 shift
682 set dummy "$ac_dir/$ac_word" "$@"
683 shift
684 ac_cv_prog_CC="$@"
685 fi
686fi
687fi
688fi
689CC="$ac_cv_prog_CC"
690if test -n "$CC"; then
691 echo "$ac_t""$CC" 1>&6
692else
693 echo "$ac_t""no" 1>&6
694fi
695
696 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
697fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000698
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000699echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
700if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
701 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000702else
703 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000704#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000705 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000706#endif
707EOF
Guido van Rossum563e7081996-09-10 18:20:48 +0000708if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000709 ac_cv_prog_gcc=yes
710else
711 ac_cv_prog_gcc=no
712fi
713fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000714
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000715echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000716if test $ac_cv_prog_gcc = yes; then
717 GCC=yes
718 if test "${CFLAGS+set}" != set; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000719 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
720if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
721 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000722else
723 echo 'void f(){}' > conftest.c
724if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
725 ac_cv_prog_gcc_g=yes
726else
727 ac_cv_prog_gcc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000728fi
729rm -f conftest*
730
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000731fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000732
733echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000734 if test $ac_cv_prog_gcc_g = yes; then
735 CFLAGS="-g -O"
736 else
737 CFLAGS="-O"
738 fi
739 fi
740else
741 GCC=
742 test "${CFLAGS+set}" = set || CFLAGS="-g"
743fi
744
745# Extract the first word of "ranlib", so it can be a program name with args.
746set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000747echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
748if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
749 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000750else
751 if test -n "$RANLIB"; then
752 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
753else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
755 for ac_dir in $PATH; do
756 test -z "$ac_dir" && ac_dir=.
757 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000759 break
760 fi
761 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000764fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765fi
766RANLIB="$ac_cv_prog_RANLIB"
767if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000768 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000770 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000771fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000772
773
Guido van Rossum7f43da71994-08-01 12:15:30 +0000774for ac_prog in ar aal
775do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776# Extract the first word of "$ac_prog", so it can be a program name with args.
777set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000778echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
779if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
780 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000781else
782 if test -n "$AR"; then
783 ac_cv_prog_AR="$AR" # Let the user override the test.
784else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
786 for ac_dir in $PATH; do
787 test -z "$ac_dir" && ac_dir=.
788 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000789 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790 break
791 fi
792 done
793 IFS="$ac_save_ifs"
794fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795fi
796AR="$ac_cv_prog_AR"
797if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000798 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000800 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802
803test -n "$AR" && break
804done
805test -n "$AR" || AR="ar"
806
807
Guido van Rossumda88dad1995-01-26 00:46:29 +0000808
809
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000810# Install just never works :-(
811if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000812then
813 INSTALL=cp
814 INSTALL_PROGRAM=cp
815 INSTALL_DATA=cp
816else
817 INSTALL_PROGRAM="$INSTALL"
818 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000819fi
820
821# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000822
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000823if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000824then
825 case $ac_sys_system in
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000826 *) OPT="-O";;
827 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000828fi
829
Guido van Rossum563e7081996-09-10 18:20:48 +0000830if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000831then
832 OPT="$OPT $ac_arch_flags"
833fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000835echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836# On Suns, sometimes $CPP names a directory.
837if test -n "$CPP" && test -d "$CPP"; then
838 CPP=
839fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000841if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843else
844 # This must be in double quotes, not single quotes, because CPP may get
845 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000846 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847 # On the NeXT, cc -E runs the code through the compiler's parser,
848 # not just through cpp.
849 cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +0000850#line 851 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000851#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000853Syntax Error
854EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum563e7081996-09-10 18:20:48 +0000856{ (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858if test -z "$ac_err"; then
859 :
860else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861 echo "$ac_err" >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862 rm -rf conftest*
863 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +0000865#line 866 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868Syntax Error
869EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum563e7081996-09-10 18:20:48 +0000871{ (eval echo configure:872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000874 :
875else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877 rm -rf conftest*
878 CPP=/lib/cpp
879fi
880rm -f conftest*
881fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884fi
Guido van Rossume77438c1995-09-13 18:59:59 +0000885 CPP="$ac_cv_prog_CPP"
886else
887 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000889echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000890
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000891echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +0000893#line 894 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894#include "confdefs.h"
895#ifdef _AIX
896 yes
897#endif
898
899EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
901 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000902 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000903 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904#define _ALL_SOURCE 1
905EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000906
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907else
908 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000909 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910fi
911rm -f conftest*
912
913
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914ac_safe=`echo "minix/config.h" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000915echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
916if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
917 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918else
919 cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +0000920#line 921 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921#include "confdefs.h"
922#include <minix/config.h>
923EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum563e7081996-09-10 18:20:48 +0000925{ (eval echo configure:926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000928 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000930else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 echo "$ac_err" >&5
932 rm -rf conftest*
933 eval "ac_cv_header_$ac_safe=no"
934fi
935rm -f conftest*
936fi
937if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000938 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 MINIX=yes
940else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000941 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +0000943fi
944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945if test "$MINIX" = yes; then
946 cat >> confdefs.h <<\EOF
947#define _POSIX_SOURCE 1
948EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000949
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 cat >> confdefs.h <<\EOF
951#define _POSIX_1_SOURCE 2
952EOF
953
954 cat >> confdefs.h <<\EOF
955#define _MINIX 1
956EOF
957
958fi
959
Guido van Rossumda88dad1995-01-26 00:46:29 +0000960
Guido van Rossum84e7b241996-08-19 21:59:00 +0000961# check for ANSI or K&R ("traditional") preprocessor
962echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
963cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +0000964#line 965 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +0000965#include "confdefs.h"
966
967#define spam(name, doc) {#name, &name, #name "() -- " doc}
968int foo;
969struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
970
971int main() { return 0; }
972int t() {
973;
974; return 0; }
975EOF
Guido van Rossum563e7081996-09-10 18:20:48 +0000976if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +0000977 rm -rf conftest*
978 cpp_type=ansi
979else
980 rm -rf conftest*
981 cat >> confdefs.h <<\EOF
982#define HAVE_OLD_CPP 1
983EOF
984 cpp_type=traditional
985fi
986rm -f conftest*
987
988echo "$ac_t""$cpp_type" 1>&6
989
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000990# checks for header files
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991# If we cannot run a trivial program, we must be cross compiling.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000992echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
993if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
994 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995else
996 if test "$cross_compiling" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000997 ac_cv_c_cross=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998else
999cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +00001000#line 1001 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001#include "confdefs.h"
1002main(){return(0);}
1003EOF
Guido van Rossum563e7081996-09-10 18:20:48 +00001004{ (eval echo configure:1005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005if test -s conftest && (./conftest; exit) 2>/dev/null; then
1006 ac_cv_c_cross=no
1007else
1008 ac_cv_c_cross=yes
1009fi
1010fi
1011rm -fr conftest*
1012fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001014echo "$ac_t""$ac_cv_c_cross" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015cross_compiling=$ac_cv_c_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001017echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1018if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1019 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020else
1021 cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +00001022#line 1023 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001023#include "confdefs.h"
1024#include <stdlib.h>
1025#include <stdarg.h>
1026#include <string.h>
1027#include <float.h>
1028EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum563e7081996-09-10 18:20:48 +00001030{ (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001033 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001034 ac_cv_header_stdc=yes
1035else
1036 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001037 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 ac_cv_header_stdc=no
1039fi
1040rm -f conftest*
1041
1042if test $ac_cv_header_stdc = yes; then
1043 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1044cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +00001045#line 1046 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001046#include "confdefs.h"
1047#include <string.h>
1048EOF
1049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1050 egrep "memchr" >/dev/null 2>&1; then
1051 :
1052else
1053 rm -rf conftest*
1054 ac_cv_header_stdc=no
1055fi
1056rm -f conftest*
1057
1058fi
1059
1060if test $ac_cv_header_stdc = yes; then
1061 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1062cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +00001063#line 1064 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064#include "confdefs.h"
1065#include <stdlib.h>
1066EOF
1067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1068 egrep "free" >/dev/null 2>&1; then
1069 :
1070else
1071 rm -rf conftest*
1072 ac_cv_header_stdc=no
1073fi
1074rm -f conftest*
1075
1076fi
1077
1078if test $ac_cv_header_stdc = yes; then
1079 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1080if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082else
1083cat > conftest.$ac_ext <<EOF
Guido van Rossum563e7081996-09-10 18:20:48 +00001084#line 1085 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001085#include "confdefs.h"
1086#include <ctype.h>
1087#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1088#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001090int main () { int i; for (i = 0; i < 256; i++)
1091if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1092exit (0); }
1093
1094EOF
Guido van Rossum563e7081996-09-10 18:20:48 +00001095{ (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001096if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097 :
1098else
1099 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001100fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001102rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001103fi
1104fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001106echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001107if test $ac_cv_header_stdc = yes; then
1108 cat >> confdefs.h <<\EOF
1109#define STDC_HEADERS 1
1110EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001111
1112fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001113
Guido van Rossum2d38f911996-06-26 19:47:01 +00001114for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h \
1115signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001116sys/audioio.h sys/file.h sys/lock.h \
1117sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001118sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001119do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001121echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1122if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1123 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001124else
1125 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001126#line 1127 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001129EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001130ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001131{ (eval echo configure:1132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001134 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 eval "ac_cv_header_$ac_safe=yes"
1136else
1137 echo "$ac_err" >&5
1138 rm -rf conftest*
1139 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001140fi
1141rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142fi
1143if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001144 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146 cat >> confdefs.h <<EOF
1147#define $ac_tr_hdr 1
1148EOF
1149
1150else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001151 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153done
1154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155ac_header_dirent=no
1156for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1157do
1158ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001159echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1160if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1161 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001162else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001164#line 1165 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165#include "confdefs.h"
1166#include <sys/types.h>
1167#include <$ac_hdr>
1168int main() { return 0; }
1169int t() {
1170DIR *dirp = 0;
1171; return 0; }
1172EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001173if { (eval echo configure:1174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 rm -rf conftest*
1175 eval "ac_cv_header_dirent_$ac_safe=yes"
1176else
1177 rm -rf conftest*
1178 eval "ac_cv_header_dirent_$ac_safe=no"
1179fi
1180rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181
1182fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001184 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186 cat >> confdefs.h <<EOF
1187#define $ac_tr_hdr 1
1188EOF
1189 ac_header_dirent=$ac_hdr; break
1190else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001191 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192fi
1193done
1194# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1195if test $ac_header_dirent = dirent.h; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001196echo $ac_n "checking for -ldir""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001197ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
1198if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001199 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200else
1201 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001202LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001204#line 1205 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001206/* Override any gcc2 internal prototype to avoid an error. */
1207/* We use char because int might match the return type of a gcc2
1208 builtin and then its argument prototype would still apply. */
1209char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210
1211int main() { return 0; }
1212int t() {
1213opendir()
1214; return 0; }
1215EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001216if { (eval echo configure:1217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001218 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219else
1220 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001221 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222fi
1223rm -f conftest*
1224LIBS="$ac_save_LIBS"
1225
1226fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001227if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001228 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229 LIBS="$LIBS -ldir"
1230else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001231 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232fi
1233
1234else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001235echo $ac_n "checking for -lx""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001236ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
1237if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001238 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239else
1240 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001241LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001243#line 1244 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001245/* Override any gcc2 internal prototype to avoid an error. */
1246/* We use char because int might match the return type of a gcc2
1247 builtin and then its argument prototype would still apply. */
1248char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249
1250int main() { return 0; }
1251int t() {
1252opendir()
1253; return 0; }
1254EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001255if { (eval echo configure:1256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001257 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001258else
1259 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001261fi
1262rm -f conftest*
1263LIBS="$ac_save_LIBS"
1264
1265fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001266if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001267 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268 LIBS="$LIBS -lx"
1269else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001270 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271fi
1272
1273fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
1275
1276# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001277was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001278echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001280#line 1281 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281#include "confdefs.h"
1282#include <time.h>
1283EOF
1284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1285 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001286 rm -rf conftest*
1287 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288else
1289 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290 cat >> confdefs.h <<\EOF
1291#define clock_t long
1292EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
1294fi
1295rm -f conftest*
1296
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001297echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001298
Guido van Rossum84e7b241996-08-19 21:59:00 +00001299# Add some code to confdefs.h so that the test for off_t works on SCO
1300cat >> confdefs.h <<\EOF
1301#if defined(SCO_DS)
1302#undef _OFF_T
1303#endif
1304EOF
1305
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001306echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1307if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1308 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309else
1310 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001311#line 1312 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312#include "confdefs.h"
1313#include <sys/types.h>
1314#if STDC_HEADERS
1315#include <stdlib.h>
1316#endif
1317EOF
1318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1319 egrep "mode_t" >/dev/null 2>&1; then
1320 rm -rf conftest*
1321 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322else
1323 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325fi
1326rm -f conftest*
1327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001329echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330if test $ac_cv_type_mode_t = no; then
1331 cat >> confdefs.h <<\EOF
1332#define mode_t int
1333EOF
1334
1335fi
1336
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001337echo $ac_n "checking for off_t""... $ac_c" 1>&6
1338if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1339 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340else
1341 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001342#line 1343 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343#include "confdefs.h"
1344#include <sys/types.h>
1345#if STDC_HEADERS
1346#include <stdlib.h>
1347#endif
1348EOF
1349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1350 egrep "off_t" >/dev/null 2>&1; then
1351 rm -rf conftest*
1352 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353else
1354 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001356fi
1357rm -f conftest*
1358
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001360echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001361if test $ac_cv_type_off_t = no; then
1362 cat >> confdefs.h <<\EOF
1363#define off_t long
1364EOF
1365
1366fi
1367
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001368echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1369if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371else
1372 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001373#line 1374 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374#include "confdefs.h"
1375#include <sys/types.h>
1376#if STDC_HEADERS
1377#include <stdlib.h>
1378#endif
1379EOF
1380if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1381 egrep "pid_t" >/dev/null 2>&1; then
1382 rm -rf conftest*
1383 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001384else
1385 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001386 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001387fi
1388rm -f conftest*
1389
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001391echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392if test $ac_cv_type_pid_t = no; then
1393 cat >> confdefs.h <<\EOF
1394#define pid_t int
1395EOF
1396
1397fi
1398
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001399echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1400if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1401 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402else
1403 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001404#line 1405 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001405#include "confdefs.h"
1406#include <sys/types.h>
1407#include <signal.h>
1408#ifdef signal
1409#undef signal
1410#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001411#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001412extern "C" void (*signal (int, void (*)(int)))(int);
1413#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001414void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001415#endif
1416
Guido van Rossum7f43da71994-08-01 12:15:30 +00001417int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001418int t() {
1419int i;
1420; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001421EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001422if { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001423 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001424 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001425else
1426 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001427 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001428fi
1429rm -f conftest*
1430
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001431fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001432
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001433echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001434cat >> confdefs.h <<EOF
1435#define RETSIGTYPE $ac_cv_type_signal
1436EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001438
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001439echo $ac_n "checking for size_t""... $ac_c" 1>&6
1440if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1441 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001442else
1443 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001444#line 1445 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001445#include "confdefs.h"
1446#include <sys/types.h>
1447#if STDC_HEADERS
1448#include <stdlib.h>
1449#endif
1450EOF
1451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1452 egrep "size_t" >/dev/null 2>&1; then
1453 rm -rf conftest*
1454 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001455else
1456 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001457 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001458fi
1459rm -f conftest*
1460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001462echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463if test $ac_cv_type_size_t = no; then
1464 cat >> confdefs.h <<\EOF
1465#define size_t unsigned
1466EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001467
1468fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001469
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1471if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1472 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001473else
1474 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001475#line 1476 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001476#include "confdefs.h"
1477#include <sys/types.h>
1478EOF
1479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1480 egrep "uid_t" >/dev/null 2>&1; then
1481 rm -rf conftest*
1482 ac_cv_type_uid_t=yes
1483else
1484 rm -rf conftest*
1485 ac_cv_type_uid_t=no
1486fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001487rm -f conftest*
1488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001489fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001490
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001491echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001492if test $ac_cv_type_uid_t = no; then
1493 cat >> confdefs.h <<\EOF
1494#define uid_t int
1495EOF
1496
1497 cat >> confdefs.h <<\EOF
1498#define gid_t int
1499EOF
1500
1501fi
1502
Guido van Rossum627b2d71993-12-24 10:39:16 +00001503
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001504echo $ac_n "checking size of int""... $ac_c" 1>&6
1505if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1506 echo $ac_n "(cached) $ac_c" 1>&6
1507else
1508 if test "$cross_compiling" = yes; then
1509 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1510else
1511cat > conftest.$ac_ext <<EOF
1512#line 1513 "configure"
1513#include "confdefs.h"
1514#include <stdio.h>
1515main()
1516{
1517 FILE *f=fopen("conftestval", "w");
1518 if (!f) exit(1);
1519 fprintf(f, "%d\n", sizeof(int));
1520 exit(0);
1521}
1522EOF
1523{ (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1524if test -s conftest && (./conftest; exit) 2>/dev/null; then
1525 ac_cv_sizeof_int=`cat conftestval`
1526else
1527 ac_cv_sizeof_int=0
1528fi
1529fi
1530rm -fr conftest*
1531fi
1532echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1533cat >> confdefs.h <<EOF
1534#define SIZEOF_INT $ac_cv_sizeof_int
1535EOF
1536
1537
1538echo $ac_n "checking size of long""... $ac_c" 1>&6
1539if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1540 echo $ac_n "(cached) $ac_c" 1>&6
1541else
1542 if test "$cross_compiling" = yes; then
1543 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1544else
1545cat > conftest.$ac_ext <<EOF
1546#line 1547 "configure"
1547#include "confdefs.h"
1548#include <stdio.h>
1549main()
1550{
1551 FILE *f=fopen("conftestval", "w");
1552 if (!f) exit(1);
1553 fprintf(f, "%d\n", sizeof(long));
1554 exit(0);
1555}
1556EOF
1557{ (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1558if test -s conftest && (./conftest; exit) 2>/dev/null; then
1559 ac_cv_sizeof_long=`cat conftestval`
1560else
1561 ac_cv_sizeof_long=0
1562fi
1563fi
1564rm -fr conftest*
1565fi
1566echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1567cat >> confdefs.h <<EOF
1568#define SIZEOF_LONG $ac_cv_sizeof_long
1569EOF
1570
1571
Guido van Rossum0a516c91994-09-12 10:58:40 +00001572
1573# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001574
1575
1576
1577
Guido van Rossum0a516c91994-09-12 10:58:40 +00001578# SO is the extension of shared libraries `(including the dot!)
1579# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001580echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001581if test -z "$SO"
1582then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001584 hp*|HP*) SO=.sl;;
1585 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001586 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001587fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001588echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001589# LDSHARED is the ld *command* used to create shared library
1590# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001591echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001592if test -z "$LDSHARED"
1593then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594 case $ac_sys_system/$ac_sys_release in
Guido van Rossum84e7b241996-08-19 21:59:00 +00001595 AIX*) LDSHARED="ld_so_aix \$(CC)";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001596 IRIX*) LDSHARED="ld -shared";;
1597 SunOS/4*) LDSHARED="ld";;
1598 SunOS/5*) LDSHARED="ld -G";;
1599 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001600 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1601 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001602 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001603 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001604 FreeBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001605 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001606 *) LDSHARED="ld";;
1607 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001608fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001609echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001610# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001611# library -- this is only needed for a few systems
1612echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001613if test -z "$CCSHARED"
1614then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001615 case $ac_sys_system in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001616 hp*|HP*) if test "$GCC" = yes;
1617 then CCSHARED="-fpic";
1618 else CCSHARED="+z";
1619 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001620 Linux*) CCSHARED="-fpic";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001621 FreeBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001622 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001623 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001624fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001625echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001626# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001627# the python executable -- this is only needed for a few systems
1628echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001629if test -z "$LINKFORSHARED"
1630then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001631 case $ac_sys_system in
Guido van Rossum42dcad31996-07-31 22:48:44 +00001632 AIX*) LINKFORSHARED="-Wl,-bE:python.exp";;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001633 hp*|HP*)
1634 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/sharedmodules";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001635 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001636 next) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001637 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001638 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001639fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001640echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001641
Guido van Rossum627b2d71993-12-24 10:39:16 +00001642# checks for libraries
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001643echo $ac_n "checking for -ldl""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001644ac_lib_var=`echo dl'_'dlopen | tr './+\055' '__p_'`
1645if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001646 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001647else
1648 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001649LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001651#line 1652 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001652#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001653/* Override any gcc2 internal prototype to avoid an error. */
1654/* We use char because int might match the return type of a gcc2
1655 builtin and then its argument prototype would still apply. */
1656char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001657
Guido van Rossum7f43da71994-08-01 12:15:30 +00001658int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001659int t() {
1660dlopen()
1661; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001662EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001663if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001664 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001665 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001666else
1667 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001668 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001669fi
1670rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001672
Guido van Rossum627b2d71993-12-24 10:39:16 +00001673fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001674if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001675 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001676 ac_tr_lib=HAVE_LIB`echo dl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677 cat >> confdefs.h <<EOF
1678#define $ac_tr_lib 1
1679EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001680
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001681 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001682
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001684 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
1686 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001687echo $ac_n "checking for -ldld""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001688ac_lib_var=`echo dld'_'shl_load | tr './+\055' '__p_'`
1689if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001690 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691else
1692 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001693LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001695#line 1696 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001696#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001697/* Override any gcc2 internal prototype to avoid an error. */
1698/* We use char because int might match the return type of a gcc2
1699 builtin and then its argument prototype would still apply. */
1700char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001701
Guido van Rossum7f43da71994-08-01 12:15:30 +00001702int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703int t() {
1704shl_load()
1705; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001706EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001707if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001708 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001709 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710else
1711 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001712 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001713fi
1714rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001716
Guido van Rossum627b2d71993-12-24 10:39:16 +00001717fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001718if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001719 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001720 ac_tr_lib=HAVE_LIB`echo dld | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001721 cat >> confdefs.h <<EOF
1722#define $ac_tr_lib 1
1723EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001724
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001725 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726
1727else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001728 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001729fi
1730 # Dynamic linking for HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001731echo $ac_n "checking for -lsun""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001732ac_lib_var=`echo sun'_'getpwnam | tr './+\055' '__p_'`
1733if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001734 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001735else
1736 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001737LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001738cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001739#line 1740 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001740#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001741/* Override any gcc2 internal prototype to avoid an error. */
1742/* We use char because int might match the return type of a gcc2
1743 builtin and then its argument prototype would still apply. */
1744char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001745
1746int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001747int t() {
1748getpwnam()
1749; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001750EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001751if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001752 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001753 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001754else
1755 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001756 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001757fi
1758rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001759LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001760
Guido van Rossum7f43da71994-08-01 12:15:30 +00001761fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001762if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001763 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001764 ac_tr_lib=HAVE_LIB`echo sun | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765 cat >> confdefs.h <<EOF
1766#define $ac_tr_lib 1
1767EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001769 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770
1771else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001772 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001773fi
1774 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001775# The following three (nsl,inet,socket) are needed on Sequent;
1776# the order of checking must be this. Most SVR4 platforms will
1777# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1778# broken. I see no elegant solution (probably CHECK_LIB should be
1779# fixed to only add the library if the given entry point is not
1780# satisfied without it).
Guido van Rossum2b3ac691996-08-30 15:18:41 +00001781if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00001782then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001783echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001784ac_lib_var=`echo nsl'_'t_open | tr './+\055' '__p_'`
1785if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001787else
1788 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001789LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001790cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001791#line 1792 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001792#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001793/* Override any gcc2 internal prototype to avoid an error. */
1794/* We use char because int might match the return type of a gcc2
1795 builtin and then its argument prototype would still apply. */
1796char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001797
1798int main() { return 0; }
1799int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001800t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001801; return 0; }
1802EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001803if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001804 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001805 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001806else
1807 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001808 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001809fi
1810rm -f conftest*
1811LIBS="$ac_save_LIBS"
1812
1813fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001814if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001815 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001816 LIBS="-lnsl $LIBS"
1817else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001818 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001819fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001820 # SVR4
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001821echo $ac_n "checking for -linet""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001822ac_lib_var=`echo inet'_'gethostbyname | tr './+\055' '__p_'`
1823if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001824 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001825else
1826 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001827LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001828cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001829#line 1830 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001830#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001831/* Override any gcc2 internal prototype to avoid an error. */
1832/* We use char because int might match the return type of a gcc2
1833 builtin and then its argument prototype would still apply. */
1834char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001835
1836int main() { return 0; }
1837int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001838gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001839; return 0; }
1840EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001841if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001842 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001843 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001844else
1845 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001846 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001847fi
1848rm -f conftest*
1849LIBS="$ac_save_LIBS"
1850
1851fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001852if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001853 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001854 LIBS="-linet $LIBS"
1855else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001856 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001857fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001858 # Sequent
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001859echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001860ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
1861if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001862 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001863else
1864 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001865LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001866cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001867#line 1868 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001868#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001869/* Override any gcc2 internal prototype to avoid an error. */
1870/* We use char because int might match the return type of a gcc2
1871 builtin and then its argument prototype would still apply. */
1872char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001873
1874int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875int t() {
1876socket()
1877; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001878EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001879if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001880 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001881 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001882else
1883 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001884 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001885fi
1886rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001887LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001889fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001890if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001891 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001892 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001894 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001895fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001896 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00001897fi
Guido van Rossuma68acba1996-07-31 17:36:39 +00001898echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
1899# Check whether --with-libs or --without-libs was given.
1900if test "${with_libs+set}" = set; then
1901 withval="$with_libs"
1902
1903echo "$ac_t""$withval" 1>&6
1904LIBS="$withval $LIBS"
1905
1906else
1907 echo "$ac_t""no" 1>&6
1908fi
1909
Guido van Rossum7f43da71994-08-01 12:15:30 +00001910
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001911echo $ac_n "checking for --with-readline""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001912# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001913if test "${with_readline+set}" = set; then
1914 withval="$with_readline"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001915
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001916echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001917cat >> confdefs.h <<\EOF
1918#define WITH_READLINE 1
1919EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001920
Guido van Rossum2d38f911996-06-26 19:47:01 +00001921if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001922then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001923fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001924# first check if we can compile without lib termcap
1925echo $ac_n "checking for -lreadline without -ltermcap""... $ac_c" 1>&6
1926# check if a libreadline exists
1927LIBS="$LIBS -lreadline"
1928cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001929#line 1930 "configure"
Guido van Rossum563e7081996-09-10 18:20:48 +00001930#include "confdefs.h"
1931extern char *readline();
1932int main() { return 0; }
1933int t() {
1934char *line=readline();
1935; return 0; }
1936EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001937if { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001938 rm -rf conftest*
1939
1940 echo "$ac_t""yes" 1>&6
1941else
1942 rm -rf conftest*
1943
1944 echo "$ac_t""no" 1>&6
1945 echo "checking for -lreadline that needs -ltermcap" 1>&6
1946 termcap=
1947 echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001948ac_lib_var=`echo termcap'_'tgetent | tr './+\055' '__p_'`
1949if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001950 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951else
1952 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001953LIBS="-ltermcap $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001954cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001955#line 1956 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001956#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001957/* Override any gcc2 internal prototype to avoid an error. */
1958/* We use char because int might match the return type of a gcc2
1959 builtin and then its argument prototype would still apply. */
1960char tgetent();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001961
Guido van Rossum7f43da71994-08-01 12:15:30 +00001962int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001963int t() {
1964tgetent()
1965; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001966EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001967if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001968 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001969 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001970else
1971 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001972 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001973fi
1974rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001975LIBS="$ac_save_LIBS"
1976
1977fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001978if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001979 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001980 termcap=termcap
Guido van Rossum7f43da71994-08-01 12:15:30 +00001981else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001982 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001983
Guido van Rossum563e7081996-09-10 18:20:48 +00001984 echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001985ac_lib_var=`echo termlib'_'tgetent | tr './+\055' '__p_'`
1986if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001987 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001988else
1989 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001990LIBS="-ltermlib $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001991cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001992#line 1993 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001993#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001994/* Override any gcc2 internal prototype to avoid an error. */
1995/* We use char because int might match the return type of a gcc2
1996 builtin and then its argument prototype would still apply. */
1997char tgetent();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001998
1999int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000int t() {
2001tgetent()
2002; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002003EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002004if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002005 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002006 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002007else
2008 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002009 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002010fi
2011rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002012LIBS="$ac_save_LIBS"
2013
2014fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002015if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002016 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002017 termcap=termlib
Guido van Rossum7f43da71994-08-01 12:15:30 +00002018else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002019 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002020
Guido van Rossum563e7081996-09-10 18:20:48 +00002021 { echo "configure: error: no working -ltermcap/termlib found -- do not use --with-readline" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002022fi
2023
2024fi
2025
Guido van Rossum563e7081996-09-10 18:20:48 +00002026 # Avoid possible conflict between shared libraries termcap and gl
2027 # on IRIX 5: both contain a routine called clear.
2028 if test -f /usr/lib/lib$termcap.a
2029 then LIBS="$LIBS /usr/lib/lib$termcap.a"
2030 else LIBS="$LIBS -l$termcap"
2031 fi
2032 echo $ac_n "checking for -lreadline""... $ac_c" 1>&6
2033 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002034#line 2035 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002035#include "confdefs.h"
Guido van Rossum563e7081996-09-10 18:20:48 +00002036extern char *readline();
Guido van Rossum2d38f911996-06-26 19:47:01 +00002037int main() { return 0; }
2038int t() {
Guido van Rossum563e7081996-09-10 18:20:48 +00002039char *line=readline();
Guido van Rossum2d38f911996-06-26 19:47:01 +00002040; return 0; }
2041EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002042if { (eval echo configure:2043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002043 rm -rf conftest*
Guido van Rossum563e7081996-09-10 18:20:48 +00002044
2045 echo "$ac_t""yes" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002046else
2047 rm -rf conftest*
Guido van Rossum563e7081996-09-10 18:20:48 +00002048
2049 { echo "configure: error: no working GNU readline library found -- do not use --with-readline" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002050fi
Guido van Rossum2d38f911996-06-26 19:47:01 +00002051rm -f conftest*
Guido van Rossum2d38f911996-06-26 19:47:01 +00002052
Guido van Rossum563e7081996-09-10 18:20:48 +00002053
Guido van Rossum2d38f911996-06-26 19:47:01 +00002054fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002055rm -f conftest*
Guido van Rossum2d38f911996-06-26 19:47:01 +00002056
Guido van Rossum2d38f911996-06-26 19:47:01 +00002057
Guido van Rossumda88dad1995-01-26 00:46:29 +00002058else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002059 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002060fi
2061
2062
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002063echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002064# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002065if test "${with_thread+set}" = set; then
2066 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002067
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002068echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002069if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002070then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002071fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002072cat >> confdefs.h <<\EOF
2073#define _REENTRANT 1
2074EOF
2075
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002076ac_safe=`echo "mach/cthreads.h" | tr './\055' '___'`
2077echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
2078if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2079 echo $ac_n "(cached) $ac_c" 1>&6
2080else
2081 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002082#line 2083 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002083#include "confdefs.h"
2084#include <mach/cthreads.h>
2085EOF
2086ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002087{ (eval echo configure:2088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002088ac_err=`grep -v '^ *+' conftest.out`
2089if test -z "$ac_err"; then
2090 rm -rf conftest*
2091 eval "ac_cv_header_$ac_safe=yes"
2092else
2093 echo "$ac_err" >&5
2094 rm -rf conftest*
2095 eval "ac_cv_header_$ac_safe=no"
2096fi
2097rm -f conftest*
2098fi
2099if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2100 echo "$ac_t""yes" 1>&6
2101 cat >> confdefs.h <<\EOF
2102#define WITH_THREAD 1
2103EOF
2104
2105cat >> confdefs.h <<\EOF
2106#define C_THREADS 1
2107EOF
2108
2109LIBOBJS="$LIBOBJS thread.o"
2110else
2111 echo "$ac_t""no" 1>&6
2112
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002113echo $ac_n "checking for -lpthreads""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002114ac_lib_var=`echo pthreads'_'pthread_create | tr './+\055' '__p_'`
2115if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002116 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002117else
2118 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002119LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002120cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002121#line 2122 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002122#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002123/* Override any gcc2 internal prototype to avoid an error. */
2124/* We use char because int might match the return type of a gcc2
2125 builtin and then its argument prototype would still apply. */
2126char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002127
2128int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002129int t() {
2130pthread_create()
2131; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002132EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002133if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002134 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002135 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002136else
2137 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002138 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002139fi
2140rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002141LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002143fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002144if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002145 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002146 cat >> confdefs.h <<\EOF
2147#define WITH_THREAD 1
2148EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002150cat >> confdefs.h <<\EOF
2151#define _POSIX_THREADS 1
2152EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002153
2154LIBS="$LIBS -lpthreads"
2155LIBOBJS="$LIBOBJS thread.o"
2156else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002157 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002158
2159echo $ac_n "checking for -lpthread""... $ac_c" 1>&6
2160ac_lib_var=`echo pthread'_'pthread_create | tr './+\055' '__p_'`
2161if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2162 echo $ac_n "(cached) $ac_c" 1>&6
2163else
2164 ac_save_LIBS="$LIBS"
2165LIBS="-lpthread $LIBS"
2166cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002167#line 2168 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002168#include "confdefs.h"
2169/* Override any gcc2 internal prototype to avoid an error. */
2170/* We use char because int might match the return type of a gcc2
2171 builtin and then its argument prototype would still apply. */
2172char pthread_create();
2173
2174int main() { return 0; }
2175int t() {
2176pthread_create()
2177; return 0; }
2178EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002179if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002180 rm -rf conftest*
2181 eval "ac_cv_lib_$ac_lib_var=yes"
2182else
2183 rm -rf conftest*
2184 eval "ac_cv_lib_$ac_lib_var=no"
2185fi
2186rm -f conftest*
2187LIBS="$ac_save_LIBS"
2188
2189fi
2190if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2191 echo "$ac_t""yes" 1>&6
2192 cat >> confdefs.h <<\EOF
2193#define WITH_THREAD 1
2194EOF
2195
2196cat >> confdefs.h <<\EOF
2197#define _POSIX_THREADS 1
2198EOF
2199
2200LIBS="$LIBS -lpthread"
2201LIBOBJS="$LIBOBJS thread.o"
2202else
2203 echo "$ac_t""no" 1>&6
2204fi
2205
2206
Guido van Rossum627b2d71993-12-24 10:39:16 +00002207fi
2208
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002209fi
2210
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002211echo $ac_n "checking for -lmpc""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002212ac_lib_var=`echo mpc'_'usconfig | tr './+\055' '__p_'`
2213if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002214 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215else
2216 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002217LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002218cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002219#line 2220 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002220#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002221/* Override any gcc2 internal prototype to avoid an error. */
2222/* We use char because int might match the return type of a gcc2
2223 builtin and then its argument prototype would still apply. */
2224char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002225
Guido van Rossum7f43da71994-08-01 12:15:30 +00002226int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002227int t() {
2228usconfig()
2229; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002230EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002231if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002232 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002233 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002234else
2235 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002236 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002237fi
2238rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002239LIBS="$ac_save_LIBS"
2240
2241fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002243 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002244 cat >> confdefs.h <<\EOF
2245#define WITH_THREAD 1
2246EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002247
Guido van Rossum7f43da71994-08-01 12:15:30 +00002248LIBS="$LIBS -lmpc"
2249LIBOBJS="$LIBOBJS thread.o"
2250else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002251 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002252fi
2253
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002254echo $ac_n "checking for -lthread""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002255ac_lib_var=`echo thread'_'thr_create | tr './+\055' '__p_'`
2256if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002257 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002258else
2259 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002260LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002261cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002262#line 2263 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002263#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002264/* Override any gcc2 internal prototype to avoid an error. */
2265/* We use char because int might match the return type of a gcc2
2266 builtin and then its argument prototype would still apply. */
2267char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002268
Guido van Rossum7f43da71994-08-01 12:15:30 +00002269int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270int t() {
2271thr_create()
2272; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002273EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002274if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002275 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002276 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002277else
2278 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002279 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002280fi
2281rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002282LIBS="$ac_save_LIBS"
2283
2284fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002285if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002286 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002287 cat >> confdefs.h <<\EOF
2288#define WITH_THREAD 1
2289EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002290
Guido van Rossum7f43da71994-08-01 12:15:30 +00002291LIBS="$LIBS -lthread"
2292LIBOBJS="$LIBOBJS thread.o"
2293else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002294 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002295fi
2296
Guido van Rossum7f43da71994-08-01 12:15:30 +00002297
Guido van Rossumda88dad1995-01-26 00:46:29 +00002298else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002299 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002300fi
2301
Guido van Rossum7f43da71994-08-01 12:15:30 +00002302
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002303# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002304
2305DLINCLDIR=/
2306
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002307echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002308# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002309if test "${with_sgi_dl+set}" = set; then
2310 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002311
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002312echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002313cat >> confdefs.h <<\EOF
2314#define WITH_SGI_DL 1
2315EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002316
2317dldir=$withval
2318if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002319then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002320else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002321fi
2322DLINCLDIR=${dldir}
2323LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002324else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002325 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002326fi
2327
2328
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002329echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002330# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002331if test "${with_dl_dld+set}" = set; then
2332 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002333
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002334echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002335cat >> confdefs.h <<\EOF
2336#define WITH_DL_DLD 1
2337EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002338
2339dldir=`echo "$withval" | sed 's/,.*//'`
2340dlddir=`echo "$withval" | sed 's/.*,//'`
2341if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002342then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002343else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002344fi
2345DLINCLDIR=${dldir}
2346LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002347else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002348 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002349fi
2350
2351
Guido van Rossum627b2d71993-12-24 10:39:16 +00002352# checks for library functions
Guido van Rossum2d38f911996-06-26 19:47:01 +00002353for ac_func in chown clock dlopen flock ftime ftruncate \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002354 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
Guido van Rossum57d09151996-07-24 02:42:38 +00002355 link lstat mkfifo nice plock putenv readlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002356 select setgid setuid setsid setpgid setpgrp setvbuf \
2357 sigaction siginterrupt sigrelse strftime symlink \
2358 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002359do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002360echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2361if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2362 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002363else
2364 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002365#line 2366 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002366#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002367/* System header to define __stub macros and hopefully few prototypes,
2368 which can conflict with char $ac_func(); below. */
2369#include <assert.h>
2370/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002371/* We use char because int might match the return type of a gcc2
2372 builtin and then its argument prototype would still apply. */
2373char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002374
Guido van Rossum7f43da71994-08-01 12:15:30 +00002375int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376int t() {
2377
Guido van Rossum627b2d71993-12-24 10:39:16 +00002378/* The GNU C library defines this for functions which it implements
2379 to always fail with ENOSYS. Some functions are actually named
2380 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002381#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002382choke me
2383#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002384$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002385#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002386
Guido van Rossum7f43da71994-08-01 12:15:30 +00002387; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002388EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002389if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002390 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002391 eval "ac_cv_func_$ac_func=yes"
2392else
2393 rm -rf conftest*
2394 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002395fi
2396rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002397
2398fi
2399if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002400 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002401 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002402 cat >> confdefs.h <<EOF
2403#define $ac_tr_func 1
2404EOF
2405
2406else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002407 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002408fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002409done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002410
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002411for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002412do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002413echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2414if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2415 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002416else
2417 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002418#line 2419 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002419#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002420/* System header to define __stub macros and hopefully few prototypes,
2421 which can conflict with char $ac_func(); below. */
2422#include <assert.h>
2423/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002424/* We use char because int might match the return type of a gcc2
2425 builtin and then its argument prototype would still apply. */
2426char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002427
Guido van Rossum7f43da71994-08-01 12:15:30 +00002428int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002429int t() {
2430
Guido van Rossum627b2d71993-12-24 10:39:16 +00002431/* The GNU C library defines this for functions which it implements
2432 to always fail with ENOSYS. Some functions are actually named
2433 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002435choke me
2436#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002437$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002438#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002439
Guido van Rossum7f43da71994-08-01 12:15:30 +00002440; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002441EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002442if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002443 rm -rf conftest*
2444 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002445else
2446 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002448fi
2449rm -f conftest*
2450
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002451fi
2452if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002453 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002454 :
2455else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002456 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002457LIBOBJS="$LIBOBJS ${ac_func}.o"
2458fi
2459
Guido van Rossum627b2d71993-12-24 10:39:16 +00002460done
2461
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002462echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
2463if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2464 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002465else
2466 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002467#line 2468 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002468#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002469/* System header to define __stub macros and hopefully few prototypes,
2470 which can conflict with char getpgrp(); below. */
2471#include <assert.h>
2472/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002473/* We use char because int might match the return type of a gcc2
2474 builtin and then its argument prototype would still apply. */
2475char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002476
Guido van Rossum7f43da71994-08-01 12:15:30 +00002477int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002478int t() {
2479
Guido van Rossum627b2d71993-12-24 10:39:16 +00002480/* The GNU C library defines this for functions which it implements
2481 to always fail with ENOSYS. Some functions are actually named
2482 something starting with __ and the normal name is an alias. */
2483#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2484choke me
2485#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002486getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002487#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002488
2489; return 0; }
2490EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002491if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002492 rm -rf conftest*
2493 eval "ac_cv_func_getpgrp=yes"
2494else
2495 rm -rf conftest*
2496 eval "ac_cv_func_getpgrp=no"
2497fi
2498rm -f conftest*
2499
2500fi
2501if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002502 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002503 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002504#line 2505 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002505#include "confdefs.h"
2506#include <unistd.h>
2507int main() { return 0; }
2508int t() {
2509getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002510; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002511EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002512if { (eval echo configure:2513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002513 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002514 cat >> confdefs.h <<\EOF
2515#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002516EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002517
2518fi
2519rm -f conftest*
2520
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002521else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002522 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002523fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002524
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002525echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
2526if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2527 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002528else
2529 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002530#line 2531 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002531#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002532/* System header to define __stub macros and hopefully few prototypes,
2533 which can conflict with char setpgrp(); below. */
2534#include <assert.h>
2535/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002536/* We use char because int might match the return type of a gcc2
2537 builtin and then its argument prototype would still apply. */
2538char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002539
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002540int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002541int t() {
2542
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002543/* The GNU C library defines this for functions which it implements
2544 to always fail with ENOSYS. Some functions are actually named
2545 something starting with __ and the normal name is an alias. */
2546#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2547choke me
2548#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002549setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002550#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002551
2552; return 0; }
2553EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002554if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002555 rm -rf conftest*
2556 eval "ac_cv_func_setpgrp=yes"
2557else
2558 rm -rf conftest*
2559 eval "ac_cv_func_setpgrp=no"
2560fi
2561rm -f conftest*
2562
2563fi
2564if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002565 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002566 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002567#line 2568 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002568#include "confdefs.h"
2569#include <unistd.h>
2570int main() { return 0; }
2571int t() {
2572setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002573; return 0; }
2574EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002575if { (eval echo configure:2576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002576 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002577 cat >> confdefs.h <<\EOF
2578#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002579EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002580
2581fi
2582rm -f conftest*
2583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002584else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002585 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002586fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002587
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002588echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
2589if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2590 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591else
2592 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002593#line 2594 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002594#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002595/* System header to define __stub macros and hopefully few prototypes,
2596 which can conflict with char gettimeofday(); below. */
2597#include <assert.h>
2598/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002599/* We use char because int might match the return type of a gcc2
2600 builtin and then its argument prototype would still apply. */
2601char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002602
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603int main() { return 0; }
2604int t() {
2605
2606/* The GNU C library defines this for functions which it implements
2607 to always fail with ENOSYS. Some functions are actually named
2608 something starting with __ and the normal name is an alias. */
2609#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2610choke me
2611#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002612gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613#endif
2614
2615; return 0; }
2616EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002617if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618 rm -rf conftest*
2619 eval "ac_cv_func_gettimeofday=yes"
2620else
2621 rm -rf conftest*
2622 eval "ac_cv_func_gettimeofday=no"
2623fi
2624rm -f conftest*
2625
2626fi
2627if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002628 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002630#line 2631 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002631#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002632#include <sys/time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002633int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002634int t() {
2635gettimeofday((struct timeval*)0,(struct timezone*)0);
2636; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002637EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002638if { (eval echo configure:2639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002639 :
2640else
2641 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002642 cat >> confdefs.h <<\EOF
2643#define GETTIMEOFDAY_NO_TZ 1
2644EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002645
2646fi
2647rm -f conftest*
2648
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002649else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002650 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651fi
2652
2653
2654# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002655echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2656if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2657 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002658else
2659 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002660#line 2661 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002661#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002662#include <sys/types.h>
2663#include <sys/time.h>
2664#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002665int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002666int t() {
2667struct tm *tp;
2668; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002669EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002670if { (eval echo configure:2671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002671 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002673else
2674 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002676fi
2677rm -f conftest*
2678
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002680
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002681echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682if test $ac_cv_header_time = yes; then
2683 cat >> confdefs.h <<\EOF
2684#define TIME_WITH_SYS_TIME 1
2685EOF
2686
2687fi
2688
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002689echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2690if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2691 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692else
2693 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002694#line 2695 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695#include "confdefs.h"
2696#include <sys/types.h>
2697#include <time.h>
2698int main() { return 0; }
2699int t() {
2700struct tm *tp; tp->tm_sec;
2701; return 0; }
2702EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002703if { (eval echo configure:2704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002704 rm -rf conftest*
2705 ac_cv_struct_tm=time.h
2706else
2707 rm -rf conftest*
2708 ac_cv_struct_tm=sys/time.h
2709fi
2710rm -f conftest*
2711
2712fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002714echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715if test $ac_cv_struct_tm = sys/time.h; then
2716 cat >> confdefs.h <<\EOF
2717#define TM_IN_SYS_TIME 1
2718EOF
2719
2720fi
2721
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002722echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2723if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2724 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725else
2726 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002727#line 2728 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002728#include "confdefs.h"
2729#include <sys/types.h>
2730#include <$ac_cv_struct_tm>
2731int main() { return 0; }
2732int t() {
2733struct tm tm; tm.tm_zone;
2734; return 0; }
2735EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002736if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737 rm -rf conftest*
2738 ac_cv_struct_tm_zone=yes
2739else
2740 rm -rf conftest*
2741 ac_cv_struct_tm_zone=no
2742fi
2743rm -f conftest*
2744
2745fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002747echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748if test "$ac_cv_struct_tm_zone" = yes; then
2749 cat >> confdefs.h <<\EOF
2750#define HAVE_TM_ZONE 1
2751EOF
2752
2753else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002754 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2755if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2756 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002757else
2758 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002759#line 2760 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002760#include "confdefs.h"
2761#include <time.h>
2762#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002763extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002764#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00002765int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002766int t() {
2767atoi(*tzname);
2768; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002769EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002770if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002771 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772 ac_cv_var_tzname=yes
2773else
2774 rm -rf conftest*
2775 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002776fi
2777rm -f conftest*
2778
2779fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002780
2781echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002782 if test $ac_cv_var_tzname = yes; then
2783 cat >> confdefs.h <<\EOF
2784#define HAVE_TZNAME 1
2785EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002786
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787 fi
2788fi
2789
2790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002791echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
2792if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2793 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794else
2795 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002796#line 2797 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002797#include "confdefs.h"
2798#include <time.h>
2799int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002800int t() {
2801return altzone;
2802; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002803EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002804if { (eval echo configure:2805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002805 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806 ac_cv_header_time_altzone=yes
2807else
2808 rm -rf conftest*
2809 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002810fi
2811rm -f conftest*
2812
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002813fi
2814
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002815echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002816if test $ac_cv_header_time_altzone = yes; then
2817 cat >> confdefs.h <<\EOF
2818#define HAVE_ALTZONE 1
2819EOF
2820
2821fi
2822
Guido van Rossumda88dad1995-01-26 00:46:29 +00002823was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002824echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002825cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002826#line 2827 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002827#include "confdefs.h"
2828
2829#include <sys/types.h>
2830#include <sys/select.h>
2831#include <sys/time.h>
2832
2833int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834int t() {
2835;
2836; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002837EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002838if { (eval echo configure:2839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002839 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840 cat >> confdefs.h <<\EOF
2841#define SYS_SELECT_WITH_SYS_TIME 1
2842EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002843 was_it_defined=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002844fi
2845rm -f conftest*
2846
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002847echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002848
2849# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00002850
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002851echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2852if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2853 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002854else
2855 if test "$GCC" = yes; then
2856 # GCC predefines this symbol on systems where it applies.
2857cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002858#line 2859 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002859#include "confdefs.h"
2860#ifdef __CHAR_UNSIGNED__
2861 yes
2862#endif
2863
2864EOF
2865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2866 egrep "yes" >/dev/null 2>&1; then
2867 rm -rf conftest*
2868 ac_cv_c_char_unsigned=yes
2869else
2870 rm -rf conftest*
2871 ac_cv_c_char_unsigned=no
2872fi
2873rm -f conftest*
2874
2875else
2876if test "$cross_compiling" = yes; then
2877 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2878else
2879cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002880#line 2881 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002881#include "confdefs.h"
2882/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002883#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00002884#define volatile
2885#endif
2886main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00002887 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002888}
2889EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002890{ (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002891if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002892 ac_cv_c_char_unsigned=yes
2893else
2894 ac_cv_c_char_unsigned=no
2895fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002896fi
2897rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002898fi
2899fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002900
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002901echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002902if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2903 cat >> confdefs.h <<\EOF
2904#define __CHAR_UNSIGNED__ 1
2905EOF
2906
2907fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002908
2909
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002910echo $ac_n "checking for working const""... $ac_c" 1>&6
2911if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2912 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002913else
2914 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002915#line 2916 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002916#include "confdefs.h"
2917
2918int main() { return 0; }
2919int t() {
2920
2921/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002922typedef int charset[2]; const charset x;
2923/* SunOS 4.1.1 cc rejects this. */
2924char const *const *ccp;
2925char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002926/* NEC SVR4.0.2 mips cc rejects this. */
2927struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002928static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002929/* AIX XL C 1.02.0.0 rejects this.
2930 It does not let you subtract one const X* pointer from another in an arm
2931 of an if-expression whose if-part is not a constant expression */
2932const char *g = "string";
2933ccp = &g + (g ? g-g : 0);
2934/* HPUX 7.0 cc rejects these. */
2935++ccp;
2936p = (char**) ccp;
2937ccp = (char const *const *) p;
2938{ /* SCO 3.2v4 cc rejects this. */
2939 char *t;
2940 char const *s = 0 ? (char *) 0 : (char const *) 0;
2941
2942 *t++ = 0;
2943}
2944{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002945 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002946 const int *foo = &x[0];
2947 ++foo;
2948}
2949{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2950 typedef const int *iptr;
2951 iptr p = 0;
2952 ++p;
2953}
2954{ /* AIX XL C 1.02.0.0 rejects this saying
2955 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2956 struct s { int j; const int *ap[3]; };
2957 struct s *b; b->j = 5;
2958}
2959{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2960 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002961}
2962
2963; return 0; }
2964EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002965if { (eval echo configure:2966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002966 rm -rf conftest*
2967 ac_cv_c_const=yes
2968else
2969 rm -rf conftest*
2970 ac_cv_c_const=no
2971fi
2972rm -f conftest*
2973
2974fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002975
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002976echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002977if test $ac_cv_c_const = no; then
2978 cat >> confdefs.h <<\EOF
2979#define const
2980EOF
2981
2982fi
2983
2984
Guido van Rossumda88dad1995-01-26 00:46:29 +00002985works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002986echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002987cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002988#line 2989 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002989#include "confdefs.h"
2990
Guido van Rossum7f43da71994-08-01 12:15:30 +00002991int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002992int t() {
2993volatile int x; x = 0;
2994; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002995EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002996if { (eval echo configure:2997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002997 rm -rf conftest*
2998 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002999else
3000 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003001 cat >> confdefs.h <<\EOF
3002#define volatile
3003EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003004
3005fi
3006rm -f conftest*
3007
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003008echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003009
Guido van Rossumda88dad1995-01-26 00:46:29 +00003010works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003011echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003012cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003013#line 3014 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003014#include "confdefs.h"
3015
3016int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003017int t() {
3018signed char c;
3019; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003020EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003021if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003022 rm -rf conftest*
3023 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003024else
3025 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003026 cat >> confdefs.h <<\EOF
3027#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003028EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003029
3030fi
3031rm -f conftest*
3032
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003033echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003034
Guido van Rossumda88dad1995-01-26 00:46:29 +00003035have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003036echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003037cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003038#line 3039 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003039#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003040int foo(int x) { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003041int main() { return 0; }
3042int t() {
3043return foo(10);
3044; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003045EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003046if { (eval echo configure:3047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003047 rm -rf conftest*
3048 cat >> confdefs.h <<\EOF
3049#define HAVE_PROTOTYPES 1
3050EOF
3051 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003052fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003053rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00003054
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003055echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003056
Guido van Rossumda88dad1995-01-26 00:46:29 +00003057works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003058echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003059cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003060#line 3061 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003061#include "confdefs.h"
3062
3063#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003064int foo(int x, ...) {
3065 va_list va;
3066 va_start(va, x);
3067 va_arg(va, int);
3068 va_arg(va, char *);
3069 va_arg(va, double);
3070 return 0;
3071}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003072
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003073int main() { return 0; }
3074int t() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003075return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003076; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003077EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003078if { (eval echo configure:3079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003079 rm -rf conftest*
3080 cat >> confdefs.h <<\EOF
3081#define HAVE_STDARG_PROTOTYPES 1
3082EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003083 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003084fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003085rm -f conftest*
3086
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003087echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003088
Guido van Rossumda88dad1995-01-26 00:46:29 +00003089if test "$have_prototypes" = yes; then
3090bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003091echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003092cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003093#line 3094 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003094#include "confdefs.h"
3095#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00003096int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003097int t() {
3098char **t;execve("@",t,t);
3099; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003100EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003101if { (eval echo configure:3102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003102 :
3103else
3104 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003105 cat >> confdefs.h <<\EOF
3106#define BAD_EXEC_PROTOTYPES 1
3107EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003108 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003109fi
3110rm -f conftest*
3111
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003112echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003113fi
3114
Guido van Rossumda88dad1995-01-26 00:46:29 +00003115bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003116echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003117if test "$cross_compiling" = yes; then
3118 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3119else
3120cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003121#line 3122 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003122#include "confdefs.h"
3123
3124struct s { int a; int b; };
3125static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003126int foobar() {
3127 static int random;
3128 random = (int) &foo;
3129 return random;
3130}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003131static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003132main() {
3133 exit(!((int)&foo == foobar()));
3134}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003135
3136EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003137{ (eval echo configure:3138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003138if test -s conftest && (./conftest; exit) 2>/dev/null; then
3139 :
3140else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003141 cat >> confdefs.h <<\EOF
3142#define BAD_STATIC_FORWARD 1
3143EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003145fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003146fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003147rm -fr conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003148echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149
Guido van Rossumda88dad1995-01-26 00:46:29 +00003150va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003151echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003152cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003153#line 3154 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003154#include "confdefs.h"
3155
3156#ifdef HAVE_STDARG_PROTOTYPES
3157#include <stdarg.h>
3158#else
3159#include <varargs.h>
3160#endif
3161
3162int main() { return 0; }
3163int t() {
3164va_list list1, list2; list1 = list2;
3165; return 0; }
3166EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003167if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003168 :
3169else
3170 rm -rf conftest*
3171 cat >> confdefs.h <<\EOF
3172#define VA_LIST_IS_ARRAY 1
3173EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003174 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003175fi
3176rm -f conftest*
3177
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003178echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003179
Guido van Rossum627b2d71993-12-24 10:39:16 +00003180# checks for system services
3181# (none yet)
3182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183# Linux requires this for correct f.p. operations
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003184echo $ac_n "checking for -lieee""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003185ac_lib_var=`echo ieee'_'__fpu_control | tr './+\055' '__p_'`
3186if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003187 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188else
3189 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003190LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003191cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003192#line 3193 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003193#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003194/* Override any gcc2 internal prototype to avoid an error. */
3195/* We use char because int might match the return type of a gcc2
3196 builtin and then its argument prototype would still apply. */
3197char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003198
Guido van Rossum7f43da71994-08-01 12:15:30 +00003199int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003200int t() {
3201__fpu_control()
3202; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003203EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003204if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003205 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003206 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003207else
Guido van Rossum627b2d71993-12-24 10:39:16 +00003208 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003209 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003210fi
3211rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003212LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003214fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003215if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003216 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003217 ac_tr_lib=HAVE_LIB`echo ieee | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218 cat >> confdefs.h <<EOF
3219#define $ac_tr_lib 1
3220EOF
3221
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003222 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003223
3224else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003225 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003226fi
3227
3228
Guido van Rossum7f43da71994-08-01 12:15:30 +00003229# check for --with-libm=...
3230
Guido van Rossum563e7081996-09-10 18:20:48 +00003231case $ac_sys_system in
3232next) ;;
3233*) LIBM=-lm
3234esac
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003236if test "${with_libm+set}" = set; then
3237 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003238
3239if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003240then LIBM=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003242fi
3243fi
3244
3245
3246# check for --with-libc=...
3247
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003248# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003249if test "${with_libc+set}" = set; then
3250 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251
3252if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003253then LIBC=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003255fi
3256fi
3257
3258
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003259# check for hypot() in math library
3260LIBS_SAVE=$LIBS
3261LIBS="$LIBS $LIBM"
3262for ac_func in hypot
3263do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003264echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3265if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3266 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003267else
3268 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003269#line 3270 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003270#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003271/* System header to define __stub macros and hopefully few prototypes,
3272 which can conflict with char $ac_func(); below. */
3273#include <assert.h>
3274/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003275/* We use char because int might match the return type of a gcc2
3276 builtin and then its argument prototype would still apply. */
3277char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003278
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003279int main() { return 0; }
3280int t() {
3281
3282/* The GNU C library defines this for functions which it implements
3283 to always fail with ENOSYS. Some functions are actually named
3284 something starting with __ and the normal name is an alias. */
3285#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3286choke me
3287#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003288$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003289#endif
3290
3291; return 0; }
3292EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003293if { (eval echo configure:3294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003294 rm -rf conftest*
3295 eval "ac_cv_func_$ac_func=yes"
3296else
3297 rm -rf conftest*
3298 eval "ac_cv_func_$ac_func=no"
3299fi
3300rm -f conftest*
3301
3302fi
3303if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003304 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003305 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003306 cat >> confdefs.h <<EOF
3307#define $ac_tr_func 1
3308EOF
3309
3310else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003311 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003312fi
3313done
3314
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003315for ac_func in hypot
3316do
3317echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3318if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3319 echo $ac_n "(cached) $ac_c" 1>&6
3320else
3321 cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003322#line 3323 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003323#include "confdefs.h"
3324/* System header to define __stub macros and hopefully few prototypes,
3325 which can conflict with char $ac_func(); below. */
3326#include <assert.h>
3327/* Override any gcc2 internal prototype to avoid an error. */
3328/* We use char because int might match the return type of a gcc2
3329 builtin and then its argument prototype would still apply. */
3330char $ac_func();
3331
3332int main() { return 0; }
3333int t() {
3334
3335/* The GNU C library defines this for functions which it implements
3336 to always fail with ENOSYS. Some functions are actually named
3337 something starting with __ and the normal name is an alias. */
3338#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3339choke me
3340#else
3341$ac_func();
3342#endif
3343
3344; return 0; }
3345EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003346if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003347 rm -rf conftest*
3348 eval "ac_cv_func_$ac_func=yes"
3349else
3350 rm -rf conftest*
3351 eval "ac_cv_func_$ac_func=no"
3352fi
3353rm -f conftest*
3354
3355fi
3356if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3357 echo "$ac_t""yes" 1>&6
3358 :
3359else
3360 echo "$ac_t""no" 1>&6
3361LIBOBJS="$LIBOBJS ${ac_func}.o"
3362fi
3363
3364done
3365
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003366LIBS=$LIBS_SAVE
3367
Guido van Rossumda88dad1995-01-26 00:46:29 +00003368# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003369echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
3370if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3371 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003372else
3373 if test "$cross_compiling" = yes; then
3374 ac_cv_func_getopt=no
3375else
3376cat > conftest.$ac_ext <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003377#line 3378 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003378#include "confdefs.h"
3379#include <stdio.h>
3380extern int optind, opterr, getopt();
3381extern char* optarg;
3382int main() {
3383 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3384 opterr = 0;
3385 if (getopt(3, av, "f:") == 'f') { exit(1); }
3386 exit(0);
3387}
3388EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003389{ (eval echo configure:3390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00003390if test -s conftest && (./conftest; exit) 2>/dev/null; then
3391 ac_cv_func_getopt=yes
3392else
3393 ac_cv_func_getopt=no
3394fi
3395fi
3396rm -fr conftest*
3397fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003398echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003399test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3400
Guido van Rossum627b2d71993-12-24 10:39:16 +00003401# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003402trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003403cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003404# This file is a shell script that caches the results of configure
3405# tests run on this system so they can be shared between configure
3406# scripts and configure runs. It is not useful on other systems.
3407# If it contains results you don't want to keep, you may remove or edit it.
3408#
3409# By default, configure uses ./config.cache as the cache file,
3410# creating it if it does not exist already. You can give configure
3411# the --cache-file=FILE option to use a different cache file; that is
3412# what configure does when it calls configure scripts in
3413# subdirectories, so they share the cache.
3414# Giving --cache-file=/dev/null disables caching, for debugging configure.
3415# config.status only pays attention to the cache file if you give it the
3416# --recheck option to rerun configure.
3417#
3418EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003419# Ultrix sh set writes to stderr and can't be redirected directly,
3420# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003421(set) 2>&1 |
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003422 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3423 >> confcache
3424if cmp -s $cache_file confcache; then
3425 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003426else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003427 if test -w $cache_file; then
3428 echo "updating cache $cache_file"
3429 cat confcache > $cache_file
3430 else
3431 echo "not updating unwritable cache $cache_file"
3432 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003433fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003434rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003435
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003436trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003437
3438test "x$prefix" = xNONE && prefix=$ac_default_prefix
3439# Let make expand exec_prefix.
3440test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003441
Guido van Rossum7f43da71994-08-01 12:15:30 +00003442# Any assignment to VPATH causes Sun make to only execute
3443# the first set of double-colon rules, so remove it if not needed.
3444# If there is a colon in the path, we need to keep it.
3445if test "x$srcdir" = x.; then
3446 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3447fi
3448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003449trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003450
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003451DEFS=-DHAVE_CONFIG_H
3452
3453# Without the "./", some shells look in PATH for config.status.
3454: ${CONFIG_STATUS=./config.status}
3455
3456echo creating $CONFIG_STATUS
3457rm -f $CONFIG_STATUS
3458cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003459#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460# Generated automatically by configure.
3461# Run this file to recreate the current configuration.
3462# This directory was configured as follows,
3463# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3464#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003465# $0 $ac_configure_args
3466#
3467# Compiler output produced by configure, useful for debugging
3468# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003469
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003470ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003471for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003472do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003473 case "\$ac_option" in
3474 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003475 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3476 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003477 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003478 echo "$CONFIG_STATUS generated by autoconf version 2.10"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003479 exit 0 ;;
3480 -help | --help | --hel | --he | --h)
3481 echo "\$ac_cs_usage"; exit 0 ;;
3482 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003483 esac
3484done
3485
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003487
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003488trap 'rm -fr `echo "Makefile \
3489 Objects/Makefile \
3490 Parser/Makefile \
3491 Python/Makefile \
3492 Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003493EOF
3494cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003495
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003496# Protect against being on the right side of a sed subst in config.status.
3497sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3498 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003499$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003500$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003501s%@CFLAGS@%$CFLAGS%g
3502s%@CPPFLAGS@%$CPPFLAGS%g
3503s%@CXXFLAGS@%$CXXFLAGS%g
3504s%@DEFS@%$DEFS%g
3505s%@LDFLAGS@%$LDFLAGS%g
3506s%@LIBS@%$LIBS%g
3507s%@exec_prefix@%$exec_prefix%g
3508s%@prefix@%$prefix%g
3509s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003510s%@bindir@%$bindir%g
3511s%@sbindir@%$sbindir%g
3512s%@libexecdir@%$libexecdir%g
3513s%@datadir@%$datadir%g
3514s%@sysconfdir@%$sysconfdir%g
3515s%@sharedstatedir@%$sharedstatedir%g
3516s%@localstatedir@%$localstatedir%g
3517s%@libdir@%$libdir%g
3518s%@includedir@%$includedir%g
3519s%@oldincludedir@%$oldincludedir%g
3520s%@infodir@%$infodir%g
3521s%@mandir@%$mandir%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003522s%@MACHDEP@%$MACHDEP%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003523s%@CC@%$CC%g
3524s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003525s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003526s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003527s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3528s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003529s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003530s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003531s%@SO@%$SO%g
3532s%@LDSHARED@%$LDSHARED%g
3533s%@CCSHARED@%$CCSHARED%g
3534s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003535s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003536s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003537s%@LIBM@%$LIBM%g
3538s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003539
3540CEOF
3541EOF
3542cat >> $CONFIG_STATUS <<EOF
3543
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003544CONFIG_FILES=\${CONFIG_FILES-"Makefile \
3545 Objects/Makefile \
3546 Parser/Makefile \
3547 Python/Makefile \
3548 Modules/Makefile.pre"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003549EOF
3550cat >> $CONFIG_STATUS <<\EOF
3551for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3552 # Support "outfile[:infile]", defaulting infile="outfile.in".
3553 case "$ac_file" in
3554 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3555 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3556 *) ac_file_in="${ac_file}.in" ;;
3557 esac
3558
3559 # Adjust relative srcdir, etc. for subdirectories.
3560
3561 # Remove last slash and all that follows it. Not all systems have dirname.
3562 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3563 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3564 # The file is in a subdirectory.
3565 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003566 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003567 # A "../" for each directory in $ac_dir_suffix.
3568 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3569 else
3570 ac_dir_suffix= ac_dots=
3571 fi
3572
3573 case "$ac_given_srcdir" in
3574 .) srcdir=.
3575 if test -z "$ac_dots"; then top_srcdir=.
3576 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3577 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3578 *) # Relative path.
3579 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3580 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3581 esac
3582
3583 echo creating "$ac_file"
3584 rm -f "$ac_file"
3585 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3586 case "$ac_file" in
3587 *Makefile*) ac_comsub="1i\\
3588# $configure_input" ;;
3589 *) ac_comsub= ;;
3590 esac
3591 sed -e "$ac_comsub
3592s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003593s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003594s%@top_srcdir@%$top_srcdir%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003595" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00003596fi; done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597rm -f conftest.subs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003598
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003599# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3600# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00003601#
3602# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003603ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3604ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003605ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003606ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003607# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003608ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3609ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003610ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003611ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003612# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003613ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3614ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003615ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003616ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003617
3618CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003619for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3620 # Support "outfile[:infile]", defaulting infile="outfile.in".
3621 case "$ac_file" in
3622 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3623 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3624 *) ac_file_in="${ac_file}.in" ;;
3625 esac
3626
Guido van Rossum7f43da71994-08-01 12:15:30 +00003627 echo creating $ac_file
3628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003629 rm -f conftest.frag conftest.in conftest.out
3630 cp $ac_given_srcdir/$ac_file_in conftest.in
3631
3632EOF
3633
3634# Transform confdefs.h into a sed script conftest.vals that substitutes
3635# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003636# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003637# Protect against being in an unquoted here document in config.status.
3638rm -f conftest.vals
3639cat > conftest.hdr <<\EOF
3640s/[\\&%]/\\&/g
3641s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003642s%#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 +00003643s%ac_d%ac_u%gp
3644s%ac_u%ac_e%gp
3645EOF
3646sed -n -f conftest.hdr confdefs.h > conftest.vals
3647rm -f conftest.hdr
3648
3649# This sed command replaces #undef with comments. This is necessary, for
3650# example, in the case of _POSIX_SOURCE, which is predefined and required
3651# on some systems where configure will not decide to define it.
3652cat >> conftest.vals <<\EOF
3653s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3654EOF
3655
3656# Break up conftest.vals because some shells have a limit on
3657# the size of here documents, and old seds have small limits too.
3658# Maximum number of lines to put in a single here document.
3659ac_max_here_lines=12
3660
3661rm -f conftest.tail
3662while :
3663do
3664 ac_lines=`grep -c . conftest.vals`
3665 # grep -c gives empty output for an empty file on some AIX systems.
3666 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3667 # Write a limited-size here document to conftest.frag.
3668 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3669 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3670 echo 'CEOF
3671 sed -f conftest.frag conftest.in > conftest.out
3672 rm -f conftest.in
3673 mv conftest.out conftest.in
3674' >> $CONFIG_STATUS
3675 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3676 rm -f conftest.vals
3677 mv conftest.tail conftest.vals
3678done
3679rm -f conftest.vals
3680
3681cat >> $CONFIG_STATUS <<\EOF
3682 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00003683 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003684 cat conftest.in >> conftest.h
3685 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00003686 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003687 echo "$ac_file is unchanged"
3688 rm -f conftest.h
3689 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003690 # Remove last slash and all that follows it. Not all systems have dirname.
3691 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3692 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3693 # The file is in a subdirectory.
3694 test ! -d "$ac_dir" && mkdir "$ac_dir"
3695 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003696 rm -f $ac_file
3697 mv conftest.h $ac_file
3698 fi
3699fi; done
3700
3701
Guido van Rossum627b2d71993-12-24 10:39:16 +00003702
3703exit 0
3704EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003705chmod +x $CONFIG_STATUS
3706rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003707test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003708