blob: 8373b9414ae8c8bfeec272a54b786f5b5401bfe3 [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 Rossum0be3e491997-05-22 20:33:33 +00003# From configure.in Revision: 1.51
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 Rossumf78abae1997-01-21 22:02:36 +00006# Generated automatically using autoconf version 2.12
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017--with-next-archs='arch1 arch2 ..' build MAB binary"
18ac_help="$ac_help
Guido van 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
Guido van Rossumec2f0731997-01-22 20:54:01 +000026--with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
27ac_help="$ac_help
28--with-threads alias for --with-thread"
29ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000030--with-thread[=DIRECTORY] make interpreter thread-safe"
31ac_help="$ac_help
32--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
33ac_help="$ac_help
34--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
35ac_help="$ac_help
Guido van Rossum7f253911997-05-09 02:42:48 +000036--with-fpectl enable SIGFPE catching"
37ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038--with-libm=STRING math library"
39ac_help="$ac_help
40--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000041
Guido van Rossum7f43da71994-08-01 12:15:30 +000042# Initialize some variables set by options.
43# The variables have the same names as the options, with
44# dashes changed to underlines.
45build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000046cache_file=./config.cache
47exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000048host=NONE
49no_create=
50nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000051no_recursion=
52prefix=NONE
53program_prefix=NONE
54program_suffix=NONE
55program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000056silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000058srcdir=
59target=NONE
60verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000061x_includes=NONE
62x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000063bindir='${exec_prefix}/bin'
64sbindir='${exec_prefix}/sbin'
65libexecdir='${exec_prefix}/libexec'
66datadir='${prefix}/share'
67sysconfdir='${prefix}/etc'
68sharedstatedir='${prefix}/com'
69localstatedir='${prefix}/var'
70libdir='${exec_prefix}/lib'
71includedir='${prefix}/include'
72oldincludedir='/usr/include'
73infodir='${prefix}/info'
74mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000075
76# Initialize some other variables.
77subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000078MFLAGS= MAKEFLAGS=
Guido van Rossumf78abae1997-01-21 22:02:36 +000079# Maximum number of lines to put in a shell here document.
80ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000081
82ac_prev=
83for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000084do
Guido van Rossum627b2d71993-12-24 10:39:16 +000085
Guido van Rossum7f43da71994-08-01 12:15:30 +000086 # If the previous option needs an argument, assign it.
87 if test -n "$ac_prev"; then
88 eval "$ac_prev=\$ac_option"
89 ac_prev=
90 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000091 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000092
Guido van Rossum7f43da71994-08-01 12:15:30 +000093 case "$ac_option" in
94 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
95 *) ac_optarg= ;;
96 esac
97
Guido van Rossum76be6ed1995-01-02 18:33:54 +000098 # Accept the important Cygnus configure options, so we can diagnose typos.
99
Guido van Rossum7f43da71994-08-01 12:15:30 +0000100 case "$ac_option" in
101
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000102 -bindir | --bindir | --bindi | --bind | --bin | --bi)
103 ac_prev=bindir ;;
104 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
105 bindir="$ac_optarg" ;;
106
107 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000108 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000109 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000110 build="$ac_optarg" ;;
111
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000112 -cache-file | --cache-file | --cache-fil | --cache-fi \
113 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
114 ac_prev=cache_file ;;
115 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
116 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
117 cache_file="$ac_optarg" ;;
118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000119 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
120 ac_prev=datadir ;;
121 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
122 | --da=*)
123 datadir="$ac_optarg" ;;
124
Guido van Rossum7f43da71994-08-01 12:15:30 +0000125 -disable-* | --disable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000127 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000128 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000130 fi
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 eval "enable_${ac_feature}=no" ;;
133
134 -enable-* | --enable-*)
135 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000136 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000137 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000138 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000139 fi
140 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
141 case "$ac_option" in
142 *=*) ;;
143 *) ac_optarg=yes ;;
144 esac
145 eval "enable_${ac_feature}='$ac_optarg'" ;;
146
Guido van Rossum7f43da71994-08-01 12:15:30 +0000147 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
148 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
149 | --exec | --exe | --ex)
150 ac_prev=exec_prefix ;;
151 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
152 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
153 | --exec=* | --exe=* | --ex=*)
154 exec_prefix="$ac_optarg" ;;
155
156 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000157 # Obsolete; use --with-gas.
158 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000159
160 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000161 # Omit some internal or obsolete options to make the list less imposing.
162 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000163 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000164Usage: configure [options] [host]
165Options: [defaults in brackets after descriptions]
166Configuration:
167 --cache-file=FILE cache test results in FILE
168 --help print this message
169 --no-create do not create output files
170 --quiet, --silent do not print \`checking...' messages
171 --version print the version of autoconf that created configure
172Directory and file names:
173 --prefix=PREFIX install architecture-independent files in PREFIX
174 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000175 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000176 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000177 --bindir=DIR user executables in DIR [EPREFIX/bin]
178 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
179 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
180 --datadir=DIR read-only architecture-independent data in DIR
181 [PREFIX/share]
182 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
183 --sharedstatedir=DIR modifiable architecture-independent data in DIR
184 [PREFIX/com]
185 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
186 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
187 --includedir=DIR C header files in DIR [PREFIX/include]
188 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
189 --infodir=DIR info documentation in DIR [PREFIX/info]
190 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000191 --srcdir=DIR find the sources in DIR [configure dir or ..]
192 --program-prefix=PREFIX prepend PREFIX to installed program names
193 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000194 --program-transform-name=PROGRAM
195 run sed PROGRAM on installed program names
196EOF
197 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000198Host type:
199 --build=BUILD configure for building on BUILD [BUILD=HOST]
200 --host=HOST configure for HOST [guessed]
201 --target=TARGET configure for TARGET [TARGET=HOST]
202Features and packages:
203 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
204 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
205 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
206 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
207 --x-includes=DIR X include files are in DIR
208 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000209EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000210 if test -n "$ac_help"; then
211 echo "--enable and --with options recognized:$ac_help"
212 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000213 exit 0 ;;
214
215 -host | --host | --hos | --ho)
216 ac_prev=host ;;
217 -host=* | --host=* | --hos=* | --ho=*)
218 host="$ac_optarg" ;;
219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000220 -includedir | --includedir | --includedi | --included | --include \
221 | --includ | --inclu | --incl | --inc)
222 ac_prev=includedir ;;
223 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
224 | --includ=* | --inclu=* | --incl=* | --inc=*)
225 includedir="$ac_optarg" ;;
226
227 -infodir | --infodir | --infodi | --infod | --info | --inf)
228 ac_prev=infodir ;;
229 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
230 infodir="$ac_optarg" ;;
231
232 -libdir | --libdir | --libdi | --libd)
233 ac_prev=libdir ;;
234 -libdir=* | --libdir=* | --libdi=* | --libd=*)
235 libdir="$ac_optarg" ;;
236
237 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
238 | --libexe | --libex | --libe)
239 ac_prev=libexecdir ;;
240 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
241 | --libexe=* | --libex=* | --libe=*)
242 libexecdir="$ac_optarg" ;;
243
244 -localstatedir | --localstatedir | --localstatedi | --localstated \
245 | --localstate | --localstat | --localsta | --localst \
246 | --locals | --local | --loca | --loc | --lo)
247 ac_prev=localstatedir ;;
248 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
249 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
250 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
251 localstatedir="$ac_optarg" ;;
252
253 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
254 ac_prev=mandir ;;
255 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
256 mandir="$ac_optarg" ;;
257
Guido van Rossum7f43da71994-08-01 12:15:30 +0000258 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000259 # Obsolete; use --without-fp.
260 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000261
262 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
263 | --no-cr | --no-c)
264 no_create=yes ;;
265
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000266 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
267 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
268 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000270 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
271 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
272 | --oldin | --oldi | --old | --ol | --o)
273 ac_prev=oldincludedir ;;
274 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
275 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
276 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
277 oldincludedir="$ac_optarg" ;;
278
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
280 ac_prev=prefix ;;
281 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
282 prefix="$ac_optarg" ;;
283
284 -program-prefix | --program-prefix | --program-prefi | --program-pref \
285 | --program-pre | --program-pr | --program-p)
286 ac_prev=program_prefix ;;
287 -program-prefix=* | --program-prefix=* | --program-prefi=* \
288 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
289 program_prefix="$ac_optarg" ;;
290
291 -program-suffix | --program-suffix | --program-suffi | --program-suff \
292 | --program-suf | --program-su | --program-s)
293 ac_prev=program_suffix ;;
294 -program-suffix=* | --program-suffix=* | --program-suffi=* \
295 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
296 program_suffix="$ac_optarg" ;;
297
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 ac_prev=program_transform_name ;;
306 -program-transform-name=* | --program-transform-name=* \
307 | --program-transform-nam=* | --program-transform-na=* \
308 | --program-transform-n=* | --program-transform-=* \
309 | --program-transform=* | --program-transfor=* \
310 | --program-transfo=* | --program-transf=* \
311 | --program-trans=* | --program-tran=* \
312 | --progr-tra=* | --program-tr=* | --program-t=*)
313 program_transform_name="$ac_optarg" ;;
314
315 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
316 | -silent | --silent | --silen | --sile | --sil)
317 silent=yes ;;
318
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000319 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
320 ac_prev=sbindir ;;
321 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
322 | --sbi=* | --sb=*)
323 sbindir="$ac_optarg" ;;
324
325 -sharedstatedir | --sharedstatedir | --sharedstatedi \
326 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
327 | --sharedst | --shareds | --shared | --share | --shar \
328 | --sha | --sh)
329 ac_prev=sharedstatedir ;;
330 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
331 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
332 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
333 | --sha=* | --sh=*)
334 sharedstatedir="$ac_optarg" ;;
335
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000336 -site | --site | --sit)
337 ac_prev=site ;;
338 -site=* | --site=* | --sit=*)
339 site="$ac_optarg" ;;
340
Guido van Rossum7f43da71994-08-01 12:15:30 +0000341 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
342 ac_prev=srcdir ;;
343 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
344 srcdir="$ac_optarg" ;;
345
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000346 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
347 | --syscon | --sysco | --sysc | --sys | --sy)
348 ac_prev=sysconfdir ;;
349 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
350 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
351 sysconfdir="$ac_optarg" ;;
352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353 -target | --target | --targe | --targ | --tar | --ta | --t)
354 ac_prev=target ;;
355 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
356 target="$ac_optarg" ;;
357
358 -v | -verbose | --verbose | --verbos | --verbo | --verb)
359 verbose=yes ;;
360
361 -version | --version | --versio | --versi | --vers)
Guido van Rossumf78abae1997-01-21 22:02:36 +0000362 echo "configure generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000363 exit 0 ;;
364
365 -with-* | --with-*)
366 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000367 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000369 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000370 fi
371 ac_package=`echo $ac_package| sed 's/-/_/g'`
372 case "$ac_option" in
373 *=*) ;;
374 *) ac_optarg=yes ;;
375 esac
376 eval "with_${ac_package}='$ac_optarg'" ;;
377
378 -without-* | --without-*)
379 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000380 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000382 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000383 fi
384 ac_package=`echo $ac_package| sed 's/-/_/g'`
385 eval "with_${ac_package}=no" ;;
386
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000387 --x)
388 # Obsolete; use --with-x.
389 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000390
391 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
392 | --x-incl | --x-inc | --x-in | --x-i)
393 ac_prev=x_includes ;;
394 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
395 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
396 x_includes="$ac_optarg" ;;
397
398 -x-libraries | --x-libraries | --x-librarie | --x-librari \
399 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
400 ac_prev=x_libraries ;;
401 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
402 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
403 x_libraries="$ac_optarg" ;;
404
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000405 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406 ;;
407
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000408 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000409 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000410 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000412 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 { 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 +0000414 fi
415 nonopt="$ac_option"
416 ;;
417
418 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000419done
420
Guido van Rossum7f43da71994-08-01 12:15:30 +0000421if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000422 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000423fi
424
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000425trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000426
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000427# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000428# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000429# 1 file creation
430# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000431# 3 some systems may open it to /dev/tty
432# 4 used on the Kubota Titan
433# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434# 5 compiler messages saved in config.log
435if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000436 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000437else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000438 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000439fi
440exec 5>./config.log
441
442echo "\
443This file contains any messages produced by compilers while
444running configure, to aid debugging if configure makes a mistake.
445" 1>&5
446
447# Strip out --no-create and --no-recursion so they do not pile up.
448# Also quote any args containing shell metacharacters.
449ac_configure_args=
450for ac_arg
451do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000452 case "$ac_arg" in
453 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
454 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
456 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
457 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
458 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
459 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000460 esac
461done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000462
463# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000464# Only set these to C if already set. These must not be set unconditionally
465# because not all systems understand e.g. LANG=C (notably SCO).
466# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
467# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000468if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000469if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
470if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
471if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000472
Guido van Rossum7f43da71994-08-01 12:15:30 +0000473# confdefs.h avoids OS command line length limits that DEFS can exceed.
474rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000475# AIX cpp loses on an empty file, so make sure it contains at least a newline.
476echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000477
478# A filename unique to this package, relative to the directory that
479# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000481
482# Find the source files, if location was not specified.
483if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000484 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000485 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486 ac_prog=$0
487 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
488 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
489 srcdir=$ac_confdir
490 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000491 srcdir=..
492 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000493else
494 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000497 if test "$ac_srcdir_defaulted" = yes; then
498 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000499 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000500 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000502fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000503srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
504
505# Prefer explicitly selected file to automatically selected ones.
506if test -z "$CONFIG_SITE"; then
507 if test "x$prefix" != xNONE; then
508 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
509 else
510 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
511 fi
512fi
513for ac_site_file in $CONFIG_SITE; do
514 if test -r "$ac_site_file"; then
515 echo "loading site script $ac_site_file"
516 . "$ac_site_file"
517 fi
518done
519
520if test -r "$cache_file"; then
521 echo "loading cache $cache_file"
522 . $cache_file
523else
524 echo "creating cache $cache_file"
525 > $cache_file
526fi
527
Guido van Rossum7f43da71994-08-01 12:15:30 +0000528ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000529# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000530ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000531ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
532ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000533cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000534
535if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
536 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
537 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
538 ac_n= ac_c='
539' ac_t=' '
540 else
541 ac_n=-n ac_c= ac_t=
542 fi
543else
544 ac_n= ac_c='\c' ac_t=
545fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000546
Guido van Rossum0a516c91994-09-12 10:58:40 +0000547
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum627b2d71993-12-24 10:39:16 +0000549
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000550# NEXTSTEP stuff
Guido van Rossum563e7081996-09-10 18:20:48 +0000551if test -f /usr/lib/NextStep/software_version; then
552
553 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000554echo "configure:555: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000555 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000556if test "${with_next_archs+set}" = set; then
557 withval="$with_next_archs"
558
Guido van Rossum563e7081996-09-10 18:20:48 +0000559 if test -n "$withval"; then
560 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
561 # GCC does not currently support multi archs on the NeXT
562 with_gcc=no
563 fi
564 echo "$ac_t""$with_next_archs" 1>&6
565
566else
567 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000568fi
569
Guido van Rossum563e7081996-09-10 18:20:48 +0000570
571 if test -z "$MACHDEP"
572 then
573 set X `hostinfo | grep 'NeXT Mach.*:' | \
574 sed -e 's/://' -e 's/\./_/'` && \
575 ac_sys_system=next && ac_sys_release=$4
576
577 MACHDEP="$ac_sys_system$ac_sys_release"
578 fi
579fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000580
581# Set name for machine-dependent library files
582
583echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000584echo "configure:585: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585if test -z "$MACHDEP"
586then
Guido van Rossum563e7081996-09-10 18:20:48 +0000587 ac_sys_system=`uname -s`
588 if test "$ac_sys_system" = "AIX" ; then
589 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000590 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000591 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000592 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000593 ac_md_system=`echo $ac_sys_system |
594 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
595 ac_md_release=`echo $ac_sys_release |
596 tr -d '/ ' | sed 's/\..*//'`
597 MACHDEP="$ac_md_system$ac_md_release"
598
Guido van Rossum07397971997-04-29 21:49:50 +0000599 case $MACHDEP in
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000600 '') MACHDEP=unknown;;
601 esac
602fi
603echo "$ac_t""$MACHDEP" 1>&6
604
Guido van Rossum627b2d71993-12-24 10:39:16 +0000605# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000606echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000607echo "configure:608: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000608# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000609if test "${with_gcc+set}" = set; then
610 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
612 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000613 no) CC=cc
614 without_gcc=yes;;
615 yes) CC=gcc
616 without_gcc=no;;
617 *) CC=$withval
618 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000619 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000620else
Guido van Rossume77438c1995-09-13 18:59:59 +0000621
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000622 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000623 OSF1) CC=cc
624 without_gcc=;;
625 *) without_gcc=no;;
626 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000627fi
628
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000629echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000630
Guido van Rossum8b131c51995-03-09 14:10:13 +0000631# If the user switches compilers, we can't believe the cache
632if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
633then
634 { echo "configure: error: cached CC is different -- throw away $cache_file
635(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
636fi
637
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000638# Extract the first word of "gcc", so it can be a program name with args.
639set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000641echo "configure:642: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000642if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
643 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000644else
645 if test -n "$CC"; then
646 ac_cv_prog_CC="$CC" # Let the user override the test.
647else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000648 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
649 for ac_dir in $PATH; do
650 test -z "$ac_dir" && ac_dir=.
651 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000652 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000653 break
654 fi
655 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000656 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000657fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000658fi
659CC="$ac_cv_prog_CC"
660if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000661 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000662else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000663 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000664fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000665
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000666if test -z "$CC"; then
667 # Extract the first word of "cc", so it can be a program name with args.
668set dummy cc; ac_word=$2
669echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000670echo "configure:671: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000671if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
672 echo $ac_n "(cached) $ac_c" 1>&6
673else
674 if test -n "$CC"; then
675 ac_cv_prog_CC="$CC" # Let the user override the test.
676else
677 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
678 ac_prog_rejected=no
679 for ac_dir in $PATH; do
680 test -z "$ac_dir" && ac_dir=.
681 if test -f $ac_dir/$ac_word; then
682 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
683 ac_prog_rejected=yes
684 continue
685 fi
686 ac_cv_prog_CC="cc"
687 break
688 fi
689 done
690 IFS="$ac_save_ifs"
691if test $ac_prog_rejected = yes; then
692 # We found a bogon in the path, so make sure we never use it.
693 set dummy $ac_cv_prog_CC
694 shift
695 if test $# -gt 0; then
696 # We chose a different compiler from the bogus one.
697 # However, it has the same basename, so the bogon will be chosen
698 # first if we set CC to just the basename; use the full file name.
699 shift
700 set dummy "$ac_dir/$ac_word" "$@"
701 shift
702 ac_cv_prog_CC="$@"
703 fi
704fi
705fi
706fi
707CC="$ac_cv_prog_CC"
708if test -n "$CC"; then
709 echo "$ac_t""$CC" 1>&6
710else
711 echo "$ac_t""no" 1>&6
712fi
713
714 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
715fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000716
Guido van Rossumf78abae1997-01-21 22:02:36 +0000717echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000718echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000719
720ac_ext=c
721# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
722ac_cpp='$CPP $CPPFLAGS'
723ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
724ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
725cross_compiling=$ac_cv_prog_cc_cross
726
727cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +0000728#line 729 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000729#include "confdefs.h"
730main(){return(0);}
731EOF
Guido van Rossum7f253911997-05-09 02:42:48 +0000732if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000733 ac_cv_prog_cc_works=yes
734 # If we can't run a trivial program, we are probably using a cross compiler.
735 if (./conftest; exit) 2>/dev/null; then
736 ac_cv_prog_cc_cross=no
737 else
738 ac_cv_prog_cc_cross=yes
739 fi
740else
741 echo "configure: failed program was:" >&5
742 cat conftest.$ac_ext >&5
743 ac_cv_prog_cc_works=no
744fi
745rm -fr conftest*
746
747echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
748if test $ac_cv_prog_cc_works = no; then
749 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
750fi
751echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000752echo "configure:753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000753echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
754cross_compiling=$ac_cv_prog_cc_cross
755
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000756echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000757echo "configure:758: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000758if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
759 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760else
761 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000762#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000764#endif
765EOF
Guido van Rossum7f253911997-05-09 02:42:48 +0000766if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767 ac_cv_prog_gcc=yes
768else
769 ac_cv_prog_gcc=no
770fi
771fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000773echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000774
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000775if test $ac_cv_prog_gcc = yes; then
776 GCC=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +0000777 ac_test_CFLAGS="${CFLAGS+set}"
778 ac_save_CFLAGS="$CFLAGS"
779 CFLAGS=
780 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000781echo "configure:782: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000782if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000783 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784else
785 echo 'void f(){}' > conftest.c
786if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000787 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000789 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000790fi
791rm -f conftest*
792
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000794
Guido van Rossumf78abae1997-01-21 22:02:36 +0000795echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
796 if test "$ac_test_CFLAGS" = set; then
797 CFLAGS="$ac_save_CFLAGS"
798 elif test $ac_cv_prog_cc_g = yes; then
799 CFLAGS="-g -O2"
800 else
801 CFLAGS="-O2"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802 fi
803else
804 GCC=
805 test "${CFLAGS+set}" = set || CFLAGS="-g"
806fi
807
808# Extract the first word of "ranlib", so it can be a program name with args.
809set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000810echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000811echo "configure:812: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000812if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
813 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814else
815 if test -n "$RANLIB"; then
816 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
817else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
819 for ac_dir in $PATH; do
820 test -z "$ac_dir" && ac_dir=.
821 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823 break
824 fi
825 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829fi
830RANLIB="$ac_cv_prog_RANLIB"
831if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000832 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000834 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000836
837
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838for ac_prog in ar aal
839do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840# Extract the first word of "$ac_prog", so it can be a program name with args.
841set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000842echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000843echo "configure:844: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000844if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
845 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846else
847 if test -n "$AR"; then
848 ac_cv_prog_AR="$AR" # Let the user override the test.
849else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
851 for ac_dir in $PATH; do
852 test -z "$ac_dir" && ac_dir=.
853 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 break
856 fi
857 done
858 IFS="$ac_save_ifs"
859fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860fi
861AR="$ac_cv_prog_AR"
862if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000863 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000865 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868test -n "$AR" && break
869done
870test -n "$AR" || AR="ar"
871
872
Guido van Rossumda88dad1995-01-26 00:46:29 +0000873
874
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000875# Install just never works :-(
876if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000877then
878 INSTALL=cp
879 INSTALL_PROGRAM=cp
880 INSTALL_DATA=cp
881else
882 INSTALL_PROGRAM="$INSTALL"
883 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000884fi
885
886# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000887
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000888if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000889then
890 case $ac_sys_system in
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000891 *) OPT="-O";;
892 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000893fi
894
Guido van Rossum563e7081996-09-10 18:20:48 +0000895if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000896then
897 OPT="$OPT $ac_arch_flags"
898fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000899# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000900echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000901echo "configure:902: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902# On Suns, sometimes $CPP names a directory.
903if test -n "$CPP" && test -d "$CPP"; then
904 CPP=
905fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000906if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000907if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
908 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909else
910 # This must be in double quotes, not single quotes, because CPP may get
911 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913 # On the NeXT, cc -E runs the code through the compiler's parser,
914 # not just through cpp.
915 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +0000916#line 917 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919Syntax Error
920EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum7f253911997-05-09 02:42:48 +0000922{ (eval echo configure:923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924if test -z "$ac_err"; then
925 :
926else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000928 echo "configure: failed program was:" >&5
929 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930 rm -rf conftest*
931 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +0000933#line 934 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936Syntax Error
937EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum7f253911997-05-09 02:42:48 +0000939{ (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000942 :
943else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000945 echo "configure: failed program was:" >&5
946 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000947 rm -rf conftest*
948 CPP=/lib/cpp
949fi
950rm -f conftest*
951fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954fi
Guido van Rossume77438c1995-09-13 18:59:59 +0000955 CPP="$ac_cv_prog_CPP"
956else
957 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000959echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000960
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000961echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000962echo "configure:963: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +0000964#line 965 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000965#include "confdefs.h"
966#ifdef _AIX
967 yes
968#endif
969
970EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
972 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000973 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000974 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975#define _ALL_SOURCE 1
976EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000977
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000978else
979 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000980 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000981fi
982rm -f conftest*
983
984
Guido van Rossumf78abae1997-01-21 22:02:36 +0000985ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000986echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +0000987echo "configure:988: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000988if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
989 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990else
991 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +0000992#line 993 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000993#include "confdefs.h"
994#include <minix/config.h>
995EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum7f253911997-05-09 02:42:48 +0000997{ (eval echo configure:998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001000 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001002else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001004 echo "configure: failed program was:" >&5
1005 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001006 rm -rf conftest*
1007 eval "ac_cv_header_$ac_safe=no"
1008fi
1009rm -f conftest*
1010fi
1011if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001012 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 MINIX=yes
1014else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001015 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017fi
1018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019if test "$MINIX" = yes; then
1020 cat >> confdefs.h <<\EOF
1021#define _POSIX_SOURCE 1
1022EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024 cat >> confdefs.h <<\EOF
1025#define _POSIX_1_SOURCE 2
1026EOF
1027
1028 cat >> confdefs.h <<\EOF
1029#define _MINIX 1
1030EOF
1031
1032fi
1033
Guido van Rossumda88dad1995-01-26 00:46:29 +00001034
Guido van Rossum201afe51997-05-14 21:14:44 +00001035echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
1036echo "configure:1037: checking whether $CC accepts -Olimit 1500" >&5
1037if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1038 echo $ac_n "(cached) $ac_c" 1>&6
1039else
1040 ac_save_cc="$CC"
1041CC="$CC -Olimit 1500"
1042cat > conftest.$ac_ext <<EOF
1043#line 1044 "configure"
1044#include "confdefs.h"
1045
1046int main() {
1047;
1048; return 0; }
1049EOF
1050if { (eval echo configure:1051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1051 rm -rf conftest*
1052 ac_cv_olimit_ok=yes
1053else
1054 echo "configure: failed program was:" >&5
1055 cat conftest.$ac_ext >&5
1056 rm -rf conftest*
1057 ac_cv_olimit_ok=no
1058fi
1059rm -f conftest*
1060CC="$ac_save_cc"
1061fi
1062
1063echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1064if test $ac_cv_olimit_ok = yes; then
1065 OPT="$OPT -Olimit 1500"
1066fi
1067
Guido van Rossum84e7b241996-08-19 21:59:00 +00001068# check for ANSI or K&R ("traditional") preprocessor
1069echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001070echo "configure:1071: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001071cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001072#line 1073 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001073#include "confdefs.h"
1074
1075#define spam(name, doc) {#name, &name, #name "() -- " doc}
1076int foo;
1077struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1078
Guido van Rossumf78abae1997-01-21 22:02:36 +00001079int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001080;
1081; return 0; }
1082EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001083if { (eval echo configure:1084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001084 rm -rf conftest*
1085 cpp_type=ansi
1086else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001087 echo "configure: failed program was:" >&5
1088 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001089 rm -rf conftest*
1090 cat >> confdefs.h <<\EOF
1091#define HAVE_OLD_CPP 1
1092EOF
1093 cpp_type=traditional
1094fi
1095rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001096echo "$ac_t""$cpp_type" 1>&6
1097
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001098# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001099echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001100echo "configure:1101: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001101if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1102 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001103else
1104 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001105#line 1106 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001106#include "confdefs.h"
1107#include <stdlib.h>
1108#include <stdarg.h>
1109#include <string.h>
1110#include <float.h>
1111EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001112ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum201afe51997-05-14 21:14:44 +00001113{ (eval echo configure:1114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001116 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 ac_cv_header_stdc=yes
1118else
1119 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001120 echo "configure: failed program was:" >&5
1121 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123 ac_cv_header_stdc=no
1124fi
1125rm -f conftest*
1126
1127if test $ac_cv_header_stdc = yes; then
1128 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1129cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001130#line 1131 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131#include "confdefs.h"
1132#include <string.h>
1133EOF
1134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1135 egrep "memchr" >/dev/null 2>&1; then
1136 :
1137else
1138 rm -rf conftest*
1139 ac_cv_header_stdc=no
1140fi
1141rm -f conftest*
1142
1143fi
1144
1145if test $ac_cv_header_stdc = yes; then
1146 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1147cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001148#line 1149 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149#include "confdefs.h"
1150#include <stdlib.h>
1151EOF
1152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1153 egrep "free" >/dev/null 2>&1; then
1154 :
1155else
1156 rm -rf conftest*
1157 ac_cv_header_stdc=no
1158fi
1159rm -f conftest*
1160
1161fi
1162
1163if test $ac_cv_header_stdc = yes; then
1164 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1165if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001168 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001169#line 1170 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170#include "confdefs.h"
1171#include <ctype.h>
1172#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1173#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001175int main () { int i; for (i = 0; i < 256; i++)
1176if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1177exit (0); }
1178
1179EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001180if { (eval echo configure:1181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001181then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182 :
1183else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001184 echo "configure: failed program was:" >&5
1185 cat conftest.$ac_ext >&5
1186 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001188fi
1189rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001190fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001191
1192fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001195echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196if test $ac_cv_header_stdc = yes; then
1197 cat >> confdefs.h <<\EOF
1198#define STDC_HEADERS 1
1199EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001200
1201fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001202
Guido van Rossum07397971997-04-29 21:49:50 +00001203for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001204signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001205sys/audioio.h sys/file.h sys/lock.h \
1206sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001207sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001209ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001210echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001211echo "configure:1212: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001212if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1213 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
1215 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001216#line 1217 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001220ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum201afe51997-05-14 21:14:44 +00001221{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 eval "ac_cv_header_$ac_safe=yes"
1226else
1227 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001228 echo "configure: failed program was:" >&5
1229 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230 rm -rf conftest*
1231 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232fi
1233rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234fi
1235if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001236 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001237 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 cat >> confdefs.h <<EOF
1239#define $ac_tr_hdr 1
1240EOF
1241
1242else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001243 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245done
1246
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247ac_header_dirent=no
1248for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1249do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001250ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001251echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001252echo "configure:1253: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001253if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001255else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001257#line 1258 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001258#include "confdefs.h"
1259#include <sys/types.h>
1260#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001261int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001262DIR *dirp = 0;
1263; return 0; }
1264EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001265if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001266 rm -rf conftest*
1267 eval "ac_cv_header_dirent_$ac_safe=yes"
1268else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001269 echo "configure: failed program was:" >&5
1270 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271 rm -rf conftest*
1272 eval "ac_cv_header_dirent_$ac_safe=no"
1273fi
1274rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001277 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001278 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279 cat >> confdefs.h <<EOF
1280#define $ac_tr_hdr 1
1281EOF
1282 ac_header_dirent=$ac_hdr; break
1283else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001284 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285fi
1286done
1287# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1288if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001289echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001290echo "configure:1291: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001291ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001292if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001293 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294else
1295 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001296LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001298#line 1299 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001300/* Override any gcc2 internal prototype to avoid an error. */
1301/* We use char because int might match the return type of a gcc2
1302 builtin and then its argument prototype would still apply. */
1303char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001304
Guido van Rossumf78abae1997-01-21 22:02:36 +00001305int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001306opendir()
1307; return 0; }
1308EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001309if { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001311 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001316 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317fi
1318rm -f conftest*
1319LIBS="$ac_save_LIBS"
1320
1321fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001322if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001323 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324 LIBS="$LIBS -ldir"
1325else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001326 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327fi
1328
1329else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001330echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001331echo "configure:1332: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001332ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001333if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001334 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001335else
1336 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001337LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001339#line 1340 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001341/* Override any gcc2 internal prototype to avoid an error. */
1342/* We use char because int might match the return type of a gcc2
1343 builtin and then its argument prototype would still apply. */
1344char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345
Guido van Rossumf78abae1997-01-21 22:02:36 +00001346int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001347opendir()
1348; return 0; }
1349EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001350if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001352 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001353else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001354 echo "configure: failed program was:" >&5
1355 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001357 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001358fi
1359rm -f conftest*
1360LIBS="$ac_save_LIBS"
1361
1362fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001363if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001364 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365 LIBS="$LIBS -lx"
1366else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001367 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368fi
1369
1370fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371
1372
1373# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001374was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001375echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001376echo "configure:1377: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001378#line 1379 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001379#include "confdefs.h"
1380#include <time.h>
1381EOF
1382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1383 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001384 rm -rf conftest*
1385 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001386else
1387 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001388 cat >> confdefs.h <<\EOF
1389#define clock_t long
1390EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001391
1392fi
1393rm -f conftest*
1394
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001395echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001396
Guido van Rossum84e7b241996-08-19 21:59:00 +00001397# Add some code to confdefs.h so that the test for off_t works on SCO
1398cat >> confdefs.h <<\EOF
1399#if defined(SCO_DS)
1400#undef _OFF_T
1401#endif
1402EOF
1403
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001404echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001405echo "configure:1406: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001406if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1407 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001408else
1409 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001410#line 1411 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001411#include "confdefs.h"
1412#include <sys/types.h>
1413#if STDC_HEADERS
1414#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001415#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001416#endif
1417EOF
1418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001419 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001420 rm -rf conftest*
1421 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001422else
1423 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001424 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001425fi
1426rm -f conftest*
1427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001428fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001429echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001430if test $ac_cv_type_mode_t = no; then
1431 cat >> confdefs.h <<\EOF
1432#define mode_t int
1433EOF
1434
1435fi
1436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001437echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001438echo "configure:1439: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001439if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1440 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001441else
1442 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001443#line 1444 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001444#include "confdefs.h"
1445#include <sys/types.h>
1446#if STDC_HEADERS
1447#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001448#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001449#endif
1450EOF
1451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001452 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001453 rm -rf conftest*
1454 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001455else
1456 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001457 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001458fi
1459rm -f conftest*
1460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001462echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463if test $ac_cv_type_off_t = no; then
1464 cat >> confdefs.h <<\EOF
1465#define off_t long
1466EOF
1467
1468fi
1469
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001471echo "configure:1472: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001472if eval "test \"`echo '$''{'ac_cv_type_pid_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 Rossum201afe51997-05-14 21:14:44 +00001476#line 1477 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001477#include "confdefs.h"
1478#include <sys/types.h>
1479#if STDC_HEADERS
1480#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001481#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001482#endif
1483EOF
1484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001485 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001486 rm -rf conftest*
1487 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001488else
1489 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001490 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001491fi
1492rm -f conftest*
1493
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001494fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001495echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001496if test $ac_cv_type_pid_t = no; then
1497 cat >> confdefs.h <<\EOF
1498#define pid_t int
1499EOF
1500
1501fi
1502
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001503echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001504echo "configure:1505: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001505if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1506 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001507else
1508 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001509#line 1510 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001510#include "confdefs.h"
1511#include <sys/types.h>
1512#include <signal.h>
1513#ifdef signal
1514#undef signal
1515#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001516#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001517extern "C" void (*signal (int, void (*)(int)))(int);
1518#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001519void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001520#endif
1521
Guido van Rossumf78abae1997-01-21 22:02:36 +00001522int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001523int i;
1524; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001525EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001526if { (eval echo configure:1527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001527 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001529else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001530 echo "configure: failed program was:" >&5
1531 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001533 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001534fi
1535rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001537
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001538echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539cat >> confdefs.h <<EOF
1540#define RETSIGTYPE $ac_cv_type_signal
1541EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001542
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001544echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001545echo "configure:1546: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001546if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001548else
1549 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001550#line 1551 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001555#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001559 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562else
1563 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001565fi
1566rm -f conftest*
1567
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001568fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001569echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001570if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define size_t unsigned
1573EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001574
1575fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001577echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001578echo "configure:1579: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001579if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1580 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581else
1582 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001583#line 1584 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584#include "confdefs.h"
1585#include <sys/types.h>
1586EOF
1587if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1588 egrep "uid_t" >/dev/null 2>&1; then
1589 rm -rf conftest*
1590 ac_cv_type_uid_t=yes
1591else
1592 rm -rf conftest*
1593 ac_cv_type_uid_t=no
1594fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001595rm -f conftest*
1596
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001597fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001598
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001599echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001600if test $ac_cv_type_uid_t = no; then
1601 cat >> confdefs.h <<\EOF
1602#define uid_t int
1603EOF
1604
1605 cat >> confdefs.h <<\EOF
1606#define gid_t int
1607EOF
1608
1609fi
1610
Guido van Rossum627b2d71993-12-24 10:39:16 +00001611
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001612echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001613echo "configure:1614: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001614if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 if test "$cross_compiling" = yes; then
1618 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1619else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001620 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001621#line 1622 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001622#include "confdefs.h"
1623#include <stdio.h>
1624main()
1625{
1626 FILE *f=fopen("conftestval", "w");
1627 if (!f) exit(1);
1628 fprintf(f, "%d\n", sizeof(int));
1629 exit(0);
1630}
1631EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001632if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001633then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001634 ac_cv_sizeof_int=`cat conftestval`
1635else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001636 echo "configure: failed program was:" >&5
1637 cat conftest.$ac_ext >&5
1638 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001639 ac_cv_sizeof_int=0
1640fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001641rm -fr conftest*
1642fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001643
1644fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001645echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1646cat >> confdefs.h <<EOF
1647#define SIZEOF_INT $ac_cv_sizeof_int
1648EOF
1649
1650
1651echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001652echo "configure:1653: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001653if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1654 echo $ac_n "(cached) $ac_c" 1>&6
1655else
1656 if test "$cross_compiling" = yes; then
1657 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1658else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001659 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001660#line 1661 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001661#include "confdefs.h"
1662#include <stdio.h>
1663main()
1664{
1665 FILE *f=fopen("conftestval", "w");
1666 if (!f) exit(1);
1667 fprintf(f, "%d\n", sizeof(long));
1668 exit(0);
1669}
1670EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001671if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001672then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001673 ac_cv_sizeof_long=`cat conftestval`
1674else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001675 echo "configure: failed program was:" >&5
1676 cat conftest.$ac_ext >&5
1677 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001678 ac_cv_sizeof_long=0
1679fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001680rm -fr conftest*
1681fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001682
1683fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001684echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1685cat >> confdefs.h <<EOF
1686#define SIZEOF_LONG $ac_cv_sizeof_long
1687EOF
1688
1689
Guido van Rossum0a516c91994-09-12 10:58:40 +00001690
1691# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001692
1693
1694
1695
Guido van Rossum0a516c91994-09-12 10:58:40 +00001696# SO is the extension of shared libraries `(including the dot!)
1697# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001698echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001699echo "configure:1700: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001700if test -z "$SO"
1701then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001703 hp*|HP*) SO=.sl;;
1704 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001705 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001706fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001707echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001708# LDSHARED is the ld *command* used to create shared library
1709# -- "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 +00001710echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001711echo "configure:1712: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001712if test -z "$LDSHARED"
1713then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001714 case $ac_sys_system/$ac_sys_release in
Guido van Rossum84e7b241996-08-19 21:59:00 +00001715 AIX*) LDSHARED="ld_so_aix \$(CC)";;
Guido van Rossum07397971997-04-29 21:49:50 +00001716 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum37e97bc1997-04-29 22:15:33 +00001717 IRIX/6*) LDSHARED="ld $SGI_ABI -shared -all"; OPT="$OPT $SGI_ABI";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001718 SunOS/4*) LDSHARED="ld";;
1719 SunOS/5*) LDSHARED="ld -G";;
1720 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001721 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1722 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001723 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001724 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001725 FreeBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001726 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001727 *) LDSHARED="ld";;
1728 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001729fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001730echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001731# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001732# library -- this is only needed for a few systems
1733echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001734echo "configure:1735: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001735if test -z "$CCSHARED"
1736then
Guido van Rossum07397971997-04-29 21:49:50 +00001737 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001738 hp*|HP*) if test "$GCC" = yes;
1739 then CCSHARED="-fpic";
1740 else CCSHARED="+z";
1741 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001742 Linux*) CCSHARED="-fpic";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001743 FreeBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001744 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum37e97bc1997-04-29 22:15:33 +00001745 IRIX/6*) CCSHARED="$SGI_ABI -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001746 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001747fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001748echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001749# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001750# the python executable -- this is only needed for a few systems
1751echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001752echo "configure:1753: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001753if test -z "$LINKFORSHARED"
1754then
Guido van Rossum07397971997-04-29 21:49:50 +00001755 case $ac_sys_system/$ac_sys_release in
Guido van Rossume4766f61997-05-13 21:04:26 +00001756 AIX*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001757 hp*|HP*)
1758 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/sharedmodules";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001759 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001760 next) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001761 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum37e97bc1997-04-29 22:15:33 +00001762 IRIX/6*) LINKFORSHARED="$SGI_ABI -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001763 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001764fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001765echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001766
Guido van Rossum627b2d71993-12-24 10:39:16 +00001767# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00001768echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001769echo "configure:1770: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001770ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001771if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001772 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001773else
1774 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001775LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001776cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001777#line 1778 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001778#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001779/* Override any gcc2 internal prototype to avoid an error. */
1780/* We use char because int might match the return type of a gcc2
1781 builtin and then its argument prototype would still apply. */
1782char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001783
Guido van Rossumf78abae1997-01-21 22:02:36 +00001784int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001785dlopen()
1786; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001787EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001788if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001789 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001790 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001792 echo "configure: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001794 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001795 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001796fi
1797rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001798LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001799
Guido van Rossum627b2d71993-12-24 10:39:16 +00001800fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001801if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001802 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001803 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1804 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805 cat >> confdefs.h <<EOF
1806#define $ac_tr_lib 1
1807EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001808
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001809 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001810
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001812 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813fi
1814 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00001815echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001816echo "configure:1817: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001817ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001818if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001819 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820else
1821 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001822LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001823cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001824#line 1825 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001825#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001826/* Override any gcc2 internal prototype to avoid an error. */
1827/* We use char because int might match the return type of a gcc2
1828 builtin and then its argument prototype would still apply. */
1829char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001830
Guido van Rossumf78abae1997-01-21 22:02:36 +00001831int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001832shl_load()
1833; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001834EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001835if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001836 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001837 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001838else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001839 echo "configure: failed program was:" >&5
1840 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001841 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001842 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001843fi
1844rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001845LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001846
Guido van Rossum627b2d71993-12-24 10:39:16 +00001847fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001848if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001849 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001850 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1851 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852 cat >> confdefs.h <<EOF
1853#define $ac_tr_lib 1
1854EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001855
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001856 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001857
1858else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001859 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001860fi
1861 # Dynamic linking for HP-UX
Guido van Rossumf78abae1997-01-21 22:02:36 +00001862echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001863echo "configure:1864: checking for getpwnam in -lsun" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001864ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001865if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001866 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001867else
1868 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001869LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001870cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001871#line 1872 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001872#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001873/* Override any gcc2 internal prototype to avoid an error. */
1874/* We use char because int might match the return type of a gcc2
1875 builtin and then its argument prototype would still apply. */
1876char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001877
Guido van Rossumf78abae1997-01-21 22:02:36 +00001878int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879getpwnam()
1880; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001881EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001883 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001884 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001889 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001890fi
1891rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001893
Guido van Rossum7f43da71994-08-01 12:15:30 +00001894fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001895if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001896 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001897 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1898 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001899 cat >> confdefs.h <<EOF
1900#define $ac_tr_lib 1
1901EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904
1905else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001906 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907fi
1908 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001909# The following three (nsl,inet,socket) are needed on Sequent;
1910# the order of checking must be this. Most SVR4 platforms will
1911# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1912# broken. I see no elegant solution (probably CHECK_LIB should be
1913# fixed to only add the library if the given entry point is not
1914# satisfied without it).
Guido van Rossum2b3ac691996-08-30 15:18:41 +00001915if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00001916then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001917echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001918echo "configure:1919: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001919ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001920if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001921 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001922else
1923 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001924LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001925cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001926#line 1927 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001927#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001928/* Override any gcc2 internal prototype to avoid an error. */
1929/* We use char because int might match the return type of a gcc2
1930 builtin and then its argument prototype would still apply. */
1931char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001932
Guido van Rossumf78abae1997-01-21 22:02:36 +00001933int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001934t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001935; return 0; }
1936EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001937if { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001938 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001939 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001940else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001941 echo "configure: failed program was:" >&5
1942 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001943 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001944 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001945fi
1946rm -f conftest*
1947LIBS="$ac_save_LIBS"
1948
1949fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001950if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001951 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001952 LIBS="-lnsl $LIBS"
1953else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001954 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001955fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001956 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00001957echo $ac_n "checking for gethostbyname in -linet""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001958echo "configure:1959: checking for gethostbyname in -linet" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001959ac_lib_var=`echo inet'_'gethostbyname | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001960if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001961 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001962else
1963 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001964LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001965cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001966#line 1967 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001967#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001968/* Override any gcc2 internal prototype to avoid an error. */
1969/* We use char because int might match the return type of a gcc2
1970 builtin and then its argument prototype would still apply. */
1971char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001972
Guido van Rossumf78abae1997-01-21 22:02:36 +00001973int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001974gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001975; return 0; }
1976EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00001977if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001978 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001979 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001980else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001981 echo "configure: failed program was:" >&5
1982 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001983 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001984 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001985fi
1986rm -f conftest*
1987LIBS="$ac_save_LIBS"
1988
1989fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001990if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001991 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001992 LIBS="-linet $LIBS"
1993else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001994 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001995fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001996 # Sequent
Guido van Rossumf78abae1997-01-21 22:02:36 +00001997echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00001998echo "configure:1999: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001999ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002000if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002001 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002002else
2003 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002004LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002005cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002006#line 2007 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002007#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002008/* Override any gcc2 internal prototype to avoid an error. */
2009/* We use char because int might match the return type of a gcc2
2010 builtin and then its argument prototype would still apply. */
2011char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002012
Guido van Rossumf78abae1997-01-21 22:02:36 +00002013int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002014socket()
2015; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002016EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002017if { (eval echo configure:2018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002018 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002019 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002020else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002021 echo "configure: failed program was:" >&5
2022 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002023 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002024 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002025fi
2026rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002028
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002029fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002030if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002031 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002032 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002033else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002034 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002035fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002036 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00002037fi
Guido van Rossuma68acba1996-07-31 17:36:39 +00002038echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002039echo "configure:2040: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002040# Check whether --with-libs or --without-libs was given.
2041if test "${with_libs+set}" = set; then
2042 withval="$with_libs"
2043
2044echo "$ac_t""$withval" 1>&6
2045LIBS="$withval $LIBS"
2046
2047else
2048 echo "$ac_t""no" 1>&6
2049fi
2050
Guido van Rossum7f43da71994-08-01 12:15:30 +00002051
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002052echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002053echo "configure:2054: checking for --with(out)-readline" >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002054use_readline="yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002055# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002056if test "${with_readline+set}" = set; then
2057 withval="$with_readline"
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002058 echo "$ac_t""$withval" 1>&6; use_readline="$withval"
2059else
2060 echo "$ac_t""(default) yes" 1>&6
2061fi
2062
2063if test "$use_readline" != "no"
2064then
2065 if test "$use_readline" != "yes"
2066 then add_ldflags="-L$use_readline"
2067 else add_ldflags=""
2068 fi
2069 # See where the termcap interface could be hiding...
2070 echo $ac_n "checking for readline and termcap libraries""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002071echo "configure:2072: checking for readline and termcap libraries" >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002072 if eval "test \"`echo '$''{'ac_cv_readline_termcap'+set}'`\" = set"; then
2073 echo $ac_n "(cached) $ac_c" 1>&6
2074else
Guido van Rossum7f43da71994-08-01 12:15:30 +00002075
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002076 echo "$ac_t""have to find out" 1>&6
2077 save_libs="$LIBS"
2078 save_ldflags="$LDFLAGS"
2079 LDFLAGS="$save_ldflags $add_ldflags"
2080 rl="-lreadline"
2081 first=""
2082 # Hack for SGI IRIX 5.x.
2083 # Both termcap and gl have an entry point clear().
2084 # When linking with both shared libraries, we're in trouble.
2085 # We don't need the one in termcap.
2086 # By forcing a static link for termcap, we avoid
2087 # linking its clear() entry point.
2088 if test -f /usr/lib/libgl.so -a -f /usr/lib/libtermcap.a
2089 then first="/usr/lib/libtermcap.a"
2090 fi
2091 for add_lib in \
2092 "$first" "-ltermcap" "-ltermlib" "-lcurses" "-lncurses"
2093 do
2094 echo $ac_n "checking for $rl $add_lib""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002095echo "configure:2096: checking for $rl $add_lib" >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002096 LIBS="$save_libs $rl $add_lib"
2097 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002098#line 2099 "configure"
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002099#include "confdefs.h"
2100extern char *readline();
Guido van Rossumf78abae1997-01-21 22:02:36 +00002101int main() {
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002102char *line=readline();
2103; return 0; }
2104EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002105if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002106 rm -rf conftest*
2107 echo "$ac_t""yes" 1>&6;
2108 ac_cv_readline_termcap="$rl $add_lib"
2109else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002110 echo "configure: failed program was:" >&5
2111 cat conftest.$ac_ext >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002112 rm -rf conftest*
2113 echo "$ac_t""no" 1>&6
2114fi
2115rm -f conftest*
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002116 if test "$ac_cv_readline_termcap" != ""
2117 then break
2118 fi
2119 done
2120 LIBS="$save_libs"
2121 LDFLAGS="$save_ldflags"
2122 echo $ac_n "checking result from check for readline and termcap""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002123echo "configure:2124: checking result from check for readline and termcap" >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002124
2125fi
2126
2127 if test "$ac_cv_readline_termcap" = ""
2128 then
2129 echo "$ac_t""no" 1>&6
2130 echo "configure: warning: cannot link with GNU readline -- see config.log" 1>&2
2131 else
2132 echo "$ac_t""$ac_cv_readline_termcap" 1>&6
2133 LIBS="$LIBS $ac_cv_readline_termcap"
2134 LDFLAGS="$LDFLAGS $add_ldflags"
2135 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002136#define WITH_READLINE 1
2137EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002138
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002139 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002140fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002141
Guido van Rossumec2f0731997-01-22 20:54:01 +00002142echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002143echo "configure:2144: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002144
2145# Check whether --with-dec-threads or --without-dec-threads was given.
2146if test "${with_dec_threads+set}" = set; then
2147 withval="$with_dec_threads"
2148 echo "$ac_t""$withval" 1>&6
2149LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002150if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002151 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002152fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002153else
2154 echo "$ac_t""no" 1>&6
2155fi
2156
2157
2158echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002159echo "configure:2160: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002160# Check whether --with-threads or --without-threads was given.
2161if test "${with_threads+set}" = set; then
2162 withval="$with_threads"
2163 echo "$ac_t""$withval" 1>&6
2164if test "${with_thread+set}" != set; then
2165 with_thread="$withval";
2166fi
2167else
2168 echo "$ac_t""no" 1>&6
2169fi
2170
2171
2172echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002173echo "configure:2174: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002175if test "${with_thread+set}" = set; then
2176 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002177
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002178echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002179if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002180then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002182cat >> confdefs.h <<\EOF
2183#define _REENTRANT 1
2184EOF
2185
Guido van Rossumf78abae1997-01-21 22:02:36 +00002186ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002187echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002188echo "configure:2189: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002189if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2190 echo $ac_n "(cached) $ac_c" 1>&6
2191else
2192 cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002193#line 2194 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002194#include "confdefs.h"
2195#include <mach/cthreads.h>
2196EOF
2197ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum201afe51997-05-14 21:14:44 +00002198{ (eval echo configure:2199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002199ac_err=`grep -v '^ *+' conftest.out`
2200if test -z "$ac_err"; then
2201 rm -rf conftest*
2202 eval "ac_cv_header_$ac_safe=yes"
2203else
2204 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002205 echo "configure: failed program was:" >&5
2206 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002207 rm -rf conftest*
2208 eval "ac_cv_header_$ac_safe=no"
2209fi
2210rm -f conftest*
2211fi
2212if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2213 echo "$ac_t""yes" 1>&6
2214 cat >> confdefs.h <<\EOF
2215#define WITH_THREAD 1
2216EOF
2217
2218cat >> confdefs.h <<\EOF
2219#define C_THREADS 1
2220EOF
2221
2222LIBOBJS="$LIBOBJS thread.o"
2223else
2224 echo "$ac_t""no" 1>&6
2225
Guido van Rossumf78abae1997-01-21 22:02:36 +00002226echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002227echo "configure:2228: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002228ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002229if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002230 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002231else
2232 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002233LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002234cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002235#line 2236 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002236#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002237/* Override any gcc2 internal prototype to avoid an error. */
2238/* We use char because int might match the return type of a gcc2
2239 builtin and then its argument prototype would still apply. */
2240char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002241
Guido van Rossumf78abae1997-01-21 22:02:36 +00002242int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243pthread_create()
2244; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002245EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002246if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002247 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002248 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002249else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002250 echo "configure: failed program was:" >&5
2251 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002253 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002254fi
2255rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002256LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002258fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002259if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002260 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002261 cat >> confdefs.h <<\EOF
2262#define WITH_THREAD 1
2263EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002264
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002265cat >> confdefs.h <<\EOF
2266#define _POSIX_THREADS 1
2267EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002268
2269LIBS="$LIBS -lpthreads"
2270LIBOBJS="$LIBOBJS thread.o"
2271else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002272 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002273
Guido van Rossumf78abae1997-01-21 22:02:36 +00002274echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum201afe51997-05-14 21:14:44 +00002275echo "configure:2276: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002276ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002277if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2278 echo $ac_n "(cached) $ac_c" 1>&6
2279else
2280 ac_save_LIBS="$LIBS"
2281LIBS="-lpthread $LIBS"
2282cat > conftest.$ac_ext <<EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002283#line 2284 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002284#include "confdefs.h"
2285/* Override any gcc2 internal prototype to avoid an error. */
2286/* We use char because int might match the return type of a gcc2
2287 builtin and then its argument prototype would still apply. */
2288char pthread_create();
2289
Guido van Rossumf78abae1997-01-21 22:02:36 +00002290int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002291pthread_create()
2292; return 0; }
2293EOF
Guido van Rossum201afe51997-05-14 21:14:44 +00002294if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002295 rm -rf conftest*
2296 eval "ac_cv_lib_$ac_lib_var=yes"
2297else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002298 echo "configure: failed program was:" >&5
2299 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002300 rm -rf conftest*
2301 eval "ac_cv_lib_$ac_lib_var=no"
2302fi
2303rm -f conftest*
2304LIBS="$ac_save_LIBS"
2305
2306fi
2307if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2308 echo "$ac_t""yes" 1>&6
2309 cat >> confdefs.h <<\EOF
2310#define WITH_THREAD 1
2311EOF
2312
2313cat >> confdefs.h <<\EOF
2314#define _POSIX_THREADS 1
2315EOF
2316
2317LIBS="$LIBS -lpthread"
2318LIBOBJS="$LIBOBJS thread.o"
2319else
2320 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002321
2322echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
2323echo "configure:2324: checking for __d6_pthread_create in -lthread" >&5
2324ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2325if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2326 echo $ac_n "(cached) $ac_c" 1>&6
2327else
2328 ac_save_LIBS="$LIBS"
2329LIBS="-lthread $LIBS"
2330cat > conftest.$ac_ext <<EOF
2331#line 2332 "configure"
2332#include "confdefs.h"
2333/* Override any gcc2 internal prototype to avoid an error. */
2334/* We use char because int might match the return type of a gcc2
2335 builtin and then its argument prototype would still apply. */
2336char __d6_pthread_create();
2337
2338int main() {
2339__d6_pthread_create()
2340; return 0; }
2341EOF
2342if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2343 rm -rf conftest*
2344 eval "ac_cv_lib_$ac_lib_var=yes"
2345else
2346 echo "configure: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2348 rm -rf conftest*
2349 eval "ac_cv_lib_$ac_lib_var=no"
2350fi
2351rm -f conftest*
2352LIBS="$ac_save_LIBS"
2353
2354fi
2355if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2356 echo "$ac_t""yes" 1>&6
2357 cat >> confdefs.h <<\EOF
2358#define WITH_THREAD 1
2359EOF
2360
2361cat >> confdefs.h <<\EOF
2362#define _POSIX_THREADS 1
2363EOF
2364
2365LIBS="$LIBS -lthread"
2366LIBOBJS="$LIBOBJS thread.o"
2367else
2368 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002369fi
2370
2371
Guido van Rossum627b2d71993-12-24 10:39:16 +00002372fi
2373
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002374fi
2375
Guido van Rossum0be3e491997-05-22 20:33:33 +00002376fi
2377
2378
Guido van Rossumf78abae1997-01-21 22:02:36 +00002379echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002380echo "configure:2381: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002381ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002382if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002383 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002384else
2385 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002386LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002387cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002388#line 2389 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002389#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002390/* Override any gcc2 internal prototype to avoid an error. */
2391/* We use char because int might match the return type of a gcc2
2392 builtin and then its argument prototype would still apply. */
2393char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002394
Guido van Rossumf78abae1997-01-21 22:02:36 +00002395int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002396usconfig()
2397; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002398EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002399if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002400 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002401 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002402else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002403 echo "configure: failed program was:" >&5
2404 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002405 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002406 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002407fi
2408rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002409LIBS="$ac_save_LIBS"
2410
2411fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002412if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002413 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002414 cat >> confdefs.h <<\EOF
2415#define WITH_THREAD 1
2416EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002417
Guido van Rossum7f43da71994-08-01 12:15:30 +00002418LIBS="$LIBS -lmpc"
2419LIBOBJS="$LIBOBJS thread.o"
2420else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002421 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002422fi
2423
Guido van Rossumf78abae1997-01-21 22:02:36 +00002424echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002425echo "configure:2426: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002426ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002427if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002428 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002429else
2430 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002431LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002432cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002433#line 2434 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002434#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002435/* Override any gcc2 internal prototype to avoid an error. */
2436/* We use char because int might match the return type of a gcc2
2437 builtin and then its argument prototype would still apply. */
2438char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002439
Guido van Rossumf78abae1997-01-21 22:02:36 +00002440int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002441thr_create()
2442; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002443EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002444if { (eval echo configure:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002445 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002446 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002448 echo "configure: failed program was:" >&5
2449 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002450 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002451 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002452fi
2453rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002454LIBS="$ac_save_LIBS"
2455
2456fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002457if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002458 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002459 cat >> confdefs.h <<\EOF
2460#define WITH_THREAD 1
2461EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002462
Guido van Rossum7f43da71994-08-01 12:15:30 +00002463LIBS="$LIBS -lthread"
2464LIBOBJS="$LIBOBJS thread.o"
2465else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002466 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002467fi
2468
Guido van Rossum7f43da71994-08-01 12:15:30 +00002469
Guido van Rossumda88dad1995-01-26 00:46:29 +00002470else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002471 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002472fi
2473
Guido van Rossum7f43da71994-08-01 12:15:30 +00002474
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002475# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002476
2477DLINCLDIR=/
2478
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002479echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002480echo "configure:2481: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002481# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002482if test "${with_sgi_dl+set}" = set; then
2483 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002485echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002486cat >> confdefs.h <<\EOF
2487#define WITH_SGI_DL 1
2488EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002489
2490dldir=$withval
2491if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002492then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002493else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002494fi
2495DLINCLDIR=${dldir}
2496LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002497else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002498 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002499fi
2500
2501
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002502echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002503echo "configure:2504: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505if test "${with_dl_dld+set}" = set; then
2506 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002507
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002508echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002509cat >> confdefs.h <<\EOF
2510#define WITH_DL_DLD 1
2511EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002512
2513dldir=`echo "$withval" | sed 's/,.*//'`
2514dlddir=`echo "$withval" | sed 's/.*,//'`
2515if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002516then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002517else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002518fi
2519DLINCLDIR=${dldir}
2520LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002521else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002522 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002523fi
2524
2525
Guido van Rossum627b2d71993-12-24 10:39:16 +00002526# checks for library functions
Guido van Rossum0be3e491997-05-22 20:33:33 +00002527for ac_func in chown clock dlopen execv flock fork ftime ftruncate \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002528 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
Guido van Rossum0be3e491997-05-22 20:33:33 +00002529 kill link lstat mkfifo nice plock putenv readlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002530 select setgid setuid setsid setpgid setpgrp setvbuf \
2531 sigaction siginterrupt sigrelse strftime symlink \
2532 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002533do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002534echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002535echo "configure:2536: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002536if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002538else
2539 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002540#line 2541 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002541#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002542/* System header to define __stub macros and hopefully few prototypes,
2543 which can conflict with char $ac_func(); below. */
2544#include <assert.h>
2545/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002546/* We use char because int might match the return type of a gcc2
2547 builtin and then its argument prototype would still apply. */
2548char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002549
Guido van Rossumf78abae1997-01-21 22:02:36 +00002550int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002551
Guido van Rossum627b2d71993-12-24 10:39:16 +00002552/* The GNU C library defines this for functions which it implements
2553 to always fail with ENOSYS. Some functions are actually named
2554 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002555#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002556choke me
2557#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002558$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002559#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002560
Guido van Rossum7f43da71994-08-01 12:15:30 +00002561; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002562EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002563if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002564 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002565 eval "ac_cv_func_$ac_func=yes"
2566else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002567 echo "configure: failed program was:" >&5
2568 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002569 rm -rf conftest*
2570 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002571fi
2572rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002573fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002574
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002575if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002576 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002577 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002578 cat >> confdefs.h <<EOF
2579#define $ac_tr_func 1
2580EOF
2581
2582else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002583 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002584fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002585done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002586
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002587for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002588do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002589echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002590echo "configure:2591: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002591if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 Rossum0be3e491997-05-22 20:33:33 +00002595#line 2596 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002596#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002597/* System header to define __stub macros and hopefully few prototypes,
2598 which can conflict with char $ac_func(); below. */
2599#include <assert.h>
2600/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002601/* We use char because int might match the return type of a gcc2
2602 builtin and then its argument prototype would still apply. */
2603char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002604
Guido van Rossumf78abae1997-01-21 22:02:36 +00002605int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606
Guido van Rossum627b2d71993-12-24 10:39:16 +00002607/* The GNU C library defines this for functions which it implements
2608 to always fail with ENOSYS. Some functions are actually named
2609 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002611choke me
2612#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002613$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002614#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615
Guido van Rossum7f43da71994-08-01 12:15:30 +00002616; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002617EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002618if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619 rm -rf conftest*
2620 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002621else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002622 echo "configure: failed program was:" >&5
2623 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002624 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002625 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002626fi
2627rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002631 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002632 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2633 cat >> confdefs.h <<EOF
2634#define $ac_tr_func 1
2635EOF
2636
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002637else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002638 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002639LIBOBJS="$LIBOBJS ${ac_func}.o"
2640fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002641done
2642
Guido van Rossumf78abae1997-01-21 22:02:36 +00002643
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002644echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002645echo "configure:2646: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002646if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2647 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648else
2649 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002650#line 2651 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002651#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002652/* System header to define __stub macros and hopefully few prototypes,
2653 which can conflict with char getpgrp(); below. */
2654#include <assert.h>
2655/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002656/* We use char because int might match the return type of a gcc2
2657 builtin and then its argument prototype would still apply. */
2658char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002659
Guido van Rossumf78abae1997-01-21 22:02:36 +00002660int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661
Guido van Rossum627b2d71993-12-24 10:39:16 +00002662/* The GNU C library defines this for functions which it implements
2663 to always fail with ENOSYS. Some functions are actually named
2664 something starting with __ and the normal name is an alias. */
2665#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2666choke me
2667#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002668getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002669#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002670
2671; return 0; }
2672EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002673if { (eval echo configure:2674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674 rm -rf conftest*
2675 eval "ac_cv_func_getpgrp=yes"
2676else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002677 echo "configure: failed program was:" >&5
2678 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679 rm -rf conftest*
2680 eval "ac_cv_func_getpgrp=no"
2681fi
2682rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002684
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002686 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002688#line 2689 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689#include "confdefs.h"
2690#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002691int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002694EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002695if { (eval echo configure:2696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002696 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697 cat >> confdefs.h <<\EOF
2698#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Guido van Rossumf78abae1997-01-21 22:02:36 +00002701else
2702 echo "configure: failed program was:" >&5
2703 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002704fi
2705rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002706else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002707 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002708fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002709
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002710echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002711echo "configure:2712: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002712if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002714else
2715 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002716#line 2717 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002717#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002718/* System header to define __stub macros and hopefully few prototypes,
2719 which can conflict with char setpgrp(); below. */
2720#include <assert.h>
2721/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002722/* We use char because int might match the return type of a gcc2
2723 builtin and then its argument prototype would still apply. */
2724char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002725
Guido van Rossumf78abae1997-01-21 22:02:36 +00002726int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002727
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002728/* The GNU C library defines this for functions which it implements
2729 to always fail with ENOSYS. Some functions are actually named
2730 something starting with __ and the normal name is an alias. */
2731#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2732choke me
2733#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002734setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002735#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002736
2737; return 0; }
2738EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002739if { (eval echo configure:2740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002740 rm -rf conftest*
2741 eval "ac_cv_func_setpgrp=yes"
2742else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002743 echo "configure: failed program was:" >&5
2744 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002745 rm -rf conftest*
2746 eval "ac_cv_func_setpgrp=no"
2747fi
2748rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002749fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002752 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002753 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002754#line 2755 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002755#include "confdefs.h"
2756#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002757int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002759; return 0; }
2760EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002761if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002762 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002763 cat >> confdefs.h <<\EOF
2764#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002765EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002766
Guido van Rossumf78abae1997-01-21 22:02:36 +00002767else
2768 echo "configure: failed program was:" >&5
2769 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002770fi
2771rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002773 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002774fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002776echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002777echo "configure:2778: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002778if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2779 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780else
2781 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002782#line 2783 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002783#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002784/* System header to define __stub macros and hopefully few prototypes,
2785 which can conflict with char gettimeofday(); below. */
2786#include <assert.h>
2787/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002788/* We use char because int might match the return type of a gcc2
2789 builtin and then its argument prototype would still apply. */
2790char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002791
Guido van Rossumf78abae1997-01-21 22:02:36 +00002792int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793
2794/* The GNU C library defines this for functions which it implements
2795 to always fail with ENOSYS. Some functions are actually named
2796 something starting with __ and the normal name is an alias. */
2797#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2798choke me
2799#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002800gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801#endif
2802
2803; return 0; }
2804EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002805if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806 rm -rf conftest*
2807 eval "ac_cv_func_gettimeofday=yes"
2808else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002809 echo "configure: failed program was:" >&5
2810 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002811 rm -rf conftest*
2812 eval "ac_cv_func_gettimeofday=no"
2813fi
2814rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002816
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002817if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002818 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002820#line 2821 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002821#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002822#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002823int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002824gettimeofday((struct timeval*)0,(struct timezone*)0);
2825; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002826EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002827if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002828 :
2829else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002830 echo "configure: failed program was:" >&5
2831 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002832 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002833 cat >> confdefs.h <<\EOF
2834#define GETTIMEOFDAY_NO_TZ 1
2835EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002836
2837fi
2838rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002839else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002840 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002841fi
2842
2843
2844# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002845echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002846echo "configure:2847: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002847if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002849else
2850 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002851#line 2852 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002852#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002853#include <sys/types.h>
2854#include <sys/time.h>
2855#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002856int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002857struct tm *tp;
2858; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002859EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002860if { (eval echo configure:2861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002861 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002863else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002864 echo "configure: failed program was:" >&5
2865 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002866 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002867 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002868fi
2869rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002870fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002871
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002872echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002873if test $ac_cv_header_time = yes; then
2874 cat >> confdefs.h <<\EOF
2875#define TIME_WITH_SYS_TIME 1
2876EOF
2877
2878fi
2879
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002880echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002881echo "configure:2882: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002882if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2883 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002884else
2885 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002886#line 2887 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002887#include "confdefs.h"
2888#include <sys/types.h>
2889#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002890int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002891struct tm *tp; tp->tm_sec;
2892; return 0; }
2893EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002894if { (eval echo configure:2895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002895 rm -rf conftest*
2896 ac_cv_struct_tm=time.h
2897else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002898 echo "configure: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002900 rm -rf conftest*
2901 ac_cv_struct_tm=sys/time.h
2902fi
2903rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002904fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002905
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002906echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002907if test $ac_cv_struct_tm = sys/time.h; then
2908 cat >> confdefs.h <<\EOF
2909#define TM_IN_SYS_TIME 1
2910EOF
2911
2912fi
2913
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002914echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002915echo "configure:2916: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002916if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2917 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918else
2919 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002920#line 2921 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002921#include "confdefs.h"
2922#include <sys/types.h>
2923#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002924int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002925struct tm tm; tm.tm_zone;
2926; return 0; }
2927EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002928if { (eval echo configure:2929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002929 rm -rf conftest*
2930 ac_cv_struct_tm_zone=yes
2931else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002932 echo "configure: failed program was:" >&5
2933 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002934 rm -rf conftest*
2935 ac_cv_struct_tm_zone=no
2936fi
2937rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002938fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002939
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002940echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002941if test "$ac_cv_struct_tm_zone" = yes; then
2942 cat >> confdefs.h <<\EOF
2943#define HAVE_TM_ZONE 1
2944EOF
2945
2946else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002947 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002948echo "configure:2949: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002949if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2950 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002951else
2952 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002953#line 2954 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002954#include "confdefs.h"
2955#include <time.h>
2956#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002957extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002958#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00002959int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002960atoi(*tzname);
2961; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002962EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002963if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002964 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002965 ac_cv_var_tzname=yes
2966else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002967 echo "configure: failed program was:" >&5
2968 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002969 rm -rf conftest*
2970 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002971fi
2972rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002973fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002974
2975echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002976 if test $ac_cv_var_tzname = yes; then
2977 cat >> confdefs.h <<\EOF
2978#define HAVE_TZNAME 1
2979EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002981 fi
2982fi
2983
2984
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002985echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002986echo "configure:2987: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002987if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2988 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002989else
2990 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002991#line 2992 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002992#include "confdefs.h"
2993#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002994int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002995return altzone;
2996; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002997EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00002998if { (eval echo configure:2999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002999 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003000 ac_cv_header_time_altzone=yes
3001else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003002 echo "configure: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003004 rm -rf conftest*
3005 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003006fi
3007rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003008fi
3009
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003010echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003011if test $ac_cv_header_time_altzone = yes; then
3012 cat >> confdefs.h <<\EOF
3013#define HAVE_ALTZONE 1
3014EOF
3015
3016fi
3017
Guido van Rossumda88dad1995-01-26 00:46:29 +00003018was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003019echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003020echo "configure:3021: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003021cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003022#line 3023 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003023#include "confdefs.h"
3024
3025#include <sys/types.h>
3026#include <sys/select.h>
3027#include <sys/time.h>
3028
Guido van Rossumf78abae1997-01-21 22:02:36 +00003029int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003030;
3031; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003032EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003033if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003034 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003035 cat >> confdefs.h <<\EOF
3036#define SYS_SELECT_WITH_SYS_TIME 1
3037EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003038 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003039else
3040 echo "configure: failed program was:" >&5
3041 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003042fi
3043rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003044echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003045
3046# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003047
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003048echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003049echo "configure:3050: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003050if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3051 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003052else
3053 if test "$GCC" = yes; then
3054 # GCC predefines this symbol on systems where it applies.
3055cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003056#line 3057 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003057#include "confdefs.h"
3058#ifdef __CHAR_UNSIGNED__
3059 yes
3060#endif
3061
3062EOF
3063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3064 egrep "yes" >/dev/null 2>&1; then
3065 rm -rf conftest*
3066 ac_cv_c_char_unsigned=yes
3067else
3068 rm -rf conftest*
3069 ac_cv_c_char_unsigned=no
3070fi
3071rm -f conftest*
3072
3073else
3074if test "$cross_compiling" = yes; then
3075 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3076else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003077 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003078#line 3079 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003079#include "confdefs.h"
3080/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003081#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003082#define volatile
3083#endif
3084main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003085 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003086}
3087EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003088if { (eval echo configure:3089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00003089then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003090 ac_cv_c_char_unsigned=yes
3091else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003092 echo "configure: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
3094 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003095 ac_cv_c_char_unsigned=no
3096fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003097rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003098fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003099
3100fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003101fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003102
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003103echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3105 cat >> confdefs.h <<\EOF
3106#define __CHAR_UNSIGNED__ 1
3107EOF
3108
3109fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003110
3111
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003112echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003113echo "configure:3114: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003114if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3115 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003116else
3117 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003118#line 3119 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003119#include "confdefs.h"
3120
Guido van Rossumf78abae1997-01-21 22:02:36 +00003121int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122
3123/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003124typedef int charset[2]; const charset x;
3125/* SunOS 4.1.1 cc rejects this. */
3126char const *const *ccp;
3127char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003128/* NEC SVR4.0.2 mips cc rejects this. */
3129struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003130static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003131/* AIX XL C 1.02.0.0 rejects this.
3132 It does not let you subtract one const X* pointer from another in an arm
3133 of an if-expression whose if-part is not a constant expression */
3134const char *g = "string";
3135ccp = &g + (g ? g-g : 0);
3136/* HPUX 7.0 cc rejects these. */
3137++ccp;
3138p = (char**) ccp;
3139ccp = (char const *const *) p;
3140{ /* SCO 3.2v4 cc rejects this. */
3141 char *t;
3142 char const *s = 0 ? (char *) 0 : (char const *) 0;
3143
3144 *t++ = 0;
3145}
3146{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003147 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003148 const int *foo = &x[0];
3149 ++foo;
3150}
3151{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3152 typedef const int *iptr;
3153 iptr p = 0;
3154 ++p;
3155}
3156{ /* AIX XL C 1.02.0.0 rejects this saying
3157 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3158 struct s { int j; const int *ap[3]; };
3159 struct s *b; b->j = 5;
3160}
3161{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3162 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003163}
3164
3165; return 0; }
3166EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003167if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003168 rm -rf conftest*
3169 ac_cv_c_const=yes
3170else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003171 echo "configure: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003173 rm -rf conftest*
3174 ac_cv_c_const=no
3175fi
3176rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003177fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003178
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003179echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003180if test $ac_cv_c_const = no; then
3181 cat >> confdefs.h <<\EOF
3182#define const
3183EOF
3184
3185fi
3186
3187
Guido van Rossumda88dad1995-01-26 00:46:29 +00003188works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003189echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003190echo "configure:3191: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003191cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003192#line 3193 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003193#include "confdefs.h"
3194
Guido van Rossumf78abae1997-01-21 22:02:36 +00003195int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003196volatile int x; x = 0;
3197; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003198EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003199if { (eval echo configure:3200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003200 rm -rf conftest*
3201 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003202else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003203 echo "configure: failed program was:" >&5
3204 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003205 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003206 cat >> confdefs.h <<\EOF
3207#define volatile
3208EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003209
3210fi
3211rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003212echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003213
Guido van Rossumda88dad1995-01-26 00:46:29 +00003214works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003215echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003216echo "configure:3217: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003217cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003218#line 3219 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003219#include "confdefs.h"
3220
Guido van Rossumf78abae1997-01-21 22:02:36 +00003221int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003222signed char c;
3223; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003224EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003225if { (eval echo configure:3226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003226 rm -rf conftest*
3227 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003228else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003229 echo "configure: failed program was:" >&5
3230 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003231 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003232 cat >> confdefs.h <<\EOF
3233#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003234EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003235
3236fi
3237rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003238echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003239
Guido van Rossumda88dad1995-01-26 00:46:29 +00003240have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003241echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003242echo "configure:3243: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003244#line 3245 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003245#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003246int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003247int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003248return foo(10);
3249; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003250EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003251if { (eval echo configure:3252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003252 rm -rf conftest*
3253 cat >> confdefs.h <<\EOF
3254#define HAVE_PROTOTYPES 1
3255EOF
3256 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003257else
3258 echo "configure: failed program was:" >&5
3259 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003260fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003262echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263
Guido van Rossumda88dad1995-01-26 00:46:29 +00003264works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003265echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003266echo "configure:3267: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003267cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003268#line 3269 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003269#include "confdefs.h"
3270
3271#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003272int foo(int x, ...) {
3273 va_list va;
3274 va_start(va, x);
3275 va_arg(va, int);
3276 va_arg(va, char *);
3277 va_arg(va, double);
3278 return 0;
3279}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003280
Guido van Rossumf78abae1997-01-21 22:02:36 +00003281int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003282return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003284EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003285if { (eval echo configure:3286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286 rm -rf conftest*
3287 cat >> confdefs.h <<\EOF
3288#define HAVE_STDARG_PROTOTYPES 1
3289EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003290 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003291else
3292 echo "configure: failed program was:" >&5
3293 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003294fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003296echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003297
Guido van Rossumda88dad1995-01-26 00:46:29 +00003298if test "$have_prototypes" = yes; then
3299bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003300echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003301echo "configure:3302: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003302cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003303#line 3304 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003304#include "confdefs.h"
3305#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003306int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003307char **t;execve("@",t,t);
3308; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003309EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003310if { (eval echo configure:3311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003311 :
3312else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003313 echo "configure: failed program was:" >&5
3314 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003315 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316 cat >> confdefs.h <<\EOF
3317#define BAD_EXEC_PROTOTYPES 1
3318EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003319 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003320fi
3321rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003322echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003323fi
3324
Guido van Rossumda88dad1995-01-26 00:46:29 +00003325bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003326echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003327echo "configure:3328: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328if test "$cross_compiling" = yes; then
3329 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3330else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003331 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003332#line 3333 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003333#include "confdefs.h"
3334
3335struct s { int a; int b; };
3336static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003337int foobar() {
3338 static int random;
3339 random = (int) &foo;
3340 return random;
3341}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003342static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003343main() {
3344 exit(!((int)&foo == foobar()));
3345}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003346
3347EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003348if { (eval echo configure:3349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00003349then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003350 :
3351else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003352 echo "configure: failed program was:" >&5
3353 cat conftest.$ac_ext >&5
3354 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003355 cat >> confdefs.h <<\EOF
3356#define BAD_STATIC_FORWARD 1
3357EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003358 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003359fi
3360rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003361fi
3362
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003363echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003364
Guido van Rossumda88dad1995-01-26 00:46:29 +00003365va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003366echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003367echo "configure:3368: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003368cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003369#line 3370 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003370#include "confdefs.h"
3371
3372#ifdef HAVE_STDARG_PROTOTYPES
3373#include <stdarg.h>
3374#else
3375#include <varargs.h>
3376#endif
3377
Guido van Rossumf78abae1997-01-21 22:02:36 +00003378int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003379va_list list1, list2; list1 = list2;
3380; return 0; }
3381EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003382if { (eval echo configure:3383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003383 :
3384else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003385 echo "configure: failed program was:" >&5
3386 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003387 rm -rf conftest*
3388 cat >> confdefs.h <<\EOF
3389#define VA_LIST_IS_ARRAY 1
3390EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003391 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003392fi
3393rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003394echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003395
Guido van Rossum627b2d71993-12-24 10:39:16 +00003396# checks for system services
3397# (none yet)
3398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003399# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003400echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003401echo "configure:3402: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003402ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003403if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003404 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003405else
3406 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003407LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003408cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003409#line 3410 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003410#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411/* Override any gcc2 internal prototype to avoid an error. */
3412/* We use char because int might match the return type of a gcc2
3413 builtin and then its argument prototype would still apply. */
3414char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003415
Guido van Rossumf78abae1997-01-21 22:02:36 +00003416int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417__fpu_control()
3418; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003419EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003420if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003421 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003422 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003423else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003424 echo "configure: failed program was:" >&5
3425 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003426 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003427 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003428fi
3429rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003430LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003432fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003433if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003434 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003435 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3436 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003437 cat >> confdefs.h <<EOF
3438#define $ac_tr_lib 1
3439EOF
3440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003441 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003442
3443else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003444 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003445fi
3446
3447
Guido van Rossum7f253911997-05-09 02:42:48 +00003448# Check for --with-fpectl
3449
3450echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003451echo "configure:3452: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00003452# Check whether --with-fpectl or --without-fpectl was given.
3453if test "${with_fpectl+set}" = set; then
3454 withval="$with_fpectl"
3455
3456if test "$withval" != no
3457then cat >> confdefs.h <<\EOF
3458#define WANT_SIGFPE_HANDLER 1
3459EOF
3460 echo "$ac_t""yes" 1>&6
3461else echo "$ac_t""no" 1>&6
3462fi
3463fi
3464
3465
Guido van Rossum7f43da71994-08-01 12:15:30 +00003466# check for --with-libm=...
3467
Guido van Rossum563e7081996-09-10 18:20:48 +00003468case $ac_sys_system in
3469next) ;;
3470*) LIBM=-lm
3471esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003472echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003473echo "configure:3474: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003474# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003475if test "${with_libm+set}" = set; then
3476 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003477
Guido van Rossum7f253911997-05-09 02:42:48 +00003478if test "$withval" = no
3479then LIBM=
3480 echo "$ac_t""force LIBM empty" 1>&6
3481elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003482then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003483 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003484else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003485fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003486else
3487 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003488fi
3489
3490
3491# check for --with-libc=...
3492
Guido van Rossum7f253911997-05-09 02:42:48 +00003493echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003494echo "configure:3495: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003495# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003496if test "${with_libc+set}" = set; then
3497 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003498
Guido van Rossum7f253911997-05-09 02:42:48 +00003499if test "$withval" = no
3500then LIBC=
3501 echo "$ac_t""force LIBC empty" 1>&6
3502elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003503then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003504 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003505else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003506fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003507else
3508 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003509fi
3510
3511
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003512# check for hypot() in math library
3513LIBS_SAVE=$LIBS
3514LIBS="$LIBS $LIBM"
3515for ac_func in hypot
3516do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003517echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003518echo "configure:3519: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003519if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3520 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003521else
3522 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003523#line 3524 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003524#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003525/* System header to define __stub macros and hopefully few prototypes,
3526 which can conflict with char $ac_func(); below. */
3527#include <assert.h>
3528/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003529/* We use char because int might match the return type of a gcc2
3530 builtin and then its argument prototype would still apply. */
3531char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003532
Guido van Rossumf78abae1997-01-21 22:02:36 +00003533int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003534
3535/* The GNU C library defines this for functions which it implements
3536 to always fail with ENOSYS. Some functions are actually named
3537 something starting with __ and the normal name is an alias. */
3538#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3539choke me
3540#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003541$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003542#endif
3543
3544; return 0; }
3545EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003546if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003547 rm -rf conftest*
3548 eval "ac_cv_func_$ac_func=yes"
3549else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003550 echo "configure: failed program was:" >&5
3551 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003552 rm -rf conftest*
3553 eval "ac_cv_func_$ac_func=no"
3554fi
3555rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003556fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003557
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003558if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003559 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003560 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003561 cat >> confdefs.h <<EOF
3562#define $ac_tr_func 1
3563EOF
3564
3565else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003566 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003567fi
3568done
3569
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003570for ac_func in hypot
3571do
3572echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003573echo "configure:3574: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003574if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3575 echo $ac_n "(cached) $ac_c" 1>&6
3576else
3577 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003578#line 3579 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003579#include "confdefs.h"
3580/* System header to define __stub macros and hopefully few prototypes,
3581 which can conflict with char $ac_func(); below. */
3582#include <assert.h>
3583/* Override any gcc2 internal prototype to avoid an error. */
3584/* We use char because int might match the return type of a gcc2
3585 builtin and then its argument prototype would still apply. */
3586char $ac_func();
3587
Guido van Rossumf78abae1997-01-21 22:02:36 +00003588int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003589
3590/* The GNU C library defines this for functions which it implements
3591 to always fail with ENOSYS. Some functions are actually named
3592 something starting with __ and the normal name is an alias. */
3593#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3594choke me
3595#else
3596$ac_func();
3597#endif
3598
3599; return 0; }
3600EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003601if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003602 rm -rf conftest*
3603 eval "ac_cv_func_$ac_func=yes"
3604else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003605 echo "configure: failed program was:" >&5
3606 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003607 rm -rf conftest*
3608 eval "ac_cv_func_$ac_func=no"
3609fi
3610rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003611fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003612
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003613if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3614 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003615 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3616 cat >> confdefs.h <<EOF
3617#define $ac_tr_func 1
3618EOF
3619
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003620else
3621 echo "$ac_t""no" 1>&6
3622LIBOBJS="$LIBOBJS ${ac_func}.o"
3623fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003624done
3625
Guido van Rossumf78abae1997-01-21 22:02:36 +00003626
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003627LIBS=$LIBS_SAVE
3628
Guido van Rossumda88dad1995-01-26 00:46:29 +00003629# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003630echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003631echo "configure:3632: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003632if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3633 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003634else
3635 if test "$cross_compiling" = yes; then
3636 ac_cv_func_getopt=no
3637else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003638 cat > conftest.$ac_ext <<EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003639#line 3640 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003640#include "confdefs.h"
3641#include <stdio.h>
3642extern int optind, opterr, getopt();
3643extern char* optarg;
3644int main() {
3645 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3646 opterr = 0;
3647 if (getopt(3, av, "f:") == 'f') { exit(1); }
3648 exit(0);
3649}
3650EOF
Guido van Rossum0be3e491997-05-22 20:33:33 +00003651if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00003652then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003653 ac_cv_func_getopt=yes
3654else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003655 echo "configure: failed program was:" >&5
3656 cat conftest.$ac_ext >&5
3657 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00003658 ac_cv_func_getopt=no
3659fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003660rm -fr conftest*
3661fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003662
3663fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003664echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003665test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3666
Guido van Rossum627b2d71993-12-24 10:39:16 +00003667# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003668trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003669cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003670# This file is a shell script that caches the results of configure
3671# tests run on this system so they can be shared between configure
3672# scripts and configure runs. It is not useful on other systems.
3673# If it contains results you don't want to keep, you may remove or edit it.
3674#
3675# By default, configure uses ./config.cache as the cache file,
3676# creating it if it does not exist already. You can give configure
3677# the --cache-file=FILE option to use a different cache file; that is
3678# what configure does when it calls configure scripts in
3679# subdirectories, so they share the cache.
3680# Giving --cache-file=/dev/null disables caching, for debugging configure.
3681# config.status only pays attention to the cache file if you give it the
3682# --recheck option to rerun configure.
3683#
3684EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003685# The following way of writing the cache mishandles newlines in values,
3686# but we know of no workaround that is simple, portable, and efficient.
3687# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003688# Ultrix sh set writes to stderr and can't be redirected directly,
3689# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003690(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00003691 case `(ac_space=' '; set) 2>&1` in
3692 *ac_space=\ *)
3693 # `set' does not quote correctly, so add quotes (double-quote substitution
3694 # turns \\\\ into \\, and sed turns \\ into \).
3695 sed -n \
3696 -e "s/'/'\\\\''/g" \
3697 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3698 ;;
3699 *)
3700 # `set' quotes correctly as required by POSIX, so do not add quotes.
3701 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3702 ;;
3703 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003704if cmp -s $cache_file confcache; then
3705 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003706else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003707 if test -w $cache_file; then
3708 echo "updating cache $cache_file"
3709 cat confcache > $cache_file
3710 else
3711 echo "not updating unwritable cache $cache_file"
3712 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003713fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003714rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003715
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003716trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003717
3718test "x$prefix" = xNONE && prefix=$ac_default_prefix
3719# Let make expand exec_prefix.
3720test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003721
Guido van Rossum7f43da71994-08-01 12:15:30 +00003722# Any assignment to VPATH causes Sun make to only execute
3723# the first set of double-colon rules, so remove it if not needed.
3724# If there is a colon in the path, we need to keep it.
3725if test "x$srcdir" = x.; then
3726 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3727fi
3728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003729trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003730
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003731DEFS=-DHAVE_CONFIG_H
3732
3733# Without the "./", some shells look in PATH for config.status.
3734: ${CONFIG_STATUS=./config.status}
3735
3736echo creating $CONFIG_STATUS
3737rm -f $CONFIG_STATUS
3738cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003739#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003740# Generated automatically by configure.
3741# Run this file to recreate the current configuration.
3742# This directory was configured as follows,
3743# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3744#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745# $0 $ac_configure_args
3746#
3747# Compiler output produced by configure, useful for debugging
3748# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003750ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003751for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003752do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003753 case "\$ac_option" in
3754 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3756 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003757 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003758 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003759 exit 0 ;;
3760 -help | --help | --hel | --he | --h)
3761 echo "\$ac_cs_usage"; exit 0 ;;
3762 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003763 esac
3764done
3765
Guido van Rossum7f43da71994-08-01 12:15:30 +00003766ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003767
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003768trap 'rm -fr `echo "Makefile \
3769 Objects/Makefile \
3770 Parser/Makefile \
3771 Python/Makefile \
3772 Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773EOF
3774cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003775
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776# Protect against being on the right side of a sed subst in config.status.
3777sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3778 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003779$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003780$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003781s%@CFLAGS@%$CFLAGS%g
3782s%@CPPFLAGS@%$CPPFLAGS%g
3783s%@CXXFLAGS@%$CXXFLAGS%g
3784s%@DEFS@%$DEFS%g
3785s%@LDFLAGS@%$LDFLAGS%g
3786s%@LIBS@%$LIBS%g
3787s%@exec_prefix@%$exec_prefix%g
3788s%@prefix@%$prefix%g
3789s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790s%@bindir@%$bindir%g
3791s%@sbindir@%$sbindir%g
3792s%@libexecdir@%$libexecdir%g
3793s%@datadir@%$datadir%g
3794s%@sysconfdir@%$sysconfdir%g
3795s%@sharedstatedir@%$sharedstatedir%g
3796s%@localstatedir@%$localstatedir%g
3797s%@libdir@%$libdir%g
3798s%@includedir@%$includedir%g
3799s%@oldincludedir@%$oldincludedir%g
3800s%@infodir@%$infodir%g
3801s%@mandir@%$mandir%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003802s%@MACHDEP@%$MACHDEP%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003803s%@CC@%$CC%g
3804s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003805s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003806s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003807s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3808s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003809s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003810s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003811s%@SO@%$SO%g
3812s%@LDSHARED@%$LDSHARED%g
3813s%@CCSHARED@%$CCSHARED%g
3814s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00003815s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003816s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003817s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f253911997-05-09 02:42:48 +00003818s%@WANT_SIGFPE_HANDLER@%$WANT_SIGFPE_HANDLER%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003819s%@LIBM@%$LIBM%g
3820s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003821
3822CEOF
3823EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824
3825cat >> $CONFIG_STATUS <<\EOF
3826
3827# Split the substitutions into bite-sized pieces for seds with
3828# small command number limits, like on Digital OSF/1 and HP-UX.
3829ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3830ac_file=1 # Number of current file.
3831ac_beg=1 # First line for current file.
3832ac_end=$ac_max_sed_cmds # Line after last line for current file.
3833ac_more_lines=:
3834ac_sed_cmds=""
3835while $ac_more_lines; do
3836 if test $ac_beg -gt 1; then
3837 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3838 else
3839 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3840 fi
3841 if test ! -s conftest.s$ac_file; then
3842 ac_more_lines=false
3843 rm -f conftest.s$ac_file
3844 else
3845 if test -z "$ac_sed_cmds"; then
3846 ac_sed_cmds="sed -f conftest.s$ac_file"
3847 else
3848 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3849 fi
3850 ac_file=`expr $ac_file + 1`
3851 ac_beg=$ac_end
3852 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3853 fi
3854done
3855if test -z "$ac_sed_cmds"; then
3856 ac_sed_cmds=cat
3857fi
3858EOF
3859
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003860cat >> $CONFIG_STATUS <<EOF
3861
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003862CONFIG_FILES=\${CONFIG_FILES-"Makefile \
3863 Objects/Makefile \
3864 Parser/Makefile \
3865 Python/Makefile \
3866 Modules/Makefile.pre"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867EOF
3868cat >> $CONFIG_STATUS <<\EOF
3869for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003870 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003871 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003872 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3874 *) ac_file_in="${ac_file}.in" ;;
3875 esac
3876
Guido van Rossumf78abae1997-01-21 22:02:36 +00003877 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003878
3879 # Remove last slash and all that follows it. Not all systems have dirname.
3880 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3881 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3882 # The file is in a subdirectory.
3883 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003884 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885 # A "../" for each directory in $ac_dir_suffix.
3886 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3887 else
3888 ac_dir_suffix= ac_dots=
3889 fi
3890
3891 case "$ac_given_srcdir" in
3892 .) srcdir=.
3893 if test -z "$ac_dots"; then top_srcdir=.
3894 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3895 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3896 *) # Relative path.
3897 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3898 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3899 esac
3900
Guido van Rossumf78abae1997-01-21 22:02:36 +00003901
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003902 echo creating "$ac_file"
3903 rm -f "$ac_file"
3904 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3905 case "$ac_file" in
3906 *Makefile*) ac_comsub="1i\\
3907# $configure_input" ;;
3908 *) ac_comsub= ;;
3909 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00003910
3911 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912 sed -e "$ac_comsub
3913s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003914s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003915s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00003916" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00003917fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00003918rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3921# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00003922#
3923# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003924ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3925ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003926ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003927ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003928# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003929ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3930ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003931ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003932ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003933# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3935ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003936ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003937ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003938
Guido van Rossumf78abae1997-01-21 22:02:36 +00003939if test "${CONFIG_HEADERS+set}" != set; then
3940EOF
3941cat >> $CONFIG_STATUS <<EOF
3942 CONFIG_HEADERS="config.h"
3943EOF
3944cat >> $CONFIG_STATUS <<\EOF
3945fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003946for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003947 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003948 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003949 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003950 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3951 *) ac_file_in="${ac_file}.in" ;;
3952 esac
3953
Guido van Rossum7f43da71994-08-01 12:15:30 +00003954 echo creating $ac_file
3955
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003956 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00003957 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3958 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003959
3960EOF
3961
3962# Transform confdefs.h into a sed script conftest.vals that substitutes
3963# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003964# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965# Protect against being in an unquoted here document in config.status.
3966rm -f conftest.vals
3967cat > conftest.hdr <<\EOF
3968s/[\\&%]/\\&/g
3969s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003970s%#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 +00003971s%ac_d%ac_u%gp
3972s%ac_u%ac_e%gp
3973EOF
3974sed -n -f conftest.hdr confdefs.h > conftest.vals
3975rm -f conftest.hdr
3976
3977# This sed command replaces #undef with comments. This is necessary, for
3978# example, in the case of _POSIX_SOURCE, which is predefined and required
3979# on some systems where configure will not decide to define it.
3980cat >> conftest.vals <<\EOF
3981s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3982EOF
3983
3984# Break up conftest.vals because some shells have a limit on
3985# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003986
3987rm -f conftest.tail
3988while :
3989do
3990 ac_lines=`grep -c . conftest.vals`
3991 # grep -c gives empty output for an empty file on some AIX systems.
3992 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3993 # Write a limited-size here document to conftest.frag.
3994 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3995 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3996 echo 'CEOF
3997 sed -f conftest.frag conftest.in > conftest.out
3998 rm -f conftest.in
3999 mv conftest.out conftest.in
4000' >> $CONFIG_STATUS
4001 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4002 rm -f conftest.vals
4003 mv conftest.tail conftest.vals
4004done
4005rm -f conftest.vals
4006
4007cat >> $CONFIG_STATUS <<\EOF
4008 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00004009 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010 cat conftest.in >> conftest.h
4011 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00004012 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004013 echo "$ac_file is unchanged"
4014 rm -f conftest.h
4015 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004016 # Remove last slash and all that follows it. Not all systems have dirname.
4017 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4018 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4019 # The file is in a subdirectory.
4020 test ! -d "$ac_dir" && mkdir "$ac_dir"
4021 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004022 rm -f $ac_file
4023 mv conftest.h $ac_file
4024 fi
4025fi; done
4026
Guido van Rossumf78abae1997-01-21 22:02:36 +00004027EOF
4028cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004029
Guido van Rossumf78abae1997-01-21 22:02:36 +00004030EOF
4031cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004032
4033exit 0
4034EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035chmod +x $CONFIG_STATUS
4036rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004037test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004038