blob: 1fb0e8d4fa794efe8cc5cdfcbe661e6d53473160 [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 Rossum3c83bb41996-12-31 22:35:16 +00003# From configure.in Revision: 1.42
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 Rossum3c83bb41996-12-31 22:35:16 +000023--with-readline=DIRECTORY search GNU readline library in DIRECTORY
24--without-readline do not use GNU readline library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025ac_help="$ac_help
26--with-thread[=DIRECTORY] make interpreter thread-safe"
27ac_help="$ac_help
28--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
29ac_help="$ac_help
30--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
31ac_help="$ac_help
32--with-libm=STRING math library"
33ac_help="$ac_help
34--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000035
Guido van Rossum7f43da71994-08-01 12:15:30 +000036# Initialize some variables set by options.
37# The variables have the same names as the options, with
38# dashes changed to underlines.
39build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000040cache_file=./config.cache
41exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000042host=NONE
43no_create=
44nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000045no_recursion=
46prefix=NONE
47program_prefix=NONE
48program_suffix=NONE
49program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000050silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000051site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000052srcdir=
53target=NONE
54verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000055x_includes=NONE
56x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000057bindir='${exec_prefix}/bin'
58sbindir='${exec_prefix}/sbin'
59libexecdir='${exec_prefix}/libexec'
60datadir='${prefix}/share'
61sysconfdir='${prefix}/etc'
62sharedstatedir='${prefix}/com'
63localstatedir='${prefix}/var'
64libdir='${exec_prefix}/lib'
65includedir='${prefix}/include'
66oldincludedir='/usr/include'
67infodir='${prefix}/info'
68mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000069
70# Initialize some other variables.
71subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000072MFLAGS= MAKEFLAGS=
Guido van Rossum7f43da71994-08-01 12:15:30 +000073
74ac_prev=
75for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000076do
Guido van Rossum627b2d71993-12-24 10:39:16 +000077
Guido van Rossum7f43da71994-08-01 12:15:30 +000078 # If the previous option needs an argument, assign it.
79 if test -n "$ac_prev"; then
80 eval "$ac_prev=\$ac_option"
81 ac_prev=
82 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000083 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000084
Guido van Rossum7f43da71994-08-01 12:15:30 +000085 case "$ac_option" in
86 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
87 *) ac_optarg= ;;
88 esac
89
Guido van Rossum76be6ed1995-01-02 18:33:54 +000090 # Accept the important Cygnus configure options, so we can diagnose typos.
91
Guido van Rossum7f43da71994-08-01 12:15:30 +000092 case "$ac_option" in
93
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000094 -bindir | --bindir | --bindi | --bind | --bin | --bi)
95 ac_prev=bindir ;;
96 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
97 bindir="$ac_optarg" ;;
98
99 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000100 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000101 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102 build="$ac_optarg" ;;
103
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000104 -cache-file | --cache-file | --cache-fil | --cache-fi \
105 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
106 ac_prev=cache_file ;;
107 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
108 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
109 cache_file="$ac_optarg" ;;
110
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000111 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
112 ac_prev=datadir ;;
113 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
114 | --da=*)
115 datadir="$ac_optarg" ;;
116
Guido van Rossum7f43da71994-08-01 12:15:30 +0000117 -disable-* | --disable-*)
118 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000119 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000121 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000122 fi
123 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
124 eval "enable_${ac_feature}=no" ;;
125
126 -enable-* | --enable-*)
127 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000128 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000130 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 fi
132 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
133 case "$ac_option" in
134 *=*) ;;
135 *) ac_optarg=yes ;;
136 esac
137 eval "enable_${ac_feature}='$ac_optarg'" ;;
138
Guido van Rossum7f43da71994-08-01 12:15:30 +0000139 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
140 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
141 | --exec | --exe | --ex)
142 ac_prev=exec_prefix ;;
143 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
144 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
145 | --exec=* | --exe=* | --ex=*)
146 exec_prefix="$ac_optarg" ;;
147
148 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000149 # Obsolete; use --with-gas.
150 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151
152 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000153 # Omit some internal or obsolete options to make the list less imposing.
154 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000155 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000156Usage: configure [options] [host]
157Options: [defaults in brackets after descriptions]
158Configuration:
159 --cache-file=FILE cache test results in FILE
160 --help print this message
161 --no-create do not create output files
162 --quiet, --silent do not print \`checking...' messages
163 --version print the version of autoconf that created configure
164Directory and file names:
165 --prefix=PREFIX install architecture-independent files in PREFIX
166 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000167 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000168 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000169 --bindir=DIR user executables in DIR [EPREFIX/bin]
170 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
171 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
172 --datadir=DIR read-only architecture-independent data in DIR
173 [PREFIX/share]
174 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
175 --sharedstatedir=DIR modifiable architecture-independent data in DIR
176 [PREFIX/com]
177 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
178 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
179 --includedir=DIR C header files in DIR [PREFIX/include]
180 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
181 --infodir=DIR info documentation in DIR [PREFIX/info]
182 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000183 --srcdir=DIR find the sources in DIR [configure dir or ..]
184 --program-prefix=PREFIX prepend PREFIX to installed program names
185 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000186 --program-transform-name=PROGRAM
187 run sed PROGRAM on installed program names
188EOF
189 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000190Host type:
191 --build=BUILD configure for building on BUILD [BUILD=HOST]
192 --host=HOST configure for HOST [guessed]
193 --target=TARGET configure for TARGET [TARGET=HOST]
194Features and packages:
195 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
196 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
197 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
198 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
199 --x-includes=DIR X include files are in DIR
200 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000201EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000202 if test -n "$ac_help"; then
203 echo "--enable and --with options recognized:$ac_help"
204 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000205 exit 0 ;;
206
207 -host | --host | --hos | --ho)
208 ac_prev=host ;;
209 -host=* | --host=* | --hos=* | --ho=*)
210 host="$ac_optarg" ;;
211
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000212 -includedir | --includedir | --includedi | --included | --include \
213 | --includ | --inclu | --incl | --inc)
214 ac_prev=includedir ;;
215 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
216 | --includ=* | --inclu=* | --incl=* | --inc=*)
217 includedir="$ac_optarg" ;;
218
219 -infodir | --infodir | --infodi | --infod | --info | --inf)
220 ac_prev=infodir ;;
221 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
222 infodir="$ac_optarg" ;;
223
224 -libdir | --libdir | --libdi | --libd)
225 ac_prev=libdir ;;
226 -libdir=* | --libdir=* | --libdi=* | --libd=*)
227 libdir="$ac_optarg" ;;
228
229 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
230 | --libexe | --libex | --libe)
231 ac_prev=libexecdir ;;
232 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
233 | --libexe=* | --libex=* | --libe=*)
234 libexecdir="$ac_optarg" ;;
235
236 -localstatedir | --localstatedir | --localstatedi | --localstated \
237 | --localstate | --localstat | --localsta | --localst \
238 | --locals | --local | --loca | --loc | --lo)
239 ac_prev=localstatedir ;;
240 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
241 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
242 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
243 localstatedir="$ac_optarg" ;;
244
245 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
246 ac_prev=mandir ;;
247 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
248 mandir="$ac_optarg" ;;
249
Guido van Rossum7f43da71994-08-01 12:15:30 +0000250 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000251 # Obsolete; use --without-fp.
252 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000253
254 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
255 | --no-cr | --no-c)
256 no_create=yes ;;
257
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000258 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
259 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
260 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000261
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000262 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
263 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
264 | --oldin | --oldi | --old | --ol | --o)
265 ac_prev=oldincludedir ;;
266 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
267 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
268 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
269 oldincludedir="$ac_optarg" ;;
270
Guido van Rossum7f43da71994-08-01 12:15:30 +0000271 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
272 ac_prev=prefix ;;
273 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
274 prefix="$ac_optarg" ;;
275
276 -program-prefix | --program-prefix | --program-prefi | --program-pref \
277 | --program-pre | --program-pr | --program-p)
278 ac_prev=program_prefix ;;
279 -program-prefix=* | --program-prefix=* | --program-prefi=* \
280 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
281 program_prefix="$ac_optarg" ;;
282
283 -program-suffix | --program-suffix | --program-suffi | --program-suff \
284 | --program-suf | --program-su | --program-s)
285 ac_prev=program_suffix ;;
286 -program-suffix=* | --program-suffix=* | --program-suffi=* \
287 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
288 program_suffix="$ac_optarg" ;;
289
290 -program-transform-name | --program-transform-name \
291 | --program-transform-nam | --program-transform-na \
292 | --program-transform-n | --program-transform- \
293 | --program-transform | --program-transfor \
294 | --program-transfo | --program-transf \
295 | --program-trans | --program-tran \
296 | --progr-tra | --program-tr | --program-t)
297 ac_prev=program_transform_name ;;
298 -program-transform-name=* | --program-transform-name=* \
299 | --program-transform-nam=* | --program-transform-na=* \
300 | --program-transform-n=* | --program-transform-=* \
301 | --program-transform=* | --program-transfor=* \
302 | --program-transfo=* | --program-transf=* \
303 | --program-trans=* | --program-tran=* \
304 | --progr-tra=* | --program-tr=* | --program-t=*)
305 program_transform_name="$ac_optarg" ;;
306
307 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
308 | -silent | --silent | --silen | --sile | --sil)
309 silent=yes ;;
310
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000311 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
312 ac_prev=sbindir ;;
313 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
314 | --sbi=* | --sb=*)
315 sbindir="$ac_optarg" ;;
316
317 -sharedstatedir | --sharedstatedir | --sharedstatedi \
318 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
319 | --sharedst | --shareds | --shared | --share | --shar \
320 | --sha | --sh)
321 ac_prev=sharedstatedir ;;
322 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
323 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
324 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
325 | --sha=* | --sh=*)
326 sharedstatedir="$ac_optarg" ;;
327
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000328 -site | --site | --sit)
329 ac_prev=site ;;
330 -site=* | --site=* | --sit=*)
331 site="$ac_optarg" ;;
332
Guido van Rossum7f43da71994-08-01 12:15:30 +0000333 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
334 ac_prev=srcdir ;;
335 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
336 srcdir="$ac_optarg" ;;
337
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000338 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
339 | --syscon | --sysco | --sysc | --sys | --sy)
340 ac_prev=sysconfdir ;;
341 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
342 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
343 sysconfdir="$ac_optarg" ;;
344
Guido van Rossum7f43da71994-08-01 12:15:30 +0000345 -target | --target | --targe | --targ | --tar | --ta | --t)
346 ac_prev=target ;;
347 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
348 target="$ac_optarg" ;;
349
350 -v | -verbose | --verbose | --verbos | --verbo | --verb)
351 verbose=yes ;;
352
353 -version | --version | --versio | --versi | --vers)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000354 echo "configure generated by autoconf version 2.10"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000355 exit 0 ;;
356
357 -with-* | --with-*)
358 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000359 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000360 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000361 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 fi
363 ac_package=`echo $ac_package| sed 's/-/_/g'`
364 case "$ac_option" in
365 *=*) ;;
366 *) ac_optarg=yes ;;
367 esac
368 eval "with_${ac_package}='$ac_optarg'" ;;
369
370 -without-* | --without-*)
371 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000372 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000373 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000375 fi
376 ac_package=`echo $ac_package| sed 's/-/_/g'`
377 eval "with_${ac_package}=no" ;;
378
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 --x)
380 # Obsolete; use --with-x.
381 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000382
383 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
384 | --x-incl | --x-inc | --x-in | --x-i)
385 ac_prev=x_includes ;;
386 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
387 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
388 x_includes="$ac_optarg" ;;
389
390 -x-libraries | --x-libraries | --x-librarie | --x-librari \
391 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
392 ac_prev=x_libraries ;;
393 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
394 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
395 x_libraries="$ac_optarg" ;;
396
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398 ;;
399
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000400 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000401 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000402 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000404 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000405 { 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 +0000406 fi
407 nonopt="$ac_option"
408 ;;
409
410 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000411done
412
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000414 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415fi
416
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000417trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000418
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000419# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000420# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421# 1 file creation
422# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000423# 3 some systems may open it to /dev/tty
424# 4 used on the Kubota Titan
425# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426# 5 compiler messages saved in config.log
427if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000428 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000429else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000430 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431fi
432exec 5>./config.log
433
434echo "\
435This file contains any messages produced by compilers while
436running configure, to aid debugging if configure makes a mistake.
437" 1>&5
438
439# Strip out --no-create and --no-recursion so they do not pile up.
440# Also quote any args containing shell metacharacters.
441ac_configure_args=
442for ac_arg
443do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444 case "$ac_arg" in
445 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
446 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000447 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
448 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
449 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
450 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
451 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000452 esac
453done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000454
455# NLS nuisances.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000456# Only set LANG and LC_ALL to C if already set.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000457# These must not be set unconditionally because not all systems understand
458# e.g. LANG=C (notably SCO).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000459if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
460if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000461
Guido van Rossum7f43da71994-08-01 12:15:30 +0000462# confdefs.h avoids OS command line length limits that DEFS can exceed.
463rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000464# AIX cpp loses on an empty file, so make sure it contains at least a newline.
465echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000466
467# A filename unique to this package, relative to the directory that
468# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000470
471# Find the source files, if location was not specified.
472if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000473 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000475 ac_prog=$0
476 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
477 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
478 srcdir=$ac_confdir
479 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480 srcdir=..
481 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000482else
483 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000484fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000485if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000486 if test "$ac_srcdir_defaulted" = yes; then
487 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000488 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000490 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000491fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000492srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
493
494# Prefer explicitly selected file to automatically selected ones.
495if test -z "$CONFIG_SITE"; then
496 if test "x$prefix" != xNONE; then
497 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
498 else
499 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
500 fi
501fi
502for ac_site_file in $CONFIG_SITE; do
503 if test -r "$ac_site_file"; then
504 echo "loading site script $ac_site_file"
505 . "$ac_site_file"
506 fi
507done
508
509if test -r "$cache_file"; then
510 echo "loading cache $cache_file"
511 . $cache_file
512else
513 echo "creating cache $cache_file"
514 > $cache_file
515fi
516
Guido van Rossum7f43da71994-08-01 12:15:30 +0000517ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000518# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000519ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000520ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
521ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000522
523if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
526 ac_n= ac_c='
527' ac_t=' '
528 else
529 ac_n=-n ac_c= ac_t=
530 fi
531else
532 ac_n= ac_c='\c' ac_t=
533fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000534
Guido van Rossum0a516c91994-09-12 10:58:40 +0000535
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000536
Guido van Rossum627b2d71993-12-24 10:39:16 +0000537
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000538# NEXTSTEP stuff
Guido van Rossum563e7081996-09-10 18:20:48 +0000539if test -f /usr/lib/NextStep/software_version; then
540
541 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
542 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000543if test "${with_next_archs+set}" = set; then
544 withval="$with_next_archs"
545
Guido van Rossum563e7081996-09-10 18:20:48 +0000546 if test -n "$withval"; then
547 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
548 # GCC does not currently support multi archs on the NeXT
549 with_gcc=no
550 fi
551 echo "$ac_t""$with_next_archs" 1>&6
552
553else
554 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000555fi
556
Guido van Rossum563e7081996-09-10 18:20:48 +0000557
558 if test -z "$MACHDEP"
559 then
560 set X `hostinfo | grep 'NeXT Mach.*:' | \
561 sed -e 's/://' -e 's/\./_/'` && \
562 ac_sys_system=next && ac_sys_release=$4
563
564 MACHDEP="$ac_sys_system$ac_sys_release"
565 fi
566fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000567
568# Set name for machine-dependent library files
569
570echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
571if test -z "$MACHDEP"
572then
Guido van Rossum563e7081996-09-10 18:20:48 +0000573 ac_sys_system=`uname -s`
574 if test "$ac_sys_system" = "AIX" ; then
575 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000576 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000577 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000578 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000579 ac_md_system=`echo $ac_sys_system |
580 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
581 ac_md_release=`echo $ac_sys_release |
582 tr -d '/ ' | sed 's/\..*//'`
583 MACHDEP="$ac_md_system$ac_md_release"
584
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585 case MACHDEP in
586 '') MACHDEP=unknown;;
587 esac
588fi
589echo "$ac_t""$MACHDEP" 1>&6
590
Guido van Rossum627b2d71993-12-24 10:39:16 +0000591# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000592echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000593# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000594if test "${with_gcc+set}" = set; then
595 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000596
597 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000598 no) CC=cc
599 without_gcc=yes;;
600 yes) CC=gcc
601 without_gcc=no;;
602 *) CC=$withval
603 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000605else
Guido van Rossume77438c1995-09-13 18:59:59 +0000606
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000607 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000608 OSF1) CC=cc
609 without_gcc=;;
610 *) without_gcc=no;;
611 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000612fi
613
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000614echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000615
Guido van Rossum8b131c51995-03-09 14:10:13 +0000616# If the user switches compilers, we can't believe the cache
617if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
618then
619 { echo "configure: error: cached CC is different -- throw away $cache_file
620(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
621fi
622
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000623# Extract the first word of "gcc", so it can be a program name with args.
624set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000625echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
626if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
627 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000628else
629 if test -n "$CC"; then
630 ac_cv_prog_CC="$CC" # Let the user override the test.
631else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000632 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
633 for ac_dir in $PATH; do
634 test -z "$ac_dir" && ac_dir=.
635 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000636 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000637 break
638 fi
639 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000640 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000641fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000642fi
643CC="$ac_cv_prog_CC"
644if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000645 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000647 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000648fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000649
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000650if test -z "$CC"; then
651 # Extract the first word of "cc", so it can be a program name with args.
652set dummy cc; ac_word=$2
653echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
654if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
655 echo $ac_n "(cached) $ac_c" 1>&6
656else
657 if test -n "$CC"; then
658 ac_cv_prog_CC="$CC" # Let the user override the test.
659else
660 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
661 ac_prog_rejected=no
662 for ac_dir in $PATH; do
663 test -z "$ac_dir" && ac_dir=.
664 if test -f $ac_dir/$ac_word; then
665 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
666 ac_prog_rejected=yes
667 continue
668 fi
669 ac_cv_prog_CC="cc"
670 break
671 fi
672 done
673 IFS="$ac_save_ifs"
674if test $ac_prog_rejected = yes; then
675 # We found a bogon in the path, so make sure we never use it.
676 set dummy $ac_cv_prog_CC
677 shift
678 if test $# -gt 0; then
679 # We chose a different compiler from the bogus one.
680 # However, it has the same basename, so the bogon will be chosen
681 # first if we set CC to just the basename; use the full file name.
682 shift
683 set dummy "$ac_dir/$ac_word" "$@"
684 shift
685 ac_cv_prog_CC="$@"
686 fi
687fi
688fi
689fi
690CC="$ac_cv_prog_CC"
691if test -n "$CC"; then
692 echo "$ac_t""$CC" 1>&6
693else
694 echo "$ac_t""no" 1>&6
695fi
696
697 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
698fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000699
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000700echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
701if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
702 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000703else
704 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000705#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000706 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000707#endif
708EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000709if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000710 ac_cv_prog_gcc=yes
711else
712 ac_cv_prog_gcc=no
713fi
714fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000715
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000716echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000717if test $ac_cv_prog_gcc = yes; then
718 GCC=yes
719 if test "${CFLAGS+set}" != set; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000720 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
721if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
722 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000723else
724 echo 'void f(){}' > conftest.c
725if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
726 ac_cv_prog_gcc_g=yes
727else
728 ac_cv_prog_gcc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000729fi
730rm -f conftest*
731
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000732fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000733
734echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000735 if test $ac_cv_prog_gcc_g = yes; then
736 CFLAGS="-g -O"
737 else
738 CFLAGS="-O"
739 fi
740 fi
741else
742 GCC=
743 test "${CFLAGS+set}" = set || CFLAGS="-g"
744fi
745
746# Extract the first word of "ranlib", so it can be a program name with args.
747set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000748echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
749if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
750 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000751else
752 if test -n "$RANLIB"; then
753 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
754else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
756 for ac_dir in $PATH; do
757 test -z "$ac_dir" && ac_dir=.
758 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000760 break
761 fi
762 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000765fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766fi
767RANLIB="$ac_cv_prog_RANLIB"
768if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000769 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000771 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000772fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000773
774
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775for ac_prog in ar aal
776do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000777# Extract the first word of "$ac_prog", so it can be a program name with args.
778set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000779echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
780if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
781 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782else
783 if test -n "$AR"; then
784 ac_cv_prog_AR="$AR" # Let the user override the test.
785else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
787 for ac_dir in $PATH; do
788 test -z "$ac_dir" && ac_dir=.
789 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000791 break
792 fi
793 done
794 IFS="$ac_save_ifs"
795fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796fi
797AR="$ac_cv_prog_AR"
798if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000799 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000801 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803
804test -n "$AR" && break
805done
806test -n "$AR" || AR="ar"
807
808
Guido van Rossumda88dad1995-01-26 00:46:29 +0000809
810
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000811# Install just never works :-(
812if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000813then
814 INSTALL=cp
815 INSTALL_PROGRAM=cp
816 INSTALL_DATA=cp
817else
818 INSTALL_PROGRAM="$INSTALL"
819 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000820fi
821
822# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000823
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000824if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000825then
826 case $ac_sys_system in
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000827 *) OPT="-O";;
828 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000829fi
830
Guido van Rossum563e7081996-09-10 18:20:48 +0000831if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000832then
833 OPT="$OPT $ac_arch_flags"
834fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000836echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837# On Suns, sometimes $CPP names a directory.
838if test -n "$CPP" && test -d "$CPP"; then
839 CPP=
840fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000842if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
843 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844else
845 # This must be in double quotes, not single quotes, because CPP may get
846 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000847 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 # On the NeXT, cc -E runs the code through the compiler's parser,
849 # not just through cpp.
850 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000851#line 852 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854Syntax Error
855EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000857{ (eval echo configure:858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859if test -z "$ac_err"; then
860 :
861else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862 echo "$ac_err" >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863 rm -rf conftest*
864 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000866#line 867 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869Syntax Error
870EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000872{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000875 :
876else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000878 rm -rf conftest*
879 CPP=/lib/cpp
880fi
881rm -f conftest*
882fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885fi
Guido van Rossume77438c1995-09-13 18:59:59 +0000886 CPP="$ac_cv_prog_CPP"
887else
888 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000890echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000892echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000894#line 895 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000895#include "confdefs.h"
896#ifdef _AIX
897 yes
898#endif
899
900EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
902 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000903 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000904 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905#define _ALL_SOURCE 1
906EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908else
909 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000910 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911fi
912rm -f conftest*
913
914
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915ac_safe=`echo "minix/config.h" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000916echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
917if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
918 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919else
920 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000921#line 922 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922#include "confdefs.h"
923#include <minix/config.h>
924EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000926{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000929 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000931else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 echo "$ac_err" >&5
933 rm -rf conftest*
934 eval "ac_cv_header_$ac_safe=no"
935fi
936rm -f conftest*
937fi
938if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000939 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 MINIX=yes
941else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000942 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +0000944fi
945
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946if test "$MINIX" = yes; then
947 cat >> confdefs.h <<\EOF
948#define _POSIX_SOURCE 1
949EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000950
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 cat >> confdefs.h <<\EOF
952#define _POSIX_1_SOURCE 2
953EOF
954
955 cat >> confdefs.h <<\EOF
956#define _MINIX 1
957EOF
958
959fi
960
Guido van Rossumda88dad1995-01-26 00:46:29 +0000961
Guido van Rossum84e7b241996-08-19 21:59:00 +0000962# check for ANSI or K&R ("traditional") preprocessor
963echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
964cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000965#line 966 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +0000966#include "confdefs.h"
967
968#define spam(name, doc) {#name, &name, #name "() -- " doc}
969int foo;
970struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
971
972int main() { return 0; }
973int t() {
974;
975; return 0; }
976EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +0000977if { (eval echo configure:978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +0000978 rm -rf conftest*
979 cpp_type=ansi
980else
981 rm -rf conftest*
982 cat >> confdefs.h <<\EOF
983#define HAVE_OLD_CPP 1
984EOF
985 cpp_type=traditional
986fi
987rm -f conftest*
988
989echo "$ac_t""$cpp_type" 1>&6
990
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000991# checks for header files
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992# If we cannot run a trivial program, we must be cross compiling.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000993echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
994if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
995 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996else
997 if test "$cross_compiling" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000998 ac_cv_c_cross=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999else
1000cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001001#line 1002 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002#include "confdefs.h"
1003main(){return(0);}
1004EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001005{ (eval echo configure:1006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001006if test -s conftest && (./conftest; exit) 2>/dev/null; then
1007 ac_cv_c_cross=no
1008else
1009 ac_cv_c_cross=yes
1010fi
1011fi
1012rm -fr conftest*
1013fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001015echo "$ac_t""$ac_cv_c_cross" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016cross_compiling=$ac_cv_c_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001018echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1019if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1020 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001021else
1022 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001023#line 1024 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001024#include "confdefs.h"
1025#include <stdlib.h>
1026#include <stdarg.h>
1027#include <string.h>
1028#include <float.h>
1029EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001031{ (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001034 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 ac_cv_header_stdc=yes
1036else
1037 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001038 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039 ac_cv_header_stdc=no
1040fi
1041rm -f conftest*
1042
1043if test $ac_cv_header_stdc = yes; then
1044 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1045cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001046#line 1047 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047#include "confdefs.h"
1048#include <string.h>
1049EOF
1050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1051 egrep "memchr" >/dev/null 2>&1; then
1052 :
1053else
1054 rm -rf conftest*
1055 ac_cv_header_stdc=no
1056fi
1057rm -f conftest*
1058
1059fi
1060
1061if test $ac_cv_header_stdc = yes; then
1062 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1063cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001064#line 1065 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065#include "confdefs.h"
1066#include <stdlib.h>
1067EOF
1068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1069 egrep "free" >/dev/null 2>&1; then
1070 :
1071else
1072 rm -rf conftest*
1073 ac_cv_header_stdc=no
1074fi
1075rm -f conftest*
1076
1077fi
1078
1079if test $ac_cv_header_stdc = yes; then
1080 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1081if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083else
1084cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001085#line 1086 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001086#include "confdefs.h"
1087#include <ctype.h>
1088#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1089#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001091int main () { int i; for (i = 0; i < 256; i++)
1092if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1093exit (0); }
1094
1095EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001096{ (eval echo configure:1097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001097if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001098 :
1099else
1100 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001101fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001103rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104fi
1105fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001107echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108if test $ac_cv_header_stdc = yes; then
1109 cat >> confdefs.h <<\EOF
1110#define STDC_HEADERS 1
1111EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001112
1113fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001114
Guido van Rossum2d38f911996-06-26 19:47:01 +00001115for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h \
1116signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001117sys/audioio.h sys/file.h sys/lock.h \
1118sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001119sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001120do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001122echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1123if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1124 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125else
1126 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001127#line 1128 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001129#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001130EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001131ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001132{ (eval echo configure:1133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001135 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 eval "ac_cv_header_$ac_safe=yes"
1137else
1138 echo "$ac_err" >&5
1139 rm -rf conftest*
1140 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001141fi
1142rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143fi
1144if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001145 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001147 cat >> confdefs.h <<EOF
1148#define $ac_tr_hdr 1
1149EOF
1150
1151else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001152 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154done
1155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156ac_header_dirent=no
1157for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1158do
1159ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001160echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1161if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1162 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001163else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001165#line 1166 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166#include "confdefs.h"
1167#include <sys/types.h>
1168#include <$ac_hdr>
1169int main() { return 0; }
1170int t() {
1171DIR *dirp = 0;
1172; return 0; }
1173EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001174if { (eval echo configure:1175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 rm -rf conftest*
1176 eval "ac_cv_header_dirent_$ac_safe=yes"
1177else
1178 rm -rf conftest*
1179 eval "ac_cv_header_dirent_$ac_safe=no"
1180fi
1181rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182
1183fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001185 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 cat >> confdefs.h <<EOF
1188#define $ac_tr_hdr 1
1189EOF
1190 ac_header_dirent=$ac_hdr; break
1191else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001192 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193fi
1194done
1195# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1196if test $ac_header_dirent = dirent.h; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001197echo $ac_n "checking for -ldir""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001198ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
1199if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001200 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201else
1202 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001203LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001205#line 1206 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001207/* Override any gcc2 internal prototype to avoid an error. */
1208/* We use char because int might match the return type of a gcc2
1209 builtin and then its argument prototype would still apply. */
1210char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211
1212int main() { return 0; }
1213int t() {
1214opendir()
1215; return 0; }
1216EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001217if { (eval echo configure:1218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001219 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220else
1221 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001222 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223fi
1224rm -f conftest*
1225LIBS="$ac_save_LIBS"
1226
1227fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001228if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001229 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230 LIBS="$LIBS -ldir"
1231else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001232 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233fi
1234
1235else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001236echo $ac_n "checking for -lx""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001237ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
1238if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001239 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240else
1241 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001242LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001244#line 1245 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001246/* Override any gcc2 internal prototype to avoid an error. */
1247/* We use char because int might match the return type of a gcc2
1248 builtin and then its argument prototype would still apply. */
1249char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250
1251int main() { return 0; }
1252int t() {
1253opendir()
1254; return 0; }
1255EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001256if { (eval echo configure:1257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001257 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001259else
1260 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001261 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001262fi
1263rm -f conftest*
1264LIBS="$ac_save_LIBS"
1265
1266fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001267if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001268 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269 LIBS="$LIBS -lx"
1270else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001271 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272fi
1273
1274fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
1276
1277# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001278was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001279echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001281#line 1282 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001282#include "confdefs.h"
1283#include <time.h>
1284EOF
1285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1286 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001287 rm -rf conftest*
1288 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289else
1290 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291 cat >> confdefs.h <<\EOF
1292#define clock_t long
1293EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294
1295fi
1296rm -f conftest*
1297
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001298echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001299
Guido van Rossum84e7b241996-08-19 21:59:00 +00001300# Add some code to confdefs.h so that the test for off_t works on SCO
1301cat >> confdefs.h <<\EOF
1302#if defined(SCO_DS)
1303#undef _OFF_T
1304#endif
1305EOF
1306
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001307echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1308if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1309 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310else
1311 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001312#line 1313 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313#include "confdefs.h"
1314#include <sys/types.h>
1315#if STDC_HEADERS
1316#include <stdlib.h>
1317#endif
1318EOF
1319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1320 egrep "mode_t" >/dev/null 2>&1; then
1321 rm -rf conftest*
1322 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323else
1324 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326fi
1327rm -f conftest*
1328
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001329fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001330echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331if test $ac_cv_type_mode_t = no; then
1332 cat >> confdefs.h <<\EOF
1333#define mode_t int
1334EOF
1335
1336fi
1337
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001338echo $ac_n "checking for off_t""... $ac_c" 1>&6
1339if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1340 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341else
1342 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001343#line 1344 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344#include "confdefs.h"
1345#include <sys/types.h>
1346#if STDC_HEADERS
1347#include <stdlib.h>
1348#endif
1349EOF
1350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1351 egrep "off_t" >/dev/null 2>&1; then
1352 rm -rf conftest*
1353 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354else
1355 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357fi
1358rm -f conftest*
1359
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001360fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001361echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362if test $ac_cv_type_off_t = no; then
1363 cat >> confdefs.h <<\EOF
1364#define off_t long
1365EOF
1366
1367fi
1368
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001369echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1370if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1371 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001372else
1373 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001374#line 1375 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375#include "confdefs.h"
1376#include <sys/types.h>
1377#if STDC_HEADERS
1378#include <stdlib.h>
1379#endif
1380EOF
1381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1382 egrep "pid_t" >/dev/null 2>&1; then
1383 rm -rf conftest*
1384 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001385else
1386 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001387 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001388fi
1389rm -f conftest*
1390
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001392echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393if test $ac_cv_type_pid_t = no; then
1394 cat >> confdefs.h <<\EOF
1395#define pid_t int
1396EOF
1397
1398fi
1399
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001400echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1401if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1402 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001403else
1404 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001405#line 1406 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001406#include "confdefs.h"
1407#include <sys/types.h>
1408#include <signal.h>
1409#ifdef signal
1410#undef signal
1411#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001412#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001413extern "C" void (*signal (int, void (*)(int)))(int);
1414#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001415void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001416#endif
1417
Guido van Rossum7f43da71994-08-01 12:15:30 +00001418int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001419int t() {
1420int i;
1421; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001422EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001423if { (eval echo configure:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001424 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001425 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001426else
1427 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001428 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001429fi
1430rm -f conftest*
1431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001432fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001433
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001434echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001435cat >> confdefs.h <<EOF
1436#define RETSIGTYPE $ac_cv_type_signal
1437EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001439
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001440echo $ac_n "checking for size_t""... $ac_c" 1>&6
1441if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1442 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001443else
1444 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001445#line 1446 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001446#include "confdefs.h"
1447#include <sys/types.h>
1448#if STDC_HEADERS
1449#include <stdlib.h>
1450#endif
1451EOF
1452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1453 egrep "size_t" >/dev/null 2>&1; then
1454 rm -rf conftest*
1455 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001456else
1457 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001458 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001459fi
1460rm -f conftest*
1461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001462fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001463echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001464if test $ac_cv_type_size_t = no; then
1465 cat >> confdefs.h <<\EOF
1466#define size_t unsigned
1467EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001468
1469fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001470
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001471echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1472if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1473 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001474else
1475 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001476#line 1477 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001477#include "confdefs.h"
1478#include <sys/types.h>
1479EOF
1480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1481 egrep "uid_t" >/dev/null 2>&1; then
1482 rm -rf conftest*
1483 ac_cv_type_uid_t=yes
1484else
1485 rm -rf conftest*
1486 ac_cv_type_uid_t=no
1487fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001488rm -f conftest*
1489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001490fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001491
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001492echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493if test $ac_cv_type_uid_t = no; then
1494 cat >> confdefs.h <<\EOF
1495#define uid_t int
1496EOF
1497
1498 cat >> confdefs.h <<\EOF
1499#define gid_t int
1500EOF
1501
1502fi
1503
Guido van Rossum627b2d71993-12-24 10:39:16 +00001504
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001505echo $ac_n "checking size of int""... $ac_c" 1>&6
1506if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1508else
1509 if test "$cross_compiling" = yes; then
1510 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1511else
1512cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001513#line 1514 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001514#include "confdefs.h"
1515#include <stdio.h>
1516main()
1517{
1518 FILE *f=fopen("conftestval", "w");
1519 if (!f) exit(1);
1520 fprintf(f, "%d\n", sizeof(int));
1521 exit(0);
1522}
1523EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001524{ (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001525if test -s conftest && (./conftest; exit) 2>/dev/null; then
1526 ac_cv_sizeof_int=`cat conftestval`
1527else
1528 ac_cv_sizeof_int=0
1529fi
1530fi
1531rm -fr conftest*
1532fi
1533echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1534cat >> confdefs.h <<EOF
1535#define SIZEOF_INT $ac_cv_sizeof_int
1536EOF
1537
1538
1539echo $ac_n "checking size of long""... $ac_c" 1>&6
1540if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1541 echo $ac_n "(cached) $ac_c" 1>&6
1542else
1543 if test "$cross_compiling" = yes; then
1544 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1545else
1546cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001547#line 1548 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001548#include "confdefs.h"
1549#include <stdio.h>
1550main()
1551{
1552 FILE *f=fopen("conftestval", "w");
1553 if (!f) exit(1);
1554 fprintf(f, "%d\n", sizeof(long));
1555 exit(0);
1556}
1557EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001558{ (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001559if test -s conftest && (./conftest; exit) 2>/dev/null; then
1560 ac_cv_sizeof_long=`cat conftestval`
1561else
1562 ac_cv_sizeof_long=0
1563fi
1564fi
1565rm -fr conftest*
1566fi
1567echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1568cat >> confdefs.h <<EOF
1569#define SIZEOF_LONG $ac_cv_sizeof_long
1570EOF
1571
1572
Guido van Rossum0a516c91994-09-12 10:58:40 +00001573
1574# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001575
1576
1577
1578
Guido van Rossum0a516c91994-09-12 10:58:40 +00001579# SO is the extension of shared libraries `(including the dot!)
1580# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001581echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001582if test -z "$SO"
1583then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001585 hp*|HP*) SO=.sl;;
1586 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001587 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001588fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001589echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001590# LDSHARED is the ld *command* used to create shared library
1591# -- "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 +00001592echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001593if test -z "$LDSHARED"
1594then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001595 case $ac_sys_system/$ac_sys_release in
Guido van Rossum84e7b241996-08-19 21:59:00 +00001596 AIX*) LDSHARED="ld_so_aix \$(CC)";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001597 IRIX*) LDSHARED="ld -shared";;
1598 SunOS/4*) LDSHARED="ld";;
1599 SunOS/5*) LDSHARED="ld -G";;
1600 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001601 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1602 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001603 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001604 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001605 FreeBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001606 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001607 *) LDSHARED="ld";;
1608 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001609fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001610echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001611# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001612# library -- this is only needed for a few systems
1613echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001614if test -z "$CCSHARED"
1615then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616 case $ac_sys_system in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001617 hp*|HP*) if test "$GCC" = yes;
1618 then CCSHARED="-fpic";
1619 else CCSHARED="+z";
1620 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001621 Linux*) CCSHARED="-fpic";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001622 FreeBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001623 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001624 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001625fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001626echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001627# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001628# the python executable -- this is only needed for a few systems
1629echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001630if test -z "$LINKFORSHARED"
1631then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632 case $ac_sys_system in
Guido van Rossum6c31a141996-12-10 17:19:28 +00001633 AIX*) LINKFORSHARED="-Wl,-bE:python.exp -lld";;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001634 hp*|HP*)
1635 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/sharedmodules";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001636 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001637 next) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001638 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001639 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001640fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001641echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001642
Guido van Rossum627b2d71993-12-24 10:39:16 +00001643# checks for libraries
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001644echo $ac_n "checking for -ldl""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001645ac_lib_var=`echo dl'_'dlopen | tr './+\055' '__p_'`
1646if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001647 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648else
1649 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001650LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001652#line 1653 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001653#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001654/* Override any gcc2 internal prototype to avoid an error. */
1655/* We use char because int might match the return type of a gcc2
1656 builtin and then its argument prototype would still apply. */
1657char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001658
Guido van Rossum7f43da71994-08-01 12:15:30 +00001659int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660int t() {
1661dlopen()
1662; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001663EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001664if { (eval echo configure:1665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001665 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001666 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001667else
1668 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001669 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001670fi
1671rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001672LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001673
Guido van Rossum627b2d71993-12-24 10:39:16 +00001674fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001675if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001676 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001677 ac_tr_lib=HAVE_LIB`echo dl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678 cat >> confdefs.h <<EOF
1679#define $ac_tr_lib 1
1680EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001682 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001683
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001684else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001685 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686fi
1687 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001688echo $ac_n "checking for -ldld""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001689ac_lib_var=`echo dld'_'shl_load | tr './+\055' '__p_'`
1690if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001691 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692else
1693 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001694LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001695cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001696#line 1697 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001697#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001698/* Override any gcc2 internal prototype to avoid an error. */
1699/* We use char because int might match the return type of a gcc2
1700 builtin and then its argument prototype would still apply. */
1701char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001702
Guido van Rossum7f43da71994-08-01 12:15:30 +00001703int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704int t() {
1705shl_load()
1706; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001707EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001708if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001709 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001710 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001711else
1712 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001713 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001714fi
1715rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001717
Guido van Rossum627b2d71993-12-24 10:39:16 +00001718fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001719if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001720 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001721 ac_tr_lib=HAVE_LIB`echo dld | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722 cat >> confdefs.h <<EOF
1723#define $ac_tr_lib 1
1724EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001725
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001726 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727
1728else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001729 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001730fi
1731 # Dynamic linking for HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001732echo $ac_n "checking for -lsun""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001733ac_lib_var=`echo sun'_'getpwnam | tr './+\055' '__p_'`
1734if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001735 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001736else
1737 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001738LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001739cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001740#line 1741 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001741#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001742/* Override any gcc2 internal prototype to avoid an error. */
1743/* We use char because int might match the return type of a gcc2
1744 builtin and then its argument prototype would still apply. */
1745char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001746
1747int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001748int t() {
1749getpwnam()
1750; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001751EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001752if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001753 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001754 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755else
1756 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001757 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001758fi
1759rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001760LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001761
Guido van Rossum7f43da71994-08-01 12:15:30 +00001762fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001763if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001764 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001765 ac_tr_lib=HAVE_LIB`echo sun | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001766 cat >> confdefs.h <<EOF
1767#define $ac_tr_lib 1
1768EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001769
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001770 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001771
1772else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001773 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774fi
1775 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001776# The following three (nsl,inet,socket) are needed on Sequent;
1777# the order of checking must be this. Most SVR4 platforms will
1778# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1779# broken. I see no elegant solution (probably CHECK_LIB should be
1780# fixed to only add the library if the given entry point is not
1781# satisfied without it).
Guido van Rossum2b3ac691996-08-30 15:18:41 +00001782if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00001783then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001784echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001785ac_lib_var=`echo nsl'_'t_open | tr './+\055' '__p_'`
1786if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001787 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001788else
1789 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001790LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001791cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001792#line 1793 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001793#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001794/* Override any gcc2 internal prototype to avoid an error. */
1795/* We use char because int might match the return type of a gcc2
1796 builtin and then its argument prototype would still apply. */
1797char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001798
1799int main() { return 0; }
1800int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001801t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001802; return 0; }
1803EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001804if { (eval echo configure:1805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001805 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001806 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001807else
1808 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001809 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001810fi
1811rm -f conftest*
1812LIBS="$ac_save_LIBS"
1813
1814fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001815if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001816 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001817 LIBS="-lnsl $LIBS"
1818else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001819 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001820fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001821 # SVR4
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001822echo $ac_n "checking for -linet""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001823ac_lib_var=`echo inet'_'gethostbyname | tr './+\055' '__p_'`
1824if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001825 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001826else
1827 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001828LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001829cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001830#line 1831 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001831#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001832/* Override any gcc2 internal prototype to avoid an error. */
1833/* We use char because int might match the return type of a gcc2
1834 builtin and then its argument prototype would still apply. */
1835char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001836
1837int main() { return 0; }
1838int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001839gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001840; return 0; }
1841EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001842if { (eval echo configure:1843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001843 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001844 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001845else
1846 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001847 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001848fi
1849rm -f conftest*
1850LIBS="$ac_save_LIBS"
1851
1852fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001853if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001854 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001855 LIBS="-linet $LIBS"
1856else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001857 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001858fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001859 # Sequent
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001860echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001861ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
1862if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001863 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001864else
1865 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001866LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001867cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001868#line 1869 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001869#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001870/* Override any gcc2 internal prototype to avoid an error. */
1871/* We use char because int might match the return type of a gcc2
1872 builtin and then its argument prototype would still apply. */
1873char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001874
1875int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001876int t() {
1877socket()
1878; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001879EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001880if { (eval echo configure:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001881 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001882 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001883else
1884 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001885 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001886fi
1887rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001889
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001891if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001892 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001893 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001894else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001895 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001896fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001897 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00001898fi
Guido van Rossuma68acba1996-07-31 17:36:39 +00001899echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
1900# Check whether --with-libs or --without-libs was given.
1901if test "${with_libs+set}" = set; then
1902 withval="$with_libs"
1903
1904echo "$ac_t""$withval" 1>&6
1905LIBS="$withval $LIBS"
1906
1907else
1908 echo "$ac_t""no" 1>&6
1909fi
1910
Guido van Rossum7f43da71994-08-01 12:15:30 +00001911
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001912echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
1913use_readline="yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001915if test "${with_readline+set}" = set; then
1916 withval="$with_readline"
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001917 echo "$ac_t""$withval" 1>&6; use_readline="$withval"
1918else
1919 echo "$ac_t""(default) yes" 1>&6
1920fi
1921
1922if test "$use_readline" != "no"
1923then
1924 if test "$use_readline" != "yes"
1925 then add_ldflags="-L$use_readline"
1926 else add_ldflags=""
1927 fi
1928 # See where the termcap interface could be hiding...
1929 echo $ac_n "checking for readline and termcap libraries""... $ac_c" 1>&6
1930 if eval "test \"`echo '$''{'ac_cv_readline_termcap'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932else
Guido van Rossum7f43da71994-08-01 12:15:30 +00001933
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001934 echo "$ac_t""have to find out" 1>&6
1935 save_libs="$LIBS"
1936 save_ldflags="$LDFLAGS"
1937 LDFLAGS="$save_ldflags $add_ldflags"
1938 rl="-lreadline"
1939 first=""
1940 # Hack for SGI IRIX 5.x.
1941 # Both termcap and gl have an entry point clear().
1942 # When linking with both shared libraries, we're in trouble.
1943 # We don't need the one in termcap.
1944 # By forcing a static link for termcap, we avoid
1945 # linking its clear() entry point.
1946 if test -f /usr/lib/libgl.so -a -f /usr/lib/libtermcap.a
1947 then first="/usr/lib/libtermcap.a"
1948 fi
1949 for add_lib in \
1950 "$first" "-ltermcap" "-ltermlib" "-lcurses" "-lncurses"
1951 do
1952 echo $ac_n "checking for $rl $add_lib""... $ac_c" 1>&6
1953 LIBS="$save_libs $rl $add_lib"
1954 cat > conftest.$ac_ext <<EOF
1955#line 1956 "configure"
1956#include "confdefs.h"
1957extern char *readline();
1958int main() { return 0; }
1959int t() {
1960char *line=readline();
1961; return 0; }
1962EOF
1963if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1964 rm -rf conftest*
1965 echo "$ac_t""yes" 1>&6;
1966 ac_cv_readline_termcap="$rl $add_lib"
1967else
1968 rm -rf conftest*
1969 echo "$ac_t""no" 1>&6
1970fi
1971rm -f conftest*
1972
1973 if test "$ac_cv_readline_termcap" != ""
1974 then break
1975 fi
1976 done
1977 LIBS="$save_libs"
1978 LDFLAGS="$save_ldflags"
1979 echo $ac_n "checking result from check for readline and termcap""... $ac_c" 1>&6
1980
1981fi
1982
1983 if test "$ac_cv_readline_termcap" = ""
1984 then
1985 echo "$ac_t""no" 1>&6
1986 echo "configure: warning: cannot link with GNU readline -- see config.log" 1>&2
1987 else
1988 echo "$ac_t""$ac_cv_readline_termcap" 1>&6
1989 LIBS="$LIBS $ac_cv_readline_termcap"
1990 LDFLAGS="$LDFLAGS $add_ldflags"
1991 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992#define WITH_READLINE 1
1993EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001994
Guido van Rossum3c83bb41996-12-31 22:35:16 +00001995 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001996fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001997
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001998echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001999# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002000if test "${with_thread+set}" = set; then
2001 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002002
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002003echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002004if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002005then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002006fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002007cat >> confdefs.h <<\EOF
2008#define _REENTRANT 1
2009EOF
2010
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002011ac_safe=`echo "mach/cthreads.h" | tr './\055' '___'`
2012echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
2013if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2014 echo $ac_n "(cached) $ac_c" 1>&6
2015else
2016 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002017#line 2018 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002018#include "confdefs.h"
2019#include <mach/cthreads.h>
2020EOF
2021ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002022{ (eval echo configure:2023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023ac_err=`grep -v '^ *+' conftest.out`
2024if test -z "$ac_err"; then
2025 rm -rf conftest*
2026 eval "ac_cv_header_$ac_safe=yes"
2027else
2028 echo "$ac_err" >&5
2029 rm -rf conftest*
2030 eval "ac_cv_header_$ac_safe=no"
2031fi
2032rm -f conftest*
2033fi
2034if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2035 echo "$ac_t""yes" 1>&6
2036 cat >> confdefs.h <<\EOF
2037#define WITH_THREAD 1
2038EOF
2039
2040cat >> confdefs.h <<\EOF
2041#define C_THREADS 1
2042EOF
2043
2044LIBOBJS="$LIBOBJS thread.o"
2045else
2046 echo "$ac_t""no" 1>&6
2047
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002048echo $ac_n "checking for -lpthreads""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002049ac_lib_var=`echo pthreads'_'pthread_create | tr './+\055' '__p_'`
2050if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002051 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002052else
2053 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002054LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002055cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002056#line 2057 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002057#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002058/* Override any gcc2 internal prototype to avoid an error. */
2059/* We use char because int might match the return type of a gcc2
2060 builtin and then its argument prototype would still apply. */
2061char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002062
2063int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002064int t() {
2065pthread_create()
2066; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002067EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002068if { (eval echo configure:2069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002069 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002071else
2072 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002073 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002074fi
2075rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002079if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002080 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002081 cat >> confdefs.h <<\EOF
2082#define WITH_THREAD 1
2083EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002085cat >> confdefs.h <<\EOF
2086#define _POSIX_THREADS 1
2087EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002088
2089LIBS="$LIBS -lpthreads"
2090LIBOBJS="$LIBOBJS thread.o"
2091else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002092 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002093
2094echo $ac_n "checking for -lpthread""... $ac_c" 1>&6
2095ac_lib_var=`echo pthread'_'pthread_create | tr './+\055' '__p_'`
2096if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2097 echo $ac_n "(cached) $ac_c" 1>&6
2098else
2099 ac_save_LIBS="$LIBS"
2100LIBS="-lpthread $LIBS"
2101cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002102#line 2103 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002103#include "confdefs.h"
2104/* Override any gcc2 internal prototype to avoid an error. */
2105/* We use char because int might match the return type of a gcc2
2106 builtin and then its argument prototype would still apply. */
2107char pthread_create();
2108
2109int main() { return 0; }
2110int t() {
2111pthread_create()
2112; return 0; }
2113EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002114if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002115 rm -rf conftest*
2116 eval "ac_cv_lib_$ac_lib_var=yes"
2117else
2118 rm -rf conftest*
2119 eval "ac_cv_lib_$ac_lib_var=no"
2120fi
2121rm -f conftest*
2122LIBS="$ac_save_LIBS"
2123
2124fi
2125if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2126 echo "$ac_t""yes" 1>&6
2127 cat >> confdefs.h <<\EOF
2128#define WITH_THREAD 1
2129EOF
2130
2131cat >> confdefs.h <<\EOF
2132#define _POSIX_THREADS 1
2133EOF
2134
2135LIBS="$LIBS -lpthread"
2136LIBOBJS="$LIBOBJS thread.o"
2137else
2138 echo "$ac_t""no" 1>&6
2139fi
2140
2141
Guido van Rossum627b2d71993-12-24 10:39:16 +00002142fi
2143
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002144fi
2145
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002146echo $ac_n "checking for -lmpc""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002147ac_lib_var=`echo mpc'_'usconfig | tr './+\055' '__p_'`
2148if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002149 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002150else
2151 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002152LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002153cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002154#line 2155 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002155#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002156/* Override any gcc2 internal prototype to avoid an error. */
2157/* We use char because int might match the return type of a gcc2
2158 builtin and then its argument prototype would still apply. */
2159char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002160
Guido van Rossum7f43da71994-08-01 12:15:30 +00002161int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002162int t() {
2163usconfig()
2164; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002165EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002166if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002167 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002168 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002169else
2170 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002171 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002172fi
2173rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174LIBS="$ac_save_LIBS"
2175
2176fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002177if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002178 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002179 cat >> confdefs.h <<\EOF
2180#define WITH_THREAD 1
2181EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002182
Guido van Rossum7f43da71994-08-01 12:15:30 +00002183LIBS="$LIBS -lmpc"
2184LIBOBJS="$LIBOBJS thread.o"
2185else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002186 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002187fi
2188
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002189echo $ac_n "checking for -lthread""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002190ac_lib_var=`echo thread'_'thr_create | tr './+\055' '__p_'`
2191if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002192 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002193else
2194 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002195LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002196cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002197#line 2198 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002198#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002199/* Override any gcc2 internal prototype to avoid an error. */
2200/* We use char because int might match the return type of a gcc2
2201 builtin and then its argument prototype would still apply. */
2202char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002203
Guido van Rossum7f43da71994-08-01 12:15:30 +00002204int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002205int t() {
2206thr_create()
2207; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002208EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002209if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002210 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002211 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002212else
2213 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002214 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002215fi
2216rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002217LIBS="$ac_save_LIBS"
2218
2219fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002220if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002221 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002222 cat >> confdefs.h <<\EOF
2223#define WITH_THREAD 1
2224EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002225
Guido van Rossum7f43da71994-08-01 12:15:30 +00002226LIBS="$LIBS -lthread"
2227LIBOBJS="$LIBOBJS thread.o"
2228else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002229 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002230fi
2231
Guido van Rossum7f43da71994-08-01 12:15:30 +00002232
Guido van Rossumda88dad1995-01-26 00:46:29 +00002233else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002234 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002235fi
2236
Guido van Rossum7f43da71994-08-01 12:15:30 +00002237
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002238# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002239
2240DLINCLDIR=/
2241
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002242echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002244if test "${with_sgi_dl+set}" = set; then
2245 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002246
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002247echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002248cat >> confdefs.h <<\EOF
2249#define WITH_SGI_DL 1
2250EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002251
2252dldir=$withval
2253if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002254then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002255else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002256fi
2257DLINCLDIR=${dldir}
2258LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002259else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002260 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002261fi
2262
2263
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002264echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002265# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002266if test "${with_dl_dld+set}" = set; then
2267 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002268
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002269echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270cat >> confdefs.h <<\EOF
2271#define WITH_DL_DLD 1
2272EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002273
2274dldir=`echo "$withval" | sed 's/,.*//'`
2275dlddir=`echo "$withval" | sed 's/.*,//'`
2276if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002277then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002278else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002279fi
2280DLINCLDIR=${dldir}
2281LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002282else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002283 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002284fi
2285
2286
Guido van Rossum627b2d71993-12-24 10:39:16 +00002287# checks for library functions
Guido van Rossum2d38f911996-06-26 19:47:01 +00002288for ac_func in chown clock dlopen flock ftime ftruncate \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002289 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
Guido van Rossum57d09151996-07-24 02:42:38 +00002290 link lstat mkfifo nice plock putenv readlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002291 select setgid setuid setsid setpgid setpgrp setvbuf \
2292 sigaction siginterrupt sigrelse strftime symlink \
2293 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002294do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002295echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2296if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2297 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002298else
2299 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002300#line 2301 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002301#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002302/* System header to define __stub macros and hopefully few prototypes,
2303 which can conflict with char $ac_func(); below. */
2304#include <assert.h>
2305/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002306/* We use char because int might match the return type of a gcc2
2307 builtin and then its argument prototype would still apply. */
2308char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002309
Guido van Rossum7f43da71994-08-01 12:15:30 +00002310int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002311int t() {
2312
Guido van Rossum627b2d71993-12-24 10:39:16 +00002313/* The GNU C library defines this for functions which it implements
2314 to always fail with ENOSYS. Some functions are actually named
2315 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002316#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002317choke me
2318#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002319$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002320#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002321
Guido van Rossum7f43da71994-08-01 12:15:30 +00002322; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002323EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002324if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002325 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002326 eval "ac_cv_func_$ac_func=yes"
2327else
2328 rm -rf conftest*
2329 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002330fi
2331rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002332
2333fi
2334if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002335 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002336 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002337 cat >> confdefs.h <<EOF
2338#define $ac_tr_func 1
2339EOF
2340
2341else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002342 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002343fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002344done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002345
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002346for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002347do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002348echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2349if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2350 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002351else
2352 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002353#line 2354 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002354#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002355/* System header to define __stub macros and hopefully few prototypes,
2356 which can conflict with char $ac_func(); below. */
2357#include <assert.h>
2358/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002359/* We use char because int might match the return type of a gcc2
2360 builtin and then its argument prototype would still apply. */
2361char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002362
Guido van Rossum7f43da71994-08-01 12:15:30 +00002363int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002364int t() {
2365
Guido van Rossum627b2d71993-12-24 10:39:16 +00002366/* The GNU C library defines this for functions which it implements
2367 to always fail with ENOSYS. Some functions are actually named
2368 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002369#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002370choke me
2371#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002372$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002373#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374
Guido van Rossum7f43da71994-08-01 12:15:30 +00002375; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002376EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002377if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002378 rm -rf conftest*
2379 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002380else
2381 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002382 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002383fi
2384rm -f conftest*
2385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002386fi
2387if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002388 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002389 :
2390else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002391 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392LIBOBJS="$LIBOBJS ${ac_func}.o"
2393fi
2394
Guido van Rossum627b2d71993-12-24 10:39:16 +00002395done
2396
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002397echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
2398if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2399 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002400else
2401 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002402#line 2403 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002403#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002404/* System header to define __stub macros and hopefully few prototypes,
2405 which can conflict with char getpgrp(); below. */
2406#include <assert.h>
2407/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408/* We use char because int might match the return type of a gcc2
2409 builtin and then its argument prototype would still apply. */
2410char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002411
Guido van Rossum7f43da71994-08-01 12:15:30 +00002412int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002413int t() {
2414
Guido van Rossum627b2d71993-12-24 10:39:16 +00002415/* The GNU C library defines this for functions which it implements
2416 to always fail with ENOSYS. Some functions are actually named
2417 something starting with __ and the normal name is an alias. */
2418#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2419choke me
2420#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002421getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002422#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002423
2424; return 0; }
2425EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002426if { (eval echo configure:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002427 rm -rf conftest*
2428 eval "ac_cv_func_getpgrp=yes"
2429else
2430 rm -rf conftest*
2431 eval "ac_cv_func_getpgrp=no"
2432fi
2433rm -f conftest*
2434
2435fi
2436if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002437 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002438 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002439#line 2440 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002440#include "confdefs.h"
2441#include <unistd.h>
2442int main() { return 0; }
2443int t() {
2444getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002445; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002446EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002447if { (eval echo configure:2448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002448 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002449 cat >> confdefs.h <<\EOF
2450#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002451EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002452
2453fi
2454rm -f conftest*
2455
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002456else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002457 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002458fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002459
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002460echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
2461if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2462 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002463else
2464 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002465#line 2466 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002466#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002467/* System header to define __stub macros and hopefully few prototypes,
2468 which can conflict with char setpgrp(); below. */
2469#include <assert.h>
2470/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002471/* We use char because int might match the return type of a gcc2
2472 builtin and then its argument prototype would still apply. */
2473char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002474
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002475int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002476int t() {
2477
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002478/* The GNU C library defines this for functions which it implements
2479 to always fail with ENOSYS. Some functions are actually named
2480 something starting with __ and the normal name is an alias. */
2481#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2482choke me
2483#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002484setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002485#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002486
2487; return 0; }
2488EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002489if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002490 rm -rf conftest*
2491 eval "ac_cv_func_setpgrp=yes"
2492else
2493 rm -rf conftest*
2494 eval "ac_cv_func_setpgrp=no"
2495fi
2496rm -f conftest*
2497
2498fi
2499if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002500 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002501 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002502#line 2503 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002503#include "confdefs.h"
2504#include <unistd.h>
2505int main() { return 0; }
2506int t() {
2507setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002508; return 0; }
2509EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002510if { (eval echo configure:2511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002511 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002512 cat >> confdefs.h <<\EOF
2513#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002514EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002515
2516fi
2517rm -f conftest*
2518
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002519else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002520 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002521fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002522
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002523echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
2524if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2525 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002526else
2527 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002528#line 2529 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002529#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002530/* System header to define __stub macros and hopefully few prototypes,
2531 which can conflict with char gettimeofday(); below. */
2532#include <assert.h>
2533/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002534/* We use char because int might match the return type of a gcc2
2535 builtin and then its argument prototype would still apply. */
2536char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002537
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002538int main() { return 0; }
2539int t() {
2540
2541/* The GNU C library defines this for functions which it implements
2542 to always fail with ENOSYS. Some functions are actually named
2543 something starting with __ and the normal name is an alias. */
2544#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2545choke me
2546#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002547gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002548#endif
2549
2550; return 0; }
2551EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002552if { (eval echo configure:2553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002553 rm -rf conftest*
2554 eval "ac_cv_func_gettimeofday=yes"
2555else
2556 rm -rf conftest*
2557 eval "ac_cv_func_gettimeofday=no"
2558fi
2559rm -f conftest*
2560
2561fi
2562if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002563 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002564 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002565#line 2566 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002566#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002567#include <sys/time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002568int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002569int t() {
2570gettimeofday((struct timeval*)0,(struct timezone*)0);
2571; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002572EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002573if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002574 :
2575else
2576 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002577 cat >> confdefs.h <<\EOF
2578#define GETTIMEOFDAY_NO_TZ 1
2579EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +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 Rossum76be6ed1995-01-02 18:33:54 +00002586fi
2587
2588
2589# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002590echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2591if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2592 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593else
2594 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002595#line 2596 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002596#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597#include <sys/types.h>
2598#include <sys/time.h>
2599#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002600int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601int t() {
2602struct tm *tp;
2603; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002604EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002605if { (eval echo configure:2606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002606 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002608else
2609 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002611fi
2612rm -f conftest*
2613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002615
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002616echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617if test $ac_cv_header_time = yes; then
2618 cat >> confdefs.h <<\EOF
2619#define TIME_WITH_SYS_TIME 1
2620EOF
2621
2622fi
2623
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002624echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2625if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2626 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
2628 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002629#line 2630 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630#include "confdefs.h"
2631#include <sys/types.h>
2632#include <time.h>
2633int main() { return 0; }
2634int t() {
2635struct tm *tp; tp->tm_sec;
2636; return 0; }
2637EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002638if { (eval echo configure:2639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002639 rm -rf conftest*
2640 ac_cv_struct_tm=time.h
2641else
2642 rm -rf conftest*
2643 ac_cv_struct_tm=sys/time.h
2644fi
2645rm -f conftest*
2646
2647fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002648
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002649echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002650if test $ac_cv_struct_tm = sys/time.h; then
2651 cat >> confdefs.h <<\EOF
2652#define TM_IN_SYS_TIME 1
2653EOF
2654
2655fi
2656
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002657echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2658if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2659 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660else
2661 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002662#line 2663 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002663#include "confdefs.h"
2664#include <sys/types.h>
2665#include <$ac_cv_struct_tm>
2666int main() { return 0; }
2667int t() {
2668struct tm tm; tm.tm_zone;
2669; return 0; }
2670EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002671if { (eval echo configure:2672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672 rm -rf conftest*
2673 ac_cv_struct_tm_zone=yes
2674else
2675 rm -rf conftest*
2676 ac_cv_struct_tm_zone=no
2677fi
2678rm -f conftest*
2679
2680fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002682echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683if test "$ac_cv_struct_tm_zone" = yes; then
2684 cat >> confdefs.h <<\EOF
2685#define HAVE_TM_ZONE 1
2686EOF
2687
2688else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002689 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2690if eval "test \"`echo '$''{'ac_cv_var_tzname'+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 Rossum3c83bb41996-12-31 22:35:16 +00002694#line 2695 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002695#include "confdefs.h"
2696#include <time.h>
2697#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00002700int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701int t() {
2702atoi(*tzname);
2703; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002704EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002705if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002706 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707 ac_cv_var_tzname=yes
2708else
2709 rm -rf conftest*
2710 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002711fi
2712rm -f conftest*
2713
2714fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002715
2716echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002717 if test $ac_cv_var_tzname = yes; then
2718 cat >> confdefs.h <<\EOF
2719#define HAVE_TZNAME 1
2720EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002721
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722 fi
2723fi
2724
2725
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002726echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
2727if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2728 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729else
2730 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002731#line 2732 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002732#include "confdefs.h"
2733#include <time.h>
2734int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002735int t() {
2736return altzone;
2737; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002738EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002739if { (eval echo configure:2740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002740 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741 ac_cv_header_time_altzone=yes
2742else
2743 rm -rf conftest*
2744 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002745fi
2746rm -f conftest*
2747
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748fi
2749
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002750echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751if test $ac_cv_header_time_altzone = yes; then
2752 cat >> confdefs.h <<\EOF
2753#define HAVE_ALTZONE 1
2754EOF
2755
2756fi
2757
Guido van Rossumda88dad1995-01-26 00:46:29 +00002758was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002759echo $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 +00002760cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002761#line 2762 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002762#include "confdefs.h"
2763
2764#include <sys/types.h>
2765#include <sys/select.h>
2766#include <sys/time.h>
2767
2768int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769int t() {
2770;
2771; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002772EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002773if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002774 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775 cat >> confdefs.h <<\EOF
2776#define SYS_SELECT_WITH_SYS_TIME 1
2777EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002778 was_it_defined=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002779fi
2780rm -f conftest*
2781
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002782echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002783
2784# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00002785
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002786echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2787if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2788 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789else
2790 if test "$GCC" = yes; then
2791 # GCC predefines this symbol on systems where it applies.
2792cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002793#line 2794 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794#include "confdefs.h"
2795#ifdef __CHAR_UNSIGNED__
2796 yes
2797#endif
2798
2799EOF
2800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2801 egrep "yes" >/dev/null 2>&1; then
2802 rm -rf conftest*
2803 ac_cv_c_char_unsigned=yes
2804else
2805 rm -rf conftest*
2806 ac_cv_c_char_unsigned=no
2807fi
2808rm -f conftest*
2809
2810else
2811if test "$cross_compiling" = yes; then
2812 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2813else
2814cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002815#line 2816 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002816#include "confdefs.h"
2817/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002818#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00002819#define volatile
2820#endif
2821main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00002822 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002823}
2824EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002825{ (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002826if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002827 ac_cv_c_char_unsigned=yes
2828else
2829 ac_cv_c_char_unsigned=no
2830fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002831fi
2832rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002833fi
2834fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002835
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002836echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002837if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2838 cat >> confdefs.h <<\EOF
2839#define __CHAR_UNSIGNED__ 1
2840EOF
2841
2842fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002843
2844
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002845echo $ac_n "checking for working const""... $ac_c" 1>&6
2846if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2847 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002848else
2849 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002850#line 2851 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002851#include "confdefs.h"
2852
2853int main() { return 0; }
2854int t() {
2855
2856/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002857typedef int charset[2]; const charset x;
2858/* SunOS 4.1.1 cc rejects this. */
2859char const *const *ccp;
2860char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002861/* NEC SVR4.0.2 mips cc rejects this. */
2862struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002863static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002864/* AIX XL C 1.02.0.0 rejects this.
2865 It does not let you subtract one const X* pointer from another in an arm
2866 of an if-expression whose if-part is not a constant expression */
2867const char *g = "string";
2868ccp = &g + (g ? g-g : 0);
2869/* HPUX 7.0 cc rejects these. */
2870++ccp;
2871p = (char**) ccp;
2872ccp = (char const *const *) p;
2873{ /* SCO 3.2v4 cc rejects this. */
2874 char *t;
2875 char const *s = 0 ? (char *) 0 : (char const *) 0;
2876
2877 *t++ = 0;
2878}
2879{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002880 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002881 const int *foo = &x[0];
2882 ++foo;
2883}
2884{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2885 typedef const int *iptr;
2886 iptr p = 0;
2887 ++p;
2888}
2889{ /* AIX XL C 1.02.0.0 rejects this saying
2890 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2891 struct s { int j; const int *ap[3]; };
2892 struct s *b; b->j = 5;
2893}
2894{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2895 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002896}
2897
2898; return 0; }
2899EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002900if { (eval echo configure:2901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002901 rm -rf conftest*
2902 ac_cv_c_const=yes
2903else
2904 rm -rf conftest*
2905 ac_cv_c_const=no
2906fi
2907rm -f conftest*
2908
2909fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002910
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002911echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002912if test $ac_cv_c_const = no; then
2913 cat >> confdefs.h <<\EOF
2914#define const
2915EOF
2916
2917fi
2918
2919
Guido van Rossumda88dad1995-01-26 00:46:29 +00002920works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002921echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002922cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002923#line 2924 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002924#include "confdefs.h"
2925
Guido van Rossum7f43da71994-08-01 12:15:30 +00002926int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002927int t() {
2928volatile int x; x = 0;
2929; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002930EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002931if { (eval echo configure:2932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002932 rm -rf conftest*
2933 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002934else
2935 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002936 cat >> confdefs.h <<\EOF
2937#define volatile
2938EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002939
2940fi
2941rm -f conftest*
2942
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002943echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002944
Guido van Rossumda88dad1995-01-26 00:46:29 +00002945works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002946echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002947cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002948#line 2949 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002949#include "confdefs.h"
2950
2951int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002952int t() {
2953signed char c;
2954; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002955EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002956if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002957 rm -rf conftest*
2958 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002959else
2960 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002961 cat >> confdefs.h <<\EOF
2962#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00002963EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002964
2965fi
2966rm -f conftest*
2967
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002968echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002969
Guido van Rossumda88dad1995-01-26 00:46:29 +00002970have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002971echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002972cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002973#line 2974 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002974#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002975int foo(int x) { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002976int main() { return 0; }
2977int t() {
2978return foo(10);
2979; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002980EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002981if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002982 rm -rf conftest*
2983 cat >> confdefs.h <<\EOF
2984#define HAVE_PROTOTYPES 1
2985EOF
2986 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002987fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002988rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002989
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002990echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002991
Guido van Rossumda88dad1995-01-26 00:46:29 +00002992works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002993echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002994cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002995#line 2996 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002996#include "confdefs.h"
2997
2998#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00002999int foo(int x, ...) {
3000 va_list va;
3001 va_start(va, x);
3002 va_arg(va, int);
3003 va_arg(va, char *);
3004 va_arg(va, double);
3005 return 0;
3006}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003008int main() { return 0; }
3009int t() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003010return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003011; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003012EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003013if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003014 rm -rf conftest*
3015 cat >> confdefs.h <<\EOF
3016#define HAVE_STDARG_PROTOTYPES 1
3017EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003018 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003019fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020rm -f conftest*
3021
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003022echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003023
Guido van Rossumda88dad1995-01-26 00:46:29 +00003024if test "$have_prototypes" = yes; then
3025bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003026echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003028#line 3029 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003029#include "confdefs.h"
3030#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00003031int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003032int t() {
3033char **t;execve("@",t,t);
3034; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003035EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003036if { (eval echo configure:3037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003037 :
3038else
3039 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003040 cat >> confdefs.h <<\EOF
3041#define BAD_EXEC_PROTOTYPES 1
3042EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003043 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003044fi
3045rm -f conftest*
3046
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003047echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003048fi
3049
Guido van Rossumda88dad1995-01-26 00:46:29 +00003050bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003051echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003052if test "$cross_compiling" = yes; then
3053 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3054else
3055cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003056#line 3057 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003057#include "confdefs.h"
3058
3059struct s { int a; int b; };
3060static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003061int foobar() {
3062 static int random;
3063 random = (int) &foo;
3064 return random;
3065}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003066static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003067main() {
3068 exit(!((int)&foo == foobar()));
3069}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003070
3071EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003072{ (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003073if test -s conftest && (./conftest; exit) 2>/dev/null; then
3074 :
3075else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003076 cat >> confdefs.h <<\EOF
3077#define BAD_STATIC_FORWARD 1
3078EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003079 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003080fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003081fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003082rm -fr conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003083echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003084
Guido van Rossumda88dad1995-01-26 00:46:29 +00003085va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003086echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003087cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003088#line 3089 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003089#include "confdefs.h"
3090
3091#ifdef HAVE_STDARG_PROTOTYPES
3092#include <stdarg.h>
3093#else
3094#include <varargs.h>
3095#endif
3096
3097int main() { return 0; }
3098int t() {
3099va_list list1, list2; list1 = list2;
3100; return 0; }
3101EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003102if { (eval echo configure:3103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003103 :
3104else
3105 rm -rf conftest*
3106 cat >> confdefs.h <<\EOF
3107#define VA_LIST_IS_ARRAY 1
3108EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003109 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003110fi
3111rm -f conftest*
3112
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003113echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003114
Guido van Rossum627b2d71993-12-24 10:39:16 +00003115# checks for system services
3116# (none yet)
3117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003118# Linux requires this for correct f.p. operations
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003119echo $ac_n "checking for -lieee""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003120ac_lib_var=`echo ieee'_'__fpu_control | tr './+\055' '__p_'`
3121if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003122 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003123else
3124 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003125LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003126cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003127#line 3128 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003128#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003129/* Override any gcc2 internal prototype to avoid an error. */
3130/* We use char because int might match the return type of a gcc2
3131 builtin and then its argument prototype would still apply. */
3132char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003133
Guido van Rossum7f43da71994-08-01 12:15:30 +00003134int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003135int t() {
3136__fpu_control()
3137; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003138EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003139if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003140 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003141 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003142else
Guido van Rossum627b2d71993-12-24 10:39:16 +00003143 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003144 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003145fi
3146rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003147LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003149fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003150if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003151 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003152 ac_tr_lib=HAVE_LIB`echo ieee | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003153 cat >> confdefs.h <<EOF
3154#define $ac_tr_lib 1
3155EOF
3156
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003157 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003158
3159else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003160 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003161fi
3162
3163
Guido van Rossum7f43da71994-08-01 12:15:30 +00003164# check for --with-libm=...
3165
Guido van Rossum563e7081996-09-10 18:20:48 +00003166case $ac_sys_system in
3167next) ;;
3168*) LIBM=-lm
3169esac
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003170# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003171if test "${with_libm+set}" = set; then
3172 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003173
3174if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003175then LIBM=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003176else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003177fi
3178fi
3179
3180
3181# check for --with-libc=...
3182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003184if test "${with_libc+set}" = set; then
3185 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003186
3187if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003188then LIBC=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003189else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003190fi
3191fi
3192
3193
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003194# check for hypot() in math library
3195LIBS_SAVE=$LIBS
3196LIBS="$LIBS $LIBM"
3197for ac_func in hypot
3198do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003199echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3200if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3201 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003202else
3203 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003204#line 3205 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003205#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003206/* System header to define __stub macros and hopefully few prototypes,
3207 which can conflict with char $ac_func(); below. */
3208#include <assert.h>
3209/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003210/* We use char because int might match the return type of a gcc2
3211 builtin and then its argument prototype would still apply. */
3212char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003213
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003214int main() { return 0; }
3215int t() {
3216
3217/* The GNU C library defines this for functions which it implements
3218 to always fail with ENOSYS. Some functions are actually named
3219 something starting with __ and the normal name is an alias. */
3220#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3221choke me
3222#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003223$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003224#endif
3225
3226; return 0; }
3227EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003228if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003229 rm -rf conftest*
3230 eval "ac_cv_func_$ac_func=yes"
3231else
3232 rm -rf conftest*
3233 eval "ac_cv_func_$ac_func=no"
3234fi
3235rm -f conftest*
3236
3237fi
3238if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003239 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003240 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003241 cat >> confdefs.h <<EOF
3242#define $ac_tr_func 1
3243EOF
3244
3245else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003246 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003247fi
3248done
3249
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003250for ac_func in hypot
3251do
3252echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3253if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3254 echo $ac_n "(cached) $ac_c" 1>&6
3255else
3256 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003257#line 3258 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003258#include "confdefs.h"
3259/* System header to define __stub macros and hopefully few prototypes,
3260 which can conflict with char $ac_func(); below. */
3261#include <assert.h>
3262/* Override any gcc2 internal prototype to avoid an error. */
3263/* We use char because int might match the return type of a gcc2
3264 builtin and then its argument prototype would still apply. */
3265char $ac_func();
3266
3267int main() { return 0; }
3268int t() {
3269
3270/* The GNU C library defines this for functions which it implements
3271 to always fail with ENOSYS. Some functions are actually named
3272 something starting with __ and the normal name is an alias. */
3273#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3274choke me
3275#else
3276$ac_func();
3277#endif
3278
3279; return 0; }
3280EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003281if { (eval echo configure:3282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003282 rm -rf conftest*
3283 eval "ac_cv_func_$ac_func=yes"
3284else
3285 rm -rf conftest*
3286 eval "ac_cv_func_$ac_func=no"
3287fi
3288rm -f conftest*
3289
3290fi
3291if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3292 echo "$ac_t""yes" 1>&6
3293 :
3294else
3295 echo "$ac_t""no" 1>&6
3296LIBOBJS="$LIBOBJS ${ac_func}.o"
3297fi
3298
3299done
3300
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003301LIBS=$LIBS_SAVE
3302
Guido van Rossumda88dad1995-01-26 00:46:29 +00003303# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003304echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
3305if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3306 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003307else
3308 if test "$cross_compiling" = yes; then
3309 ac_cv_func_getopt=no
3310else
3311cat > conftest.$ac_ext <<EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003312#line 3313 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003313#include "confdefs.h"
3314#include <stdio.h>
3315extern int optind, opterr, getopt();
3316extern char* optarg;
3317int main() {
3318 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3319 opterr = 0;
3320 if (getopt(3, av, "f:") == 'f') { exit(1); }
3321 exit(0);
3322}
3323EOF
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003324{ (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00003325if test -s conftest && (./conftest; exit) 2>/dev/null; then
3326 ac_cv_func_getopt=yes
3327else
3328 ac_cv_func_getopt=no
3329fi
3330fi
3331rm -fr conftest*
3332fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003333echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003334test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3335
Guido van Rossum627b2d71993-12-24 10:39:16 +00003336# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003337trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003338cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003339# This file is a shell script that caches the results of configure
3340# tests run on this system so they can be shared between configure
3341# scripts and configure runs. It is not useful on other systems.
3342# If it contains results you don't want to keep, you may remove or edit it.
3343#
3344# By default, configure uses ./config.cache as the cache file,
3345# creating it if it does not exist already. You can give configure
3346# the --cache-file=FILE option to use a different cache file; that is
3347# what configure does when it calls configure scripts in
3348# subdirectories, so they share the cache.
3349# Giving --cache-file=/dev/null disables caching, for debugging configure.
3350# config.status only pays attention to the cache file if you give it the
3351# --recheck option to rerun configure.
3352#
3353EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003354# Ultrix sh set writes to stderr and can't be redirected directly,
3355# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003356(set) 2>&1 |
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003357 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3358 >> confcache
3359if cmp -s $cache_file confcache; then
3360 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003361else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003362 if test -w $cache_file; then
3363 echo "updating cache $cache_file"
3364 cat confcache > $cache_file
3365 else
3366 echo "not updating unwritable cache $cache_file"
3367 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003368fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003369rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003370
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003371trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003372
3373test "x$prefix" = xNONE && prefix=$ac_default_prefix
3374# Let make expand exec_prefix.
3375test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003376
Guido van Rossum7f43da71994-08-01 12:15:30 +00003377# Any assignment to VPATH causes Sun make to only execute
3378# the first set of double-colon rules, so remove it if not needed.
3379# If there is a colon in the path, we need to keep it.
3380if test "x$srcdir" = x.; then
3381 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3382fi
3383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003384trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003386DEFS=-DHAVE_CONFIG_H
3387
3388# Without the "./", some shells look in PATH for config.status.
3389: ${CONFIG_STATUS=./config.status}
3390
3391echo creating $CONFIG_STATUS
3392rm -f $CONFIG_STATUS
3393cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003394#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003395# Generated automatically by configure.
3396# Run this file to recreate the current configuration.
3397# This directory was configured as follows,
3398# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3399#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400# $0 $ac_configure_args
3401#
3402# Compiler output produced by configure, useful for debugging
3403# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003404
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003405ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003406for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003407do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003408 case "\$ac_option" in
3409 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003410 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3411 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003412 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003413 echo "$CONFIG_STATUS generated by autoconf version 2.10"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003414 exit 0 ;;
3415 -help | --help | --hel | --he | --h)
3416 echo "\$ac_cs_usage"; exit 0 ;;
3417 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003418 esac
3419done
3420
Guido van Rossum7f43da71994-08-01 12:15:30 +00003421ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003422
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003423trap 'rm -fr `echo "Makefile \
3424 Objects/Makefile \
3425 Parser/Makefile \
3426 Python/Makefile \
3427 Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003428EOF
3429cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003430
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003431# Protect against being on the right side of a sed subst in config.status.
3432sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3433 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003434$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003435$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003436s%@CFLAGS@%$CFLAGS%g
3437s%@CPPFLAGS@%$CPPFLAGS%g
3438s%@CXXFLAGS@%$CXXFLAGS%g
3439s%@DEFS@%$DEFS%g
3440s%@LDFLAGS@%$LDFLAGS%g
3441s%@LIBS@%$LIBS%g
3442s%@exec_prefix@%$exec_prefix%g
3443s%@prefix@%$prefix%g
3444s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003445s%@bindir@%$bindir%g
3446s%@sbindir@%$sbindir%g
3447s%@libexecdir@%$libexecdir%g
3448s%@datadir@%$datadir%g
3449s%@sysconfdir@%$sysconfdir%g
3450s%@sharedstatedir@%$sharedstatedir%g
3451s%@localstatedir@%$localstatedir%g
3452s%@libdir@%$libdir%g
3453s%@includedir@%$includedir%g
3454s%@oldincludedir@%$oldincludedir%g
3455s%@infodir@%$infodir%g
3456s%@mandir@%$mandir%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003457s%@MACHDEP@%$MACHDEP%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458s%@CC@%$CC%g
3459s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003460s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003461s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003462s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3463s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003464s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003465s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003466s%@SO@%$SO%g
3467s%@LDSHARED@%$LDSHARED%g
3468s%@CCSHARED@%$CCSHARED%g
3469s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003470s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003471s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003472s%@LIBM@%$LIBM%g
3473s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003474
3475CEOF
3476EOF
3477cat >> $CONFIG_STATUS <<EOF
3478
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003479CONFIG_FILES=\${CONFIG_FILES-"Makefile \
3480 Objects/Makefile \
3481 Parser/Makefile \
3482 Python/Makefile \
3483 Modules/Makefile.pre"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003484EOF
3485cat >> $CONFIG_STATUS <<\EOF
3486for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3487 # Support "outfile[:infile]", defaulting infile="outfile.in".
3488 case "$ac_file" in
3489 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3490 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3491 *) ac_file_in="${ac_file}.in" ;;
3492 esac
3493
3494 # Adjust relative srcdir, etc. for subdirectories.
3495
3496 # Remove last slash and all that follows it. Not all systems have dirname.
3497 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3498 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3499 # The file is in a subdirectory.
3500 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003501 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003502 # A "../" for each directory in $ac_dir_suffix.
3503 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3504 else
3505 ac_dir_suffix= ac_dots=
3506 fi
3507
3508 case "$ac_given_srcdir" in
3509 .) srcdir=.
3510 if test -z "$ac_dots"; then top_srcdir=.
3511 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3512 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3513 *) # Relative path.
3514 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3515 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3516 esac
3517
3518 echo creating "$ac_file"
3519 rm -f "$ac_file"
3520 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3521 case "$ac_file" in
3522 *Makefile*) ac_comsub="1i\\
3523# $configure_input" ;;
3524 *) ac_comsub= ;;
3525 esac
3526 sed -e "$ac_comsub
3527s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003528s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003529s%@top_srcdir@%$top_srcdir%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003530" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00003531fi; done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003532rm -f conftest.subs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003534# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3535# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00003536#
3537# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003538ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3539ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003540ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003541ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003542# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003543ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3544ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003545ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003546ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003547# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003548ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3549ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003550ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003551ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003552
3553CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003554for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3555 # Support "outfile[:infile]", defaulting infile="outfile.in".
3556 case "$ac_file" in
3557 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3558 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3559 *) ac_file_in="${ac_file}.in" ;;
3560 esac
3561
Guido van Rossum7f43da71994-08-01 12:15:30 +00003562 echo creating $ac_file
3563
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003564 rm -f conftest.frag conftest.in conftest.out
3565 cp $ac_given_srcdir/$ac_file_in conftest.in
3566
3567EOF
3568
3569# Transform confdefs.h into a sed script conftest.vals that substitutes
3570# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003571# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003572# Protect against being in an unquoted here document in config.status.
3573rm -f conftest.vals
3574cat > conftest.hdr <<\EOF
3575s/[\\&%]/\\&/g
3576s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003577s%#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 +00003578s%ac_d%ac_u%gp
3579s%ac_u%ac_e%gp
3580EOF
3581sed -n -f conftest.hdr confdefs.h > conftest.vals
3582rm -f conftest.hdr
3583
3584# This sed command replaces #undef with comments. This is necessary, for
3585# example, in the case of _POSIX_SOURCE, which is predefined and required
3586# on some systems where configure will not decide to define it.
3587cat >> conftest.vals <<\EOF
3588s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3589EOF
3590
3591# Break up conftest.vals because some shells have a limit on
3592# the size of here documents, and old seds have small limits too.
3593# Maximum number of lines to put in a single here document.
3594ac_max_here_lines=12
3595
3596rm -f conftest.tail
3597while :
3598do
3599 ac_lines=`grep -c . conftest.vals`
3600 # grep -c gives empty output for an empty file on some AIX systems.
3601 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3602 # Write a limited-size here document to conftest.frag.
3603 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3604 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3605 echo 'CEOF
3606 sed -f conftest.frag conftest.in > conftest.out
3607 rm -f conftest.in
3608 mv conftest.out conftest.in
3609' >> $CONFIG_STATUS
3610 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3611 rm -f conftest.vals
3612 mv conftest.tail conftest.vals
3613done
3614rm -f conftest.vals
3615
3616cat >> $CONFIG_STATUS <<\EOF
3617 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00003618 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003619 cat conftest.in >> conftest.h
3620 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00003621 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003622 echo "$ac_file is unchanged"
3623 rm -f conftest.h
3624 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003625 # Remove last slash and all that follows it. Not all systems have dirname.
3626 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3627 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3628 # The file is in a subdirectory.
3629 test ! -d "$ac_dir" && mkdir "$ac_dir"
3630 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003631 rm -f $ac_file
3632 mv conftest.h $ac_file
3633 fi
3634fi; done
3635
3636
Guido van Rossum627b2d71993-12-24 10:39:16 +00003637
3638exit 0
3639EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003640chmod +x $CONFIG_STATUS
3641rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003642test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003643