blob: d3fa0677cf0faf2f76e31bfcd27d5ef4062af196 [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 Rossume4766f61997-05-13 21:04:26 +00003# From configure.in Revision: 1.49
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 Rossum84e7b241996-08-19 21:59:00 +00001035# check for ANSI or K&R ("traditional") preprocessor
1036echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001037echo "configure:1038: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001038cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001039#line 1040 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001040#include "confdefs.h"
1041
1042#define spam(name, doc) {#name, &name, #name "() -- " doc}
1043int foo;
1044struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1045
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001047;
1048; return 0; }
1049EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001050if { (eval echo configure:1051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001051 rm -rf conftest*
1052 cpp_type=ansi
1053else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001054 echo "configure: failed program was:" >&5
1055 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001056 rm -rf conftest*
1057 cat >> confdefs.h <<\EOF
1058#define HAVE_OLD_CPP 1
1059EOF
1060 cpp_type=traditional
1061fi
1062rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001063echo "$ac_t""$cpp_type" 1>&6
1064
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001065# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001066echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001067echo "configure:1068: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001068if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1069 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070else
1071 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001072#line 1073 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001073#include "confdefs.h"
1074#include <stdlib.h>
1075#include <stdarg.h>
1076#include <string.h>
1077#include <float.h>
1078EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum7f253911997-05-09 02:42:48 +00001080{ (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001083 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 ac_cv_header_stdc=yes
1085else
1086 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001087 echo "configure: failed program was:" >&5
1088 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001089 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 ac_cv_header_stdc=no
1091fi
1092rm -f conftest*
1093
1094if test $ac_cv_header_stdc = yes; then
1095 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1096cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001097#line 1098 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001098#include "confdefs.h"
1099#include <string.h>
1100EOF
1101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1102 egrep "memchr" >/dev/null 2>&1; then
1103 :
1104else
1105 rm -rf conftest*
1106 ac_cv_header_stdc=no
1107fi
1108rm -f conftest*
1109
1110fi
1111
1112if test $ac_cv_header_stdc = yes; then
1113 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1114cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001115#line 1116 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116#include "confdefs.h"
1117#include <stdlib.h>
1118EOF
1119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1120 egrep "free" >/dev/null 2>&1; then
1121 :
1122else
1123 rm -rf conftest*
1124 ac_cv_header_stdc=no
1125fi
1126rm -f conftest*
1127
1128fi
1129
1130if test $ac_cv_header_stdc = yes; then
1131 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1132if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001135 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001136#line 1137 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001137#include "confdefs.h"
1138#include <ctype.h>
1139#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1140#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001142int main () { int i; for (i = 0; i < 256; i++)
1143if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1144exit (0); }
1145
1146EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001147if { (eval echo configure:1148: \"$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 +00001148then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 :
1150else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001151 echo "configure: failed program was:" >&5
1152 cat conftest.$ac_ext >&5
1153 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001154 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001155fi
1156rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001158
1159fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001162echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163if test $ac_cv_header_stdc = yes; then
1164 cat >> confdefs.h <<\EOF
1165#define STDC_HEADERS 1
1166EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001167
1168fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001169
Guido van Rossum07397971997-04-29 21:49:50 +00001170for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001171signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001172sys/audioio.h sys/file.h sys/lock.h \
1173sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001174sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001175do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001176ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001177echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001178echo "configure:1179: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001179if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1180 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181else
1182 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001183#line 1184 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001186EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum7f253911997-05-09 02:42:48 +00001188{ (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001191 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192 eval "ac_cv_header_$ac_safe=yes"
1193else
1194 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001195 echo "configure: failed program was:" >&5
1196 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 rm -rf conftest*
1198 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199fi
1200rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201fi
1202if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001203 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001204 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205 cat >> confdefs.h <<EOF
1206#define $ac_tr_hdr 1
1207EOF
1208
1209else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001210 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212done
1213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214ac_header_dirent=no
1215for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1216do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001217ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001218echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001219echo "configure:1220: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001220if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1221 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001222else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001224#line 1225 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225#include "confdefs.h"
1226#include <sys/types.h>
1227#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001228int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229DIR *dirp = 0;
1230; return 0; }
1231EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001232if { (eval echo configure:1233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233 rm -rf conftest*
1234 eval "ac_cv_header_dirent_$ac_safe=yes"
1235else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001236 echo "configure: failed program was:" >&5
1237 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 rm -rf conftest*
1239 eval "ac_cv_header_dirent_$ac_safe=no"
1240fi
1241rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001244 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001245 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246 cat >> confdefs.h <<EOF
1247#define $ac_tr_hdr 1
1248EOF
1249 ac_header_dirent=$ac_hdr; break
1250else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001251 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001252fi
1253done
1254# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1255if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001256echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001257echo "configure:1258: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001258ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001260 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001261else
1262 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001263LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001264cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001265#line 1266 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001266#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001267/* Override any gcc2 internal prototype to avoid an error. */
1268/* We use char because int might match the return type of a gcc2
1269 builtin and then its argument prototype would still apply. */
1270char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271
Guido van Rossumf78abae1997-01-21 22:02:36 +00001272int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273opendir()
1274; return 0; }
1275EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001276if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001277 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001278 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001280 echo "configure: failed program was:" >&5
1281 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001282 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001283 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284fi
1285rm -f conftest*
1286LIBS="$ac_save_LIBS"
1287
1288fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001289if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001290 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291 LIBS="$LIBS -ldir"
1292else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001293 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294fi
1295
1296else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001297echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001298echo "configure:1299: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001299ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001300if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001301 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302else
1303 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001304LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001306#line 1307 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001308/* Override any gcc2 internal prototype to avoid an error. */
1309/* We use char because int might match the return type of a gcc2
1310 builtin and then its argument prototype would still apply. */
1311char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Guido van Rossumf78abae1997-01-21 22:02:36 +00001313int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001314opendir()
1315; return 0; }
1316EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001317if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001319 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001321 echo "configure: failed program was:" >&5
1322 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001324 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325fi
1326rm -f conftest*
1327LIBS="$ac_save_LIBS"
1328
1329fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001330if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001331 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332 LIBS="$LIBS -lx"
1333else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001334 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001335fi
1336
1337fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338
1339
1340# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001341was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001342echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001343echo "configure:1344: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001345#line 1346 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346#include "confdefs.h"
1347#include <time.h>
1348EOF
1349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1350 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001351 rm -rf conftest*
1352 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353else
1354 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355 cat >> confdefs.h <<\EOF
1356#define clock_t long
1357EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358
1359fi
1360rm -f conftest*
1361
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001362echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001363
Guido van Rossum84e7b241996-08-19 21:59:00 +00001364# Add some code to confdefs.h so that the test for off_t works on SCO
1365cat >> confdefs.h <<\EOF
1366#if defined(SCO_DS)
1367#undef _OFF_T
1368#endif
1369EOF
1370
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001371echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001372echo "configure:1373: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001373if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1374 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001377#line 1378 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378#include "confdefs.h"
1379#include <sys/types.h>
1380#if STDC_HEADERS
1381#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001382#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383#endif
1384EOF
1385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001386 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001387 rm -rf conftest*
1388 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001389else
1390 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001392fi
1393rm -f conftest*
1394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001396echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001397if test $ac_cv_type_mode_t = no; then
1398 cat >> confdefs.h <<\EOF
1399#define mode_t int
1400EOF
1401
1402fi
1403
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001404echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001405echo "configure:1406: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001406if eval "test \"`echo '$''{'ac_cv_type_off_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 Rossum7f253911997-05-09 02:42:48 +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 "off_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_off_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_off_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_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001430if test $ac_cv_type_off_t = no; then
1431 cat >> confdefs.h <<\EOF
1432#define off_t long
1433EOF
1434
1435fi
1436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001437echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001438echo "configure:1439: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001439if eval "test \"`echo '$''{'ac_cv_type_pid_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 Rossum7f253911997-05-09 02:42:48 +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 "pid_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_pid_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_pid_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_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463if test $ac_cv_type_pid_t = no; then
1464 cat >> confdefs.h <<\EOF
1465#define pid_t int
1466EOF
1467
1468fi
1469
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001471echo "configure:1472: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001472if eval "test \"`echo '$''{'ac_cv_type_signal'+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 Rossum7f253911997-05-09 02:42:48 +00001476#line 1477 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001477#include "confdefs.h"
1478#include <sys/types.h>
1479#include <signal.h>
1480#ifdef signal
1481#undef signal
1482#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001483#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001484extern "C" void (*signal (int, void (*)(int)))(int);
1485#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001486void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001487#endif
1488
Guido van Rossumf78abae1997-01-21 22:02:36 +00001489int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001490int i;
1491; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001492EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001493if { (eval echo configure:1494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001494 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001495 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001496else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001497 echo "configure: failed program was:" >&5
1498 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001499 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001500 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001501fi
1502rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001503fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001504
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001505echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001506cat >> confdefs.h <<EOF
1507#define RETSIGTYPE $ac_cv_type_signal
1508EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001509
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001510
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001511echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001512echo "configure:1513: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001513if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001515else
1516 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001517#line 1518 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001518#include "confdefs.h"
1519#include <sys/types.h>
1520#if STDC_HEADERS
1521#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001522#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001523#endif
1524EOF
1525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001526 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001527 rm -rf conftest*
1528 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001529else
1530 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532fi
1533rm -f conftest*
1534
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001535fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001536echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001537if test $ac_cv_type_size_t = no; then
1538 cat >> confdefs.h <<\EOF
1539#define size_t unsigned
1540EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001541
1542fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001544echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001545echo "configure:1546: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001546if eval "test \"`echo '$''{'ac_cv_type_uid_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 Rossum7f253911997-05-09 02:42:48 +00001550#line 1551 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001551#include "confdefs.h"
1552#include <sys/types.h>
1553EOF
1554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1555 egrep "uid_t" >/dev/null 2>&1; then
1556 rm -rf conftest*
1557 ac_cv_type_uid_t=yes
1558else
1559 rm -rf conftest*
1560 ac_cv_type_uid_t=no
1561fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562rm -f conftest*
1563
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001565
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001566echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001567if test $ac_cv_type_uid_t = no; then
1568 cat >> confdefs.h <<\EOF
1569#define uid_t int
1570EOF
1571
1572 cat >> confdefs.h <<\EOF
1573#define gid_t int
1574EOF
1575
1576fi
1577
Guido van Rossum627b2d71993-12-24 10:39:16 +00001578
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001579echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001580echo "configure:1581: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001581if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 if test "$cross_compiling" = yes; then
1585 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1586else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001587 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001588#line 1589 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001589#include "confdefs.h"
1590#include <stdio.h>
1591main()
1592{
1593 FILE *f=fopen("conftestval", "w");
1594 if (!f) exit(1);
1595 fprintf(f, "%d\n", sizeof(int));
1596 exit(0);
1597}
1598EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001599if { (eval echo configure:1600: \"$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 +00001600then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001601 ac_cv_sizeof_int=`cat conftestval`
1602else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001603 echo "configure: failed program was:" >&5
1604 cat conftest.$ac_ext >&5
1605 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001606 ac_cv_sizeof_int=0
1607fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001608rm -fr conftest*
1609fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001610
1611fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001612echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1613cat >> confdefs.h <<EOF
1614#define SIZEOF_INT $ac_cv_sizeof_int
1615EOF
1616
1617
1618echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001619echo "configure:1620: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001620if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1621 echo $ac_n "(cached) $ac_c" 1>&6
1622else
1623 if test "$cross_compiling" = yes; then
1624 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1625else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001626 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001627#line 1628 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001628#include "confdefs.h"
1629#include <stdio.h>
1630main()
1631{
1632 FILE *f=fopen("conftestval", "w");
1633 if (!f) exit(1);
1634 fprintf(f, "%d\n", sizeof(long));
1635 exit(0);
1636}
1637EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001638if { (eval echo configure:1639: \"$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 +00001639then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001640 ac_cv_sizeof_long=`cat conftestval`
1641else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001642 echo "configure: failed program was:" >&5
1643 cat conftest.$ac_ext >&5
1644 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001645 ac_cv_sizeof_long=0
1646fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001647rm -fr conftest*
1648fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001649
1650fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001651echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1652cat >> confdefs.h <<EOF
1653#define SIZEOF_LONG $ac_cv_sizeof_long
1654EOF
1655
1656
Guido van Rossum0a516c91994-09-12 10:58:40 +00001657
1658# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001659
1660
1661
1662
Guido van Rossum0a516c91994-09-12 10:58:40 +00001663# SO is the extension of shared libraries `(including the dot!)
1664# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001665echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001666echo "configure:1667: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001667if test -z "$SO"
1668then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001669 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001670 hp*|HP*) SO=.sl;;
1671 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001672 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001673fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001674echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001675# LDSHARED is the ld *command* used to create shared library
1676# -- "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 +00001677echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001678echo "configure:1679: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001679if test -z "$LDSHARED"
1680then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681 case $ac_sys_system/$ac_sys_release in
Guido van Rossum84e7b241996-08-19 21:59:00 +00001682 AIX*) LDSHARED="ld_so_aix \$(CC)";;
Guido van Rossum07397971997-04-29 21:49:50 +00001683 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum37e97bc1997-04-29 22:15:33 +00001684 IRIX/6*) LDSHARED="ld $SGI_ABI -shared -all"; OPT="$OPT $SGI_ABI";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001685 SunOS/4*) LDSHARED="ld";;
1686 SunOS/5*) LDSHARED="ld -G";;
1687 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001688 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1689 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001690 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001691 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001692 FreeBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001693 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001694 *) LDSHARED="ld";;
1695 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001696fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001697echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001698# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001699# library -- this is only needed for a few systems
1700echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001701echo "configure:1702: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001702if test -z "$CCSHARED"
1703then
Guido van Rossum07397971997-04-29 21:49:50 +00001704 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001705 hp*|HP*) if test "$GCC" = yes;
1706 then CCSHARED="-fpic";
1707 else CCSHARED="+z";
1708 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001709 Linux*) CCSHARED="-fpic";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001710 FreeBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001711 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum37e97bc1997-04-29 22:15:33 +00001712 IRIX/6*) CCSHARED="$SGI_ABI -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001713 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001714fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001715echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001716# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001717# the python executable -- this is only needed for a few systems
1718echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001719echo "configure:1720: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001720if test -z "$LINKFORSHARED"
1721then
Guido van Rossum07397971997-04-29 21:49:50 +00001722 case $ac_sys_system/$ac_sys_release in
Guido van Rossume4766f61997-05-13 21:04:26 +00001723 AIX*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001724 hp*|HP*)
1725 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/sharedmodules";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001726 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001727 next) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001728 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum37e97bc1997-04-29 22:15:33 +00001729 IRIX/6*) LINKFORSHARED="$SGI_ABI -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001730 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001731fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001732echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001733
Guido van Rossum627b2d71993-12-24 10:39:16 +00001734# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00001735echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001736echo "configure:1737: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001737ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001738if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001739 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001740else
1741 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001742LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001743cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001744#line 1745 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001745#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001746/* Override any gcc2 internal prototype to avoid an error. */
1747/* We use char because int might match the return type of a gcc2
1748 builtin and then its argument prototype would still apply. */
1749char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001750
Guido van Rossumf78abae1997-01-21 22:02:36 +00001751int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001752dlopen()
1753; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001754EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001755if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001756 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001757 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001758else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001759 echo "configure: failed program was:" >&5
1760 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001762 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001763fi
1764rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001766
Guido van Rossum627b2d71993-12-24 10:39:16 +00001767fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001768if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001769 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001770 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1771 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772 cat >> confdefs.h <<EOF
1773#define $ac_tr_lib 1
1774EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001776 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001777
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001779 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00001782echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001783echo "configure:1784: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001784ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001785if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001787else
1788 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001789LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001790cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001791#line 1792 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001792#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001793/* Override any gcc2 internal prototype to avoid an error. */
1794/* We use char because int might match the return type of a gcc2
1795 builtin and then its argument prototype would still apply. */
1796char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797
Guido van Rossumf78abae1997-01-21 22:02:36 +00001798int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799shl_load()
1800; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001801EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001802if { (eval echo configure:1803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001803 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001804 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001806 echo "configure: failed program was:" >&5
1807 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001809 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810fi
1811rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001813
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001815if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001816 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001817 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1818 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001819 cat >> confdefs.h <<EOF
1820#define $ac_tr_lib 1
1821EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001823 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824
1825else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001826 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001827fi
1828 # Dynamic linking for HP-UX
Guido van Rossumf78abae1997-01-21 22:02:36 +00001829echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001830echo "configure:1831: checking for getpwnam in -lsun" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001831ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001832if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001833 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001834else
1835 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001836LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001838#line 1839 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001839#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001840/* Override any gcc2 internal prototype to avoid an error. */
1841/* We use char because int might match the return type of a gcc2
1842 builtin and then its argument prototype would still apply. */
1843char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001844
Guido van Rossumf78abae1997-01-21 22:02:36 +00001845int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001846getpwnam()
1847; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001848EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001849if { (eval echo configure:1850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001850 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001851 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001853 echo "configure: failed program was:" >&5
1854 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001855 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001856 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001857fi
1858rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001859LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001860
Guido van Rossum7f43da71994-08-01 12:15:30 +00001861fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001862if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001863 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001864 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1865 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001866 cat >> confdefs.h <<EOF
1867#define $ac_tr_lib 1
1868EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001869
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001870 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871
1872else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001873 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001874fi
1875 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001876# The following three (nsl,inet,socket) are needed on Sequent;
1877# the order of checking must be this. Most SVR4 platforms will
1878# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1879# broken. I see no elegant solution (probably CHECK_LIB should be
1880# fixed to only add the library if the given entry point is not
1881# satisfied without it).
Guido van Rossum2b3ac691996-08-30 15:18:41 +00001882if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00001883then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001884echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001885echo "configure:1886: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001886ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001887if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001888 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001889else
1890 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001891LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001892cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001893#line 1894 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001894#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001895/* Override any gcc2 internal prototype to avoid an error. */
1896/* We use char because int might match the return type of a gcc2
1897 builtin and then its argument prototype would still apply. */
1898char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001899
Guido van Rossumf78abae1997-01-21 22:02:36 +00001900int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001901t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001902; return 0; }
1903EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001904if { (eval echo configure:1905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001905 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001906 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001907else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001908 echo "configure: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001910 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001911 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001912fi
1913rm -f conftest*
1914LIBS="$ac_save_LIBS"
1915
1916fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001917if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001918 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001919 LIBS="-lnsl $LIBS"
1920else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001921 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001922fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001923 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00001924echo $ac_n "checking for gethostbyname in -linet""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001925echo "configure:1926: checking for gethostbyname in -linet" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001926ac_lib_var=`echo inet'_'gethostbyname | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001927if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001928 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001929else
1930 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001931LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001932cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001933#line 1934 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001934#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001935/* Override any gcc2 internal prototype to avoid an error. */
1936/* We use char because int might match the return type of a gcc2
1937 builtin and then its argument prototype would still apply. */
1938char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001939
Guido van Rossumf78abae1997-01-21 22:02:36 +00001940int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001941gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001942; return 0; }
1943EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001944if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001945 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001946 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001947else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001948 echo "configure: failed program was:" >&5
1949 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001950 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001951 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001952fi
1953rm -f conftest*
1954LIBS="$ac_save_LIBS"
1955
1956fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001957if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001958 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001959 LIBS="-linet $LIBS"
1960else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001961 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001962fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001963 # Sequent
Guido van Rossumf78abae1997-01-21 22:02:36 +00001964echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00001965echo "configure:1966: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001966ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001967if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001968 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001969else
1970 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001971LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001972cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001973#line 1974 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001974#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001975/* Override any gcc2 internal prototype to avoid an error. */
1976/* We use char because int might match the return type of a gcc2
1977 builtin and then its argument prototype would still apply. */
1978char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001979
Guido van Rossumf78abae1997-01-21 22:02:36 +00001980int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001981socket()
1982; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001983EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00001984if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001985 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001986 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001987else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001988 echo "configure: failed program was:" >&5
1989 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001990 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001991 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001992fi
1993rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001994LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001995
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001996fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001997if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001998 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001999 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002001 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002002fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002003 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00002004fi
Guido van Rossuma68acba1996-07-31 17:36:39 +00002005echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002006echo "configure:2007: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002007# Check whether --with-libs or --without-libs was given.
2008if test "${with_libs+set}" = set; then
2009 withval="$with_libs"
2010
2011echo "$ac_t""$withval" 1>&6
2012LIBS="$withval $LIBS"
2013
2014else
2015 echo "$ac_t""no" 1>&6
2016fi
2017
Guido van Rossum7f43da71994-08-01 12:15:30 +00002018
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002019echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002020echo "configure:2021: checking for --with(out)-readline" >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002021use_readline="yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002022# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002023if test "${with_readline+set}" = set; then
2024 withval="$with_readline"
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002025 echo "$ac_t""$withval" 1>&6; use_readline="$withval"
2026else
2027 echo "$ac_t""(default) yes" 1>&6
2028fi
2029
2030if test "$use_readline" != "no"
2031then
2032 if test "$use_readline" != "yes"
2033 then add_ldflags="-L$use_readline"
2034 else add_ldflags=""
2035 fi
2036 # See where the termcap interface could be hiding...
2037 echo $ac_n "checking for readline and termcap libraries""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002038echo "configure:2039: checking for readline and termcap libraries" >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002039 if eval "test \"`echo '$''{'ac_cv_readline_termcap'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041else
Guido van Rossum7f43da71994-08-01 12:15:30 +00002042
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002043 echo "$ac_t""have to find out" 1>&6
2044 save_libs="$LIBS"
2045 save_ldflags="$LDFLAGS"
2046 LDFLAGS="$save_ldflags $add_ldflags"
2047 rl="-lreadline"
2048 first=""
2049 # Hack for SGI IRIX 5.x.
2050 # Both termcap and gl have an entry point clear().
2051 # When linking with both shared libraries, we're in trouble.
2052 # We don't need the one in termcap.
2053 # By forcing a static link for termcap, we avoid
2054 # linking its clear() entry point.
2055 if test -f /usr/lib/libgl.so -a -f /usr/lib/libtermcap.a
2056 then first="/usr/lib/libtermcap.a"
2057 fi
2058 for add_lib in \
2059 "$first" "-ltermcap" "-ltermlib" "-lcurses" "-lncurses"
2060 do
2061 echo $ac_n "checking for $rl $add_lib""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002062echo "configure:2063: checking for $rl $add_lib" >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002063 LIBS="$save_libs $rl $add_lib"
2064 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002065#line 2066 "configure"
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002066#include "confdefs.h"
2067extern char *readline();
Guido van Rossumf78abae1997-01-21 22:02:36 +00002068int main() {
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002069char *line=readline();
2070; return 0; }
2071EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002072if { (eval echo configure:2073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002073 rm -rf conftest*
2074 echo "$ac_t""yes" 1>&6;
2075 ac_cv_readline_termcap="$rl $add_lib"
2076else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002077 echo "configure: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002079 rm -rf conftest*
2080 echo "$ac_t""no" 1>&6
2081fi
2082rm -f conftest*
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002083 if test "$ac_cv_readline_termcap" != ""
2084 then break
2085 fi
2086 done
2087 LIBS="$save_libs"
2088 LDFLAGS="$save_ldflags"
2089 echo $ac_n "checking result from check for readline and termcap""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002090echo "configure:2091: checking result from check for readline and termcap" >&5
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002091
2092fi
2093
2094 if test "$ac_cv_readline_termcap" = ""
2095 then
2096 echo "$ac_t""no" 1>&6
2097 echo "configure: warning: cannot link with GNU readline -- see config.log" 1>&2
2098 else
2099 echo "$ac_t""$ac_cv_readline_termcap" 1>&6
2100 LIBS="$LIBS $ac_cv_readline_termcap"
2101 LDFLAGS="$LDFLAGS $add_ldflags"
2102 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002103#define WITH_READLINE 1
2104EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002105
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002106 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002107fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002108
Guido van Rossumec2f0731997-01-22 20:54:01 +00002109echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002110echo "configure:2111: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002111
2112# Check whether --with-dec-threads or --without-dec-threads was given.
2113if test "${with_dec_threads+set}" = set; then
2114 withval="$with_dec_threads"
2115 echo "$ac_t""$withval" 1>&6
2116LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002117if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002118 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002119fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002120else
2121 echo "$ac_t""no" 1>&6
2122fi
2123
2124
2125echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002126echo "configure:2127: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002127# Check whether --with-threads or --without-threads was given.
2128if test "${with_threads+set}" = set; then
2129 withval="$with_threads"
2130 echo "$ac_t""$withval" 1>&6
2131if test "${with_thread+set}" != set; then
2132 with_thread="$withval";
2133fi
2134else
2135 echo "$ac_t""no" 1>&6
2136fi
2137
2138
2139echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002140echo "configure:2141: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002141# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002142if test "${with_thread+set}" = set; then
2143 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002144
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002145echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002146if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002147then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002148fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002149cat >> confdefs.h <<\EOF
2150#define _REENTRANT 1
2151EOF
2152
Guido van Rossumf78abae1997-01-21 22:02:36 +00002153ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002154echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002155echo "configure:2156: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002156if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2157 echo $ac_n "(cached) $ac_c" 1>&6
2158else
2159 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002160#line 2161 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002161#include "confdefs.h"
2162#include <mach/cthreads.h>
2163EOF
2164ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum7f253911997-05-09 02:42:48 +00002165{ (eval echo configure:2166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002166ac_err=`grep -v '^ *+' conftest.out`
2167if test -z "$ac_err"; then
2168 rm -rf conftest*
2169 eval "ac_cv_header_$ac_safe=yes"
2170else
2171 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002172 echo "configure: failed program was:" >&5
2173 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002174 rm -rf conftest*
2175 eval "ac_cv_header_$ac_safe=no"
2176fi
2177rm -f conftest*
2178fi
2179if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2180 echo "$ac_t""yes" 1>&6
2181 cat >> confdefs.h <<\EOF
2182#define WITH_THREAD 1
2183EOF
2184
2185cat >> confdefs.h <<\EOF
2186#define C_THREADS 1
2187EOF
2188
2189LIBOBJS="$LIBOBJS thread.o"
2190else
2191 echo "$ac_t""no" 1>&6
2192
Guido van Rossumf78abae1997-01-21 22:02:36 +00002193echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002194echo "configure:2195: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002195ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002196if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002197 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002198else
2199 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002200LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002201cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002202#line 2203 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002203#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002204/* Override any gcc2 internal prototype to avoid an error. */
2205/* We use char because int might match the return type of a gcc2
2206 builtin and then its argument prototype would still apply. */
2207char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002208
Guido van Rossumf78abae1997-01-21 22:02:36 +00002209int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210pthread_create()
2211; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002212EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002213if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002214 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002215 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002216else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002217 echo "configure: failed program was:" >&5
2218 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002219 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002220 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002221fi
2222rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002223LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002224
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002225fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002226if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002227 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002228 cat >> confdefs.h <<\EOF
2229#define WITH_THREAD 1
2230EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002232cat >> confdefs.h <<\EOF
2233#define _POSIX_THREADS 1
2234EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002235
2236LIBS="$LIBS -lpthreads"
2237LIBOBJS="$LIBOBJS thread.o"
2238else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002239 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002240
Guido van Rossumf78abae1997-01-21 22:02:36 +00002241echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002242echo "configure:2243: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002243ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002244if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2245 echo $ac_n "(cached) $ac_c" 1>&6
2246else
2247 ac_save_LIBS="$LIBS"
2248LIBS="-lpthread $LIBS"
2249cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002250#line 2251 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002251#include "confdefs.h"
2252/* Override any gcc2 internal prototype to avoid an error. */
2253/* We use char because int might match the return type of a gcc2
2254 builtin and then its argument prototype would still apply. */
2255char pthread_create();
2256
Guido van Rossumf78abae1997-01-21 22:02:36 +00002257int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002258pthread_create()
2259; return 0; }
2260EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002261if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002262 rm -rf conftest*
2263 eval "ac_cv_lib_$ac_lib_var=yes"
2264else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002265 echo "configure: failed program was:" >&5
2266 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002267 rm -rf conftest*
2268 eval "ac_cv_lib_$ac_lib_var=no"
2269fi
2270rm -f conftest*
2271LIBS="$ac_save_LIBS"
2272
2273fi
2274if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2275 echo "$ac_t""yes" 1>&6
2276 cat >> confdefs.h <<\EOF
2277#define WITH_THREAD 1
2278EOF
2279
2280cat >> confdefs.h <<\EOF
2281#define _POSIX_THREADS 1
2282EOF
2283
2284LIBS="$LIBS -lpthread"
2285LIBOBJS="$LIBOBJS thread.o"
2286else
2287 echo "$ac_t""no" 1>&6
2288fi
2289
2290
Guido van Rossum627b2d71993-12-24 10:39:16 +00002291fi
2292
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002293fi
2294
Guido van Rossumf78abae1997-01-21 22:02:36 +00002295echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002296echo "configure:2297: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002297ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002298if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002299 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002300else
2301 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002302LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002303cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002304#line 2305 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002305#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002306/* Override any gcc2 internal prototype to avoid an error. */
2307/* We use char because int might match the return type of a gcc2
2308 builtin and then its argument prototype would still apply. */
2309char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002310
Guido van Rossumf78abae1997-01-21 22:02:36 +00002311int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002312usconfig()
2313; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002314EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002315if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002316 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002317 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002318else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002319 echo "configure: failed program was:" >&5
2320 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002321 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002322 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002323fi
2324rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002325LIBS="$ac_save_LIBS"
2326
2327fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002328if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002329 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002330 cat >> confdefs.h <<\EOF
2331#define WITH_THREAD 1
2332EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002333
Guido van Rossum7f43da71994-08-01 12:15:30 +00002334LIBS="$LIBS -lmpc"
2335LIBOBJS="$LIBOBJS thread.o"
2336else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002337 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002338fi
2339
Guido van Rossumf78abae1997-01-21 22:02:36 +00002340echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002341echo "configure:2342: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002342ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002343if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002344 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002345else
2346 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002347LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002348cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002349#line 2350 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002350#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002351/* Override any gcc2 internal prototype to avoid an error. */
2352/* We use char because int might match the return type of a gcc2
2353 builtin and then its argument prototype would still apply. */
2354char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002355
Guido van Rossumf78abae1997-01-21 22:02:36 +00002356int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002357thr_create()
2358; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002359EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002360if { (eval echo configure:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002361 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002362 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002363else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002364 echo "configure: failed program was:" >&5
2365 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002366 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002367 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002368fi
2369rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002370LIBS="$ac_save_LIBS"
2371
2372fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002373if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002374 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002375 cat >> confdefs.h <<\EOF
2376#define WITH_THREAD 1
2377EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002378
Guido van Rossum7f43da71994-08-01 12:15:30 +00002379LIBS="$LIBS -lthread"
2380LIBOBJS="$LIBOBJS thread.o"
2381else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002382 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002383fi
2384
Guido van Rossum7f43da71994-08-01 12:15:30 +00002385
Guido van Rossumda88dad1995-01-26 00:46:29 +00002386else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002387 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002388fi
2389
Guido van Rossum7f43da71994-08-01 12:15:30 +00002390
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002391# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002392
2393DLINCLDIR=/
2394
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002395echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002396echo "configure:2397: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002397# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002398if test "${with_sgi_dl+set}" = set; then
2399 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002400
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002401echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002402cat >> confdefs.h <<\EOF
2403#define WITH_SGI_DL 1
2404EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002405
2406dldir=$withval
2407if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002408then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002409else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002410fi
2411DLINCLDIR=${dldir}
2412LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002413else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002414 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002415fi
2416
2417
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002418echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002419echo "configure:2420: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002420# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421if test "${with_dl_dld+set}" = set; then
2422 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002423
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002424echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002425cat >> confdefs.h <<\EOF
2426#define WITH_DL_DLD 1
2427EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002428
2429dldir=`echo "$withval" | sed 's/,.*//'`
2430dlddir=`echo "$withval" | sed 's/.*,//'`
2431if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002432then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002433else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002434fi
2435DLINCLDIR=${dldir}
2436LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002437else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002438 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002439fi
2440
2441
Guido van Rossum627b2d71993-12-24 10:39:16 +00002442# checks for library functions
Guido van Rossum2d38f911996-06-26 19:47:01 +00002443for ac_func in chown clock dlopen flock ftime ftruncate \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002444 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
Guido van Rossum57d09151996-07-24 02:42:38 +00002445 link lstat mkfifo nice plock putenv readlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002446 select setgid setuid setsid setpgid setpgrp setvbuf \
2447 sigaction siginterrupt sigrelse strftime symlink \
2448 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002449do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002450echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002451echo "configure:2452: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002452if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2453 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002454else
2455 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002456#line 2457 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002457#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002458/* System header to define __stub macros and hopefully few prototypes,
2459 which can conflict with char $ac_func(); below. */
2460#include <assert.h>
2461/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462/* We use char because int might match the return type of a gcc2
2463 builtin and then its argument prototype would still apply. */
2464char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002465
Guido van Rossumf78abae1997-01-21 22:02:36 +00002466int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002467
Guido van Rossum627b2d71993-12-24 10:39:16 +00002468/* The GNU C library defines this for functions which it implements
2469 to always fail with ENOSYS. Some functions are actually named
2470 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002471#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002472choke me
2473#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002474$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002475#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002476
Guido van Rossum7f43da71994-08-01 12:15:30 +00002477; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002478EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002479if { (eval echo configure:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002480 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002481 eval "ac_cv_func_$ac_func=yes"
2482else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002483 echo "configure: failed program was:" >&5
2484 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002485 rm -rf conftest*
2486 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002487fi
2488rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002489fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002491if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002492 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002493 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002494 cat >> confdefs.h <<EOF
2495#define $ac_tr_func 1
2496EOF
2497
2498else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002499 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002500fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002501done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002502
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002503for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002504do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002505echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002506echo "configure:2507: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002507if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2508 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002509else
2510 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002511#line 2512 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002512#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002513/* System header to define __stub macros and hopefully few prototypes,
2514 which can conflict with char $ac_func(); below. */
2515#include <assert.h>
2516/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517/* We use char because int might match the return type of a gcc2
2518 builtin and then its argument prototype would still apply. */
2519char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002520
Guido van Rossumf78abae1997-01-21 22:02:36 +00002521int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002522
Guido van Rossum627b2d71993-12-24 10:39:16 +00002523/* The GNU C library defines this for functions which it implements
2524 to always fail with ENOSYS. Some functions are actually named
2525 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002526#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002527choke me
2528#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002529$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002530#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002531
Guido van Rossum7f43da71994-08-01 12:15:30 +00002532; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002533EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002534if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002535 rm -rf conftest*
2536 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002537else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002538 echo "configure: failed program was:" >&5
2539 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002540 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002541 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002542fi
2543rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002544fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002545
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002546if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002547 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002548 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2549 cat >> confdefs.h <<EOF
2550#define $ac_tr_func 1
2551EOF
2552
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002553else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002554 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002555LIBOBJS="$LIBOBJS ${ac_func}.o"
2556fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002557done
2558
Guido van Rossumf78abae1997-01-21 22:02:36 +00002559
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002560echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002561echo "configure:2562: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002562if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2563 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002564else
2565 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002566#line 2567 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002567#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002568/* System header to define __stub macros and hopefully few prototypes,
2569 which can conflict with char getpgrp(); below. */
2570#include <assert.h>
2571/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002572/* We use char because int might match the return type of a gcc2
2573 builtin and then its argument prototype would still apply. */
2574char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002575
Guido van Rossumf78abae1997-01-21 22:02:36 +00002576int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002577
Guido van Rossum627b2d71993-12-24 10:39:16 +00002578/* The GNU C library defines this for functions which it implements
2579 to always fail with ENOSYS. Some functions are actually named
2580 something starting with __ and the normal name is an alias. */
2581#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2582choke me
2583#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002584getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002585#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586
2587; return 0; }
2588EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002589if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590 rm -rf conftest*
2591 eval "ac_cv_func_getpgrp=yes"
2592else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002593 echo "configure: failed program was:" >&5
2594 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595 rm -rf conftest*
2596 eval "ac_cv_func_getpgrp=no"
2597fi
2598rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002600
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002602 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002604#line 2605 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605#include "confdefs.h"
2606#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002607int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002608getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002609; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002610EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002611if { (eval echo configure:2612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002612 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 cat >> confdefs.h <<\EOF
2614#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002615EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002616
Guido van Rossumf78abae1997-01-21 22:02:36 +00002617else
2618 echo "configure: failed program was:" >&5
2619 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002620fi
2621rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002623 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002624fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002625
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002626echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002627echo "configure:2628: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002628if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2629 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630else
2631 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002632#line 2633 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002633#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002634/* System header to define __stub macros and hopefully few prototypes,
2635 which can conflict with char setpgrp(); below. */
2636#include <assert.h>
2637/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002638/* We use char because int might match the return type of a gcc2
2639 builtin and then its argument prototype would still apply. */
2640char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002641
Guido van Rossumf78abae1997-01-21 22:02:36 +00002642int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002643
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002644/* The GNU C library defines this for functions which it implements
2645 to always fail with ENOSYS. Some functions are actually named
2646 something starting with __ and the normal name is an alias. */
2647#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2648choke me
2649#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002650setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002651#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002652
2653; return 0; }
2654EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002655if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002656 rm -rf conftest*
2657 eval "ac_cv_func_setpgrp=yes"
2658else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002659 echo "configure: failed program was:" >&5
2660 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661 rm -rf conftest*
2662 eval "ac_cv_func_setpgrp=no"
2663fi
2664rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002666
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002668 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002670#line 2671 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671#include "confdefs.h"
2672#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002673int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002675; return 0; }
2676EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002677if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002678 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679 cat >> confdefs.h <<\EOF
2680#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002681EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002682
Guido van Rossumf78abae1997-01-21 22:02:36 +00002683else
2684 echo "configure: failed program was:" >&5
2685 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002686fi
2687rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002689 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002690fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002691
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002692echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002693echo "configure:2694: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002694if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2695 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696else
2697 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002698#line 2699 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002700/* System header to define __stub macros and hopefully few prototypes,
2701 which can conflict with char gettimeofday(); below. */
2702#include <assert.h>
2703/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002704/* We use char because int might match the return type of a gcc2
2705 builtin and then its argument prototype would still apply. */
2706char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002707
Guido van Rossumf78abae1997-01-21 22:02:36 +00002708int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002709
2710/* The GNU C library defines this for functions which it implements
2711 to always fail with ENOSYS. Some functions are actually named
2712 something starting with __ and the normal name is an alias. */
2713#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2714choke me
2715#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002716gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002717#endif
2718
2719; return 0; }
2720EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002721if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722 rm -rf conftest*
2723 eval "ac_cv_func_gettimeofday=yes"
2724else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002725 echo "configure: failed program was:" >&5
2726 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002727 rm -rf conftest*
2728 eval "ac_cv_func_gettimeofday=no"
2729fi
2730rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002731fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002732
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002733if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002734 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002735 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002736#line 2737 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002738#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002739int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002740gettimeofday((struct timeval*)0,(struct timezone*)0);
2741; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002742EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002743if { (eval echo configure:2744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002744 :
2745else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002746 echo "configure: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002748 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002749 cat >> confdefs.h <<\EOF
2750#define GETTIMEOFDAY_NO_TZ 1
2751EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002752
2753fi
2754rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002755else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002756 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002757fi
2758
2759
2760# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002761echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002762echo "configure:2763: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002763if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2764 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765else
2766 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002767#line 2768 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002768#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769#include <sys/types.h>
2770#include <sys/time.h>
2771#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002772int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773struct tm *tp;
2774; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002775EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002776if { (eval echo configure:2777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002777 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002778 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002779else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002780 echo "configure: failed program was:" >&5
2781 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002784fi
2785rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002787
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002788echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789if test $ac_cv_header_time = yes; then
2790 cat >> confdefs.h <<\EOF
2791#define TIME_WITH_SYS_TIME 1
2792EOF
2793
2794fi
2795
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002796echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002797echo "configure:2798: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002798if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2799 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002800else
2801 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002802#line 2803 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002803#include "confdefs.h"
2804#include <sys/types.h>
2805#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002806int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002807struct tm *tp; tp->tm_sec;
2808; return 0; }
2809EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002810if { (eval echo configure:2811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002811 rm -rf conftest*
2812 ac_cv_struct_tm=time.h
2813else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002814 echo "configure: failed program was:" >&5
2815 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002816 rm -rf conftest*
2817 ac_cv_struct_tm=sys/time.h
2818fi
2819rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002820fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002822echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002823if test $ac_cv_struct_tm = sys/time.h; then
2824 cat >> confdefs.h <<\EOF
2825#define TM_IN_SYS_TIME 1
2826EOF
2827
2828fi
2829
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002830echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002831echo "configure:2832: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002832if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2833 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834else
2835 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002836#line 2837 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002837#include "confdefs.h"
2838#include <sys/types.h>
2839#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002840int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002841struct tm tm; tm.tm_zone;
2842; return 0; }
2843EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002844if { (eval echo configure:2845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002845 rm -rf conftest*
2846 ac_cv_struct_tm_zone=yes
2847else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002848 echo "configure: failed program was:" >&5
2849 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002850 rm -rf conftest*
2851 ac_cv_struct_tm_zone=no
2852fi
2853rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002854fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002855
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002856echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002857if test "$ac_cv_struct_tm_zone" = yes; then
2858 cat >> confdefs.h <<\EOF
2859#define HAVE_TM_ZONE 1
2860EOF
2861
2862else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002863 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002864echo "configure:2865: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002865if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2866 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002867else
2868 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002869#line 2870 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002870#include "confdefs.h"
2871#include <time.h>
2872#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002873extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002874#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00002875int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002876atoi(*tzname);
2877; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002878EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002879if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002880 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002881 ac_cv_var_tzname=yes
2882else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002883 echo "configure: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002885 rm -rf conftest*
2886 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002887fi
2888rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002889fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002890
2891echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002892 if test $ac_cv_var_tzname = yes; then
2893 cat >> confdefs.h <<\EOF
2894#define HAVE_TZNAME 1
2895EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002897 fi
2898fi
2899
2900
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002901echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002902echo "configure:2903: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002903if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2904 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002905else
2906 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002907#line 2908 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002908#include "confdefs.h"
2909#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002910int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002911return altzone;
2912; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002913EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002914if { (eval echo configure:2915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002915 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002916 ac_cv_header_time_altzone=yes
2917else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002918 echo "configure: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002920 rm -rf conftest*
2921 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002922fi
2923rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002924fi
2925
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002926echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002927if test $ac_cv_header_time_altzone = yes; then
2928 cat >> confdefs.h <<\EOF
2929#define HAVE_ALTZONE 1
2930EOF
2931
2932fi
2933
Guido van Rossumda88dad1995-01-26 00:46:29 +00002934was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002935echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002936echo "configure:2937: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002937cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002938#line 2939 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002939#include "confdefs.h"
2940
2941#include <sys/types.h>
2942#include <sys/select.h>
2943#include <sys/time.h>
2944
Guido van Rossumf78abae1997-01-21 22:02:36 +00002945int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002946;
2947; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002948EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002949if { (eval echo configure:2950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002950 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002951 cat >> confdefs.h <<\EOF
2952#define SYS_SELECT_WITH_SYS_TIME 1
2953EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002954 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00002955else
2956 echo "configure: failed program was:" >&5
2957 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00002958fi
2959rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002960echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002961
2962# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00002963
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002964echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00002965echo "configure:2966: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002966if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2967 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002968else
2969 if test "$GCC" = yes; then
2970 # GCC predefines this symbol on systems where it applies.
2971cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002972#line 2973 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002973#include "confdefs.h"
2974#ifdef __CHAR_UNSIGNED__
2975 yes
2976#endif
2977
2978EOF
2979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2980 egrep "yes" >/dev/null 2>&1; then
2981 rm -rf conftest*
2982 ac_cv_c_char_unsigned=yes
2983else
2984 rm -rf conftest*
2985 ac_cv_c_char_unsigned=no
2986fi
2987rm -f conftest*
2988
2989else
2990if test "$cross_compiling" = yes; then
2991 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2992else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002993 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00002994#line 2995 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002995#include "confdefs.h"
2996/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002997#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00002998#define volatile
2999#endif
3000main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003001 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003002}
3003EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003004if { (eval echo configure:3005: \"$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 +00003005then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003006 ac_cv_c_char_unsigned=yes
3007else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003008 echo "configure: failed program was:" >&5
3009 cat conftest.$ac_ext >&5
3010 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003011 ac_cv_c_char_unsigned=no
3012fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003013rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003014fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003015
3016fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003017fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003018
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003019echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3021 cat >> confdefs.h <<\EOF
3022#define __CHAR_UNSIGNED__ 1
3023EOF
3024
3025fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003026
3027
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003028echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003029echo "configure:3030: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003030if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3031 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003032else
3033 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003034#line 3035 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003035#include "confdefs.h"
3036
Guido van Rossumf78abae1997-01-21 22:02:36 +00003037int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003038
3039/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003040typedef int charset[2]; const charset x;
3041/* SunOS 4.1.1 cc rejects this. */
3042char const *const *ccp;
3043char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003044/* NEC SVR4.0.2 mips cc rejects this. */
3045struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003046static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003047/* AIX XL C 1.02.0.0 rejects this.
3048 It does not let you subtract one const X* pointer from another in an arm
3049 of an if-expression whose if-part is not a constant expression */
3050const char *g = "string";
3051ccp = &g + (g ? g-g : 0);
3052/* HPUX 7.0 cc rejects these. */
3053++ccp;
3054p = (char**) ccp;
3055ccp = (char const *const *) p;
3056{ /* SCO 3.2v4 cc rejects this. */
3057 char *t;
3058 char const *s = 0 ? (char *) 0 : (char const *) 0;
3059
3060 *t++ = 0;
3061}
3062{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003063 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003064 const int *foo = &x[0];
3065 ++foo;
3066}
3067{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3068 typedef const int *iptr;
3069 iptr p = 0;
3070 ++p;
3071}
3072{ /* AIX XL C 1.02.0.0 rejects this saying
3073 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3074 struct s { int j; const int *ap[3]; };
3075 struct s *b; b->j = 5;
3076}
3077{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3078 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003079}
3080
3081; return 0; }
3082EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003083if { (eval echo configure:3084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003084 rm -rf conftest*
3085 ac_cv_c_const=yes
3086else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003087 echo "configure: failed program was:" >&5
3088 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003089 rm -rf conftest*
3090 ac_cv_c_const=no
3091fi
3092rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003093fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003094
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003095echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096if test $ac_cv_c_const = no; then
3097 cat >> confdefs.h <<\EOF
3098#define const
3099EOF
3100
3101fi
3102
3103
Guido van Rossumda88dad1995-01-26 00:46:29 +00003104works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003105echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003106echo "configure:3107: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003107cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003108#line 3109 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003109#include "confdefs.h"
3110
Guido van Rossumf78abae1997-01-21 22:02:36 +00003111int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112volatile int x; x = 0;
3113; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003114EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003115if { (eval echo configure:3116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003116 rm -rf conftest*
3117 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003118else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003119 echo "configure: failed program was:" >&5
3120 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003121 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122 cat >> confdefs.h <<\EOF
3123#define volatile
3124EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003125
3126fi
3127rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003128echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003129
Guido van Rossumda88dad1995-01-26 00:46:29 +00003130works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003131echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003132echo "configure:3133: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003133cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003134#line 3135 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003135#include "confdefs.h"
3136
Guido van Rossumf78abae1997-01-21 22:02:36 +00003137int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003138signed char c;
3139; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003140EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003141if { (eval echo configure:3142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003142 rm -rf conftest*
3143 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003144else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003145 echo "configure: failed program was:" >&5
3146 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003147 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148 cat >> confdefs.h <<\EOF
3149#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003150EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003151
3152fi
3153rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003154echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003155
Guido van Rossumda88dad1995-01-26 00:46:29 +00003156have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003157echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003158echo "configure:3159: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003159cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003160#line 3161 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003161#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003162int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003163int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003164return foo(10);
3165; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003166EOF
Guido van Rossum7f253911997-05-09 02:42:48 +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 cat >> confdefs.h <<\EOF
3170#define HAVE_PROTOTYPES 1
3171EOF
3172 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003173else
3174 echo "configure: failed program was:" >&5
3175 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003176fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003177rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003178echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003179
Guido van Rossumda88dad1995-01-26 00:46:29 +00003180works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003181echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003182echo "configure:3183: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003184#line 3185 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003185#include "confdefs.h"
3186
3187#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003188int foo(int x, ...) {
3189 va_list va;
3190 va_start(va, x);
3191 va_arg(va, int);
3192 va_arg(va, char *);
3193 va_arg(va, double);
3194 return 0;
3195}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003196
Guido van Rossumf78abae1997-01-21 22:02:36 +00003197int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003198return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003199; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003200EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003201if { (eval echo configure:3202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003202 rm -rf conftest*
3203 cat >> confdefs.h <<\EOF
3204#define HAVE_STDARG_PROTOTYPES 1
3205EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003206 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003207else
3208 echo "configure: failed program was:" >&5
3209 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003210fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003211rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003212echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003213
Guido van Rossumda88dad1995-01-26 00:46:29 +00003214if test "$have_prototypes" = yes; then
3215bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003216echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003217echo "configure:3218: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003219#line 3220 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003220#include "confdefs.h"
3221#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003222int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003223char **t;execve("@",t,t);
3224; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003225EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003226if { (eval echo configure:3227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003227 :
3228else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003229 echo "configure: failed program was:" >&5
3230 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003231 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003232 cat >> confdefs.h <<\EOF
3233#define BAD_EXEC_PROTOTYPES 1
3234EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003235 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003236fi
3237rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003238echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003239fi
3240
Guido van Rossumda88dad1995-01-26 00:46:29 +00003241bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003242echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003243echo "configure:3244: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003244if test "$cross_compiling" = yes; then
3245 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3246else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003247 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003248#line 3249 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003249#include "confdefs.h"
3250
3251struct s { int a; int b; };
3252static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003253int foobar() {
3254 static int random;
3255 random = (int) &foo;
3256 return random;
3257}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003258static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259main() {
3260 exit(!((int)&foo == foobar()));
3261}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003262
3263EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003264if { (eval echo configure:3265: \"$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 +00003265then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003266 :
3267else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003268 echo "configure: failed program was:" >&5
3269 cat conftest.$ac_ext >&5
3270 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003271 cat >> confdefs.h <<\EOF
3272#define BAD_STATIC_FORWARD 1
3273EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003274 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003275fi
3276rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003277fi
3278
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003279echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003280
Guido van Rossumda88dad1995-01-26 00:46:29 +00003281va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003282echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003283echo "configure:3284: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003285#line 3286 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286#include "confdefs.h"
3287
3288#ifdef HAVE_STDARG_PROTOTYPES
3289#include <stdarg.h>
3290#else
3291#include <varargs.h>
3292#endif
3293
Guido van Rossumf78abae1997-01-21 22:02:36 +00003294int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295va_list list1, list2; list1 = list2;
3296; return 0; }
3297EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003298if { (eval echo configure:3299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003299 :
3300else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003301 echo "configure: failed program was:" >&5
3302 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003303 rm -rf conftest*
3304 cat >> confdefs.h <<\EOF
3305#define VA_LIST_IS_ARRAY 1
3306EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003307 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003308fi
3309rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003310echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311
Guido van Rossum627b2d71993-12-24 10:39:16 +00003312# checks for system services
3313# (none yet)
3314
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003315# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003316echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003317echo "configure:3318: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003318ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003319if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003320 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003321else
3322 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003323LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003325#line 3326 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003326#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003327/* Override any gcc2 internal prototype to avoid an error. */
3328/* We use char because int might match the return type of a gcc2
3329 builtin and then its argument prototype would still apply. */
3330char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003331
Guido van Rossumf78abae1997-01-21 22:02:36 +00003332int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003333__fpu_control()
3334; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003335EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003336if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003337 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003338 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003339else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003340 echo "configure: failed program was:" >&5
3341 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003342 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003344fi
3345rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003346LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003347
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003348fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003349if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003350 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003351 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3352 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003353 cat >> confdefs.h <<EOF
3354#define $ac_tr_lib 1
3355EOF
3356
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003357 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358
3359else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003360 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003361fi
3362
3363
Guido van Rossum7f253911997-05-09 02:42:48 +00003364# Check for --with-fpectl
3365
3366echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
3367echo "configure:3368: checking for --with-fpectl" >&5
3368# Check whether --with-fpectl or --without-fpectl was given.
3369if test "${with_fpectl+set}" = set; then
3370 withval="$with_fpectl"
3371
3372if test "$withval" != no
3373then cat >> confdefs.h <<\EOF
3374#define WANT_SIGFPE_HANDLER 1
3375EOF
3376 echo "$ac_t""yes" 1>&6
3377else echo "$ac_t""no" 1>&6
3378fi
3379fi
3380
3381
Guido van Rossum7f43da71994-08-01 12:15:30 +00003382# check for --with-libm=...
3383
Guido van Rossum563e7081996-09-10 18:20:48 +00003384case $ac_sys_system in
3385next) ;;
3386*) LIBM=-lm
3387esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003388echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
3389echo "configure:3390: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003390# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003391if test "${with_libm+set}" = set; then
3392 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003393
Guido van Rossum7f253911997-05-09 02:42:48 +00003394if test "$withval" = no
3395then LIBM=
3396 echo "$ac_t""force LIBM empty" 1>&6
3397elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003398then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003399 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003401fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003402else
3403 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003404fi
3405
3406
3407# check for --with-libc=...
3408
Guido van Rossum7f253911997-05-09 02:42:48 +00003409echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
3410echo "configure:3411: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003411# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003412if test "${with_libc+set}" = set; then
3413 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003414
Guido van Rossum7f253911997-05-09 02:42:48 +00003415if test "$withval" = no
3416then LIBC=
3417 echo "$ac_t""force LIBC empty" 1>&6
3418elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003419then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003420 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003421else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003422fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003423else
3424 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003425fi
3426
3427
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003428# check for hypot() in math library
3429LIBS_SAVE=$LIBS
3430LIBS="$LIBS $LIBM"
3431for ac_func in hypot
3432do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003433echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003434echo "configure:3435: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003435if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3436 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003437else
3438 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003439#line 3440 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003440#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003441/* System header to define __stub macros and hopefully few prototypes,
3442 which can conflict with char $ac_func(); below. */
3443#include <assert.h>
3444/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003445/* We use char because int might match the return type of a gcc2
3446 builtin and then its argument prototype would still apply. */
3447char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003448
Guido van Rossumf78abae1997-01-21 22:02:36 +00003449int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003450
3451/* The GNU C library defines this for functions which it implements
3452 to always fail with ENOSYS. Some functions are actually named
3453 something starting with __ and the normal name is an alias. */
3454#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3455choke me
3456#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003457$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003458#endif
3459
3460; return 0; }
3461EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003462if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003463 rm -rf conftest*
3464 eval "ac_cv_func_$ac_func=yes"
3465else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003466 echo "configure: failed program was:" >&5
3467 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003468 rm -rf conftest*
3469 eval "ac_cv_func_$ac_func=no"
3470fi
3471rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003472fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003473
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003474if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003475 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003476 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003477 cat >> confdefs.h <<EOF
3478#define $ac_tr_func 1
3479EOF
3480
3481else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003482 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003483fi
3484done
3485
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003486for ac_func in hypot
3487do
3488echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003489echo "configure:3490: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003490if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3492else
3493 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003494#line 3495 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003495#include "confdefs.h"
3496/* System header to define __stub macros and hopefully few prototypes,
3497 which can conflict with char $ac_func(); below. */
3498#include <assert.h>
3499/* Override any gcc2 internal prototype to avoid an error. */
3500/* We use char because int might match the return type of a gcc2
3501 builtin and then its argument prototype would still apply. */
3502char $ac_func();
3503
Guido van Rossumf78abae1997-01-21 22:02:36 +00003504int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003505
3506/* The GNU C library defines this for functions which it implements
3507 to always fail with ENOSYS. Some functions are actually named
3508 something starting with __ and the normal name is an alias. */
3509#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3510choke me
3511#else
3512$ac_func();
3513#endif
3514
3515; return 0; }
3516EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003517if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003518 rm -rf conftest*
3519 eval "ac_cv_func_$ac_func=yes"
3520else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003521 echo "configure: failed program was:" >&5
3522 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003523 rm -rf conftest*
3524 eval "ac_cv_func_$ac_func=no"
3525fi
3526rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003527fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003528
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003529if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3530 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003531 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3532 cat >> confdefs.h <<EOF
3533#define $ac_tr_func 1
3534EOF
3535
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003536else
3537 echo "$ac_t""no" 1>&6
3538LIBOBJS="$LIBOBJS ${ac_func}.o"
3539fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003540done
3541
Guido van Rossumf78abae1997-01-21 22:02:36 +00003542
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003543LIBS=$LIBS_SAVE
3544
Guido van Rossumda88dad1995-01-26 00:46:29 +00003545# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003546echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00003547echo "configure:3548: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003548if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3549 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003550else
3551 if test "$cross_compiling" = yes; then
3552 ac_cv_func_getopt=no
3553else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003554 cat > conftest.$ac_ext <<EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003555#line 3556 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003556#include "confdefs.h"
3557#include <stdio.h>
3558extern int optind, opterr, getopt();
3559extern char* optarg;
3560int main() {
3561 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3562 opterr = 0;
3563 if (getopt(3, av, "f:") == 'f') { exit(1); }
3564 exit(0);
3565}
3566EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00003567if { (eval echo configure:3568: \"$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 +00003568then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003569 ac_cv_func_getopt=yes
3570else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003571 echo "configure: failed program was:" >&5
3572 cat conftest.$ac_ext >&5
3573 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00003574 ac_cv_func_getopt=no
3575fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003576rm -fr conftest*
3577fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003578
3579fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003580echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003581test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3582
Guido van Rossum627b2d71993-12-24 10:39:16 +00003583# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003584trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003585cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003586# This file is a shell script that caches the results of configure
3587# tests run on this system so they can be shared between configure
3588# scripts and configure runs. It is not useful on other systems.
3589# If it contains results you don't want to keep, you may remove or edit it.
3590#
3591# By default, configure uses ./config.cache as the cache file,
3592# creating it if it does not exist already. You can give configure
3593# the --cache-file=FILE option to use a different cache file; that is
3594# what configure does when it calls configure scripts in
3595# subdirectories, so they share the cache.
3596# Giving --cache-file=/dev/null disables caching, for debugging configure.
3597# config.status only pays attention to the cache file if you give it the
3598# --recheck option to rerun configure.
3599#
3600EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003601# The following way of writing the cache mishandles newlines in values,
3602# but we know of no workaround that is simple, portable, and efficient.
3603# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003604# Ultrix sh set writes to stderr and can't be redirected directly,
3605# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003606(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00003607 case `(ac_space=' '; set) 2>&1` in
3608 *ac_space=\ *)
3609 # `set' does not quote correctly, so add quotes (double-quote substitution
3610 # turns \\\\ into \\, and sed turns \\ into \).
3611 sed -n \
3612 -e "s/'/'\\\\''/g" \
3613 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3614 ;;
3615 *)
3616 # `set' quotes correctly as required by POSIX, so do not add quotes.
3617 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3618 ;;
3619 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003620if cmp -s $cache_file confcache; then
3621 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003622else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003623 if test -w $cache_file; then
3624 echo "updating cache $cache_file"
3625 cat confcache > $cache_file
3626 else
3627 echo "not updating unwritable cache $cache_file"
3628 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003629fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003630rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003631
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003632trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003633
3634test "x$prefix" = xNONE && prefix=$ac_default_prefix
3635# Let make expand exec_prefix.
3636test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003637
Guido van Rossum7f43da71994-08-01 12:15:30 +00003638# Any assignment to VPATH causes Sun make to only execute
3639# the first set of double-colon rules, so remove it if not needed.
3640# If there is a colon in the path, we need to keep it.
3641if test "x$srcdir" = x.; then
3642 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3643fi
3644
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003645trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003646
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003647DEFS=-DHAVE_CONFIG_H
3648
3649# Without the "./", some shells look in PATH for config.status.
3650: ${CONFIG_STATUS=./config.status}
3651
3652echo creating $CONFIG_STATUS
3653rm -f $CONFIG_STATUS
3654cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003655#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003656# Generated automatically by configure.
3657# Run this file to recreate the current configuration.
3658# This directory was configured as follows,
3659# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3660#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003661# $0 $ac_configure_args
3662#
3663# Compiler output produced by configure, useful for debugging
3664# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003665
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003666ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003667for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003668do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003669 case "\$ac_option" in
3670 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003671 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3672 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003673 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003674 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003675 exit 0 ;;
3676 -help | --help | --hel | --he | --h)
3677 echo "\$ac_cs_usage"; exit 0 ;;
3678 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003679 esac
3680done
3681
Guido van Rossum7f43da71994-08-01 12:15:30 +00003682ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003683
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003684trap 'rm -fr `echo "Makefile \
3685 Objects/Makefile \
3686 Parser/Makefile \
3687 Python/Makefile \
3688 Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003689EOF
3690cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003691
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003692# Protect against being on the right side of a sed subst in config.status.
3693sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3694 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003695$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003696$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003697s%@CFLAGS@%$CFLAGS%g
3698s%@CPPFLAGS@%$CPPFLAGS%g
3699s%@CXXFLAGS@%$CXXFLAGS%g
3700s%@DEFS@%$DEFS%g
3701s%@LDFLAGS@%$LDFLAGS%g
3702s%@LIBS@%$LIBS%g
3703s%@exec_prefix@%$exec_prefix%g
3704s%@prefix@%$prefix%g
3705s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706s%@bindir@%$bindir%g
3707s%@sbindir@%$sbindir%g
3708s%@libexecdir@%$libexecdir%g
3709s%@datadir@%$datadir%g
3710s%@sysconfdir@%$sysconfdir%g
3711s%@sharedstatedir@%$sharedstatedir%g
3712s%@localstatedir@%$localstatedir%g
3713s%@libdir@%$libdir%g
3714s%@includedir@%$includedir%g
3715s%@oldincludedir@%$oldincludedir%g
3716s%@infodir@%$infodir%g
3717s%@mandir@%$mandir%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003718s%@MACHDEP@%$MACHDEP%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003719s%@CC@%$CC%g
3720s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003721s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003722s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003723s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3724s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003725s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003726s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003727s%@SO@%$SO%g
3728s%@LDSHARED@%$LDSHARED%g
3729s%@CCSHARED@%$CCSHARED%g
3730s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00003731s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003732s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003733s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f253911997-05-09 02:42:48 +00003734s%@WANT_SIGFPE_HANDLER@%$WANT_SIGFPE_HANDLER%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003735s%@LIBM@%$LIBM%g
3736s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737
3738CEOF
3739EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003740
3741cat >> $CONFIG_STATUS <<\EOF
3742
3743# Split the substitutions into bite-sized pieces for seds with
3744# small command number limits, like on Digital OSF/1 and HP-UX.
3745ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3746ac_file=1 # Number of current file.
3747ac_beg=1 # First line for current file.
3748ac_end=$ac_max_sed_cmds # Line after last line for current file.
3749ac_more_lines=:
3750ac_sed_cmds=""
3751while $ac_more_lines; do
3752 if test $ac_beg -gt 1; then
3753 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3754 else
3755 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3756 fi
3757 if test ! -s conftest.s$ac_file; then
3758 ac_more_lines=false
3759 rm -f conftest.s$ac_file
3760 else
3761 if test -z "$ac_sed_cmds"; then
3762 ac_sed_cmds="sed -f conftest.s$ac_file"
3763 else
3764 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3765 fi
3766 ac_file=`expr $ac_file + 1`
3767 ac_beg=$ac_end
3768 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3769 fi
3770done
3771if test -z "$ac_sed_cmds"; then
3772 ac_sed_cmds=cat
3773fi
3774EOF
3775
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003776cat >> $CONFIG_STATUS <<EOF
3777
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003778CONFIG_FILES=\${CONFIG_FILES-"Makefile \
3779 Objects/Makefile \
3780 Parser/Makefile \
3781 Python/Makefile \
3782 Modules/Makefile.pre"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003783EOF
3784cat >> $CONFIG_STATUS <<\EOF
3785for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003786 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003787 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003788 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003789 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3790 *) ac_file_in="${ac_file}.in" ;;
3791 esac
3792
Guido van Rossumf78abae1997-01-21 22:02:36 +00003793 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003794
3795 # Remove last slash and all that follows it. Not all systems have dirname.
3796 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3797 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3798 # The file is in a subdirectory.
3799 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003800 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003801 # A "../" for each directory in $ac_dir_suffix.
3802 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3803 else
3804 ac_dir_suffix= ac_dots=
3805 fi
3806
3807 case "$ac_given_srcdir" in
3808 .) srcdir=.
3809 if test -z "$ac_dots"; then top_srcdir=.
3810 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3811 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3812 *) # Relative path.
3813 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3814 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3815 esac
3816
Guido van Rossumf78abae1997-01-21 22:02:36 +00003817
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003818 echo creating "$ac_file"
3819 rm -f "$ac_file"
3820 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3821 case "$ac_file" in
3822 *Makefile*) ac_comsub="1i\\
3823# $configure_input" ;;
3824 *) ac_comsub= ;;
3825 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00003826
3827 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 +00003828 sed -e "$ac_comsub
3829s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003830s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003831s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00003832" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00003833fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00003834rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003836# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3837# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00003838#
3839# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003840ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3841ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003842ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003843ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003844# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003845ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3846ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003847ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003848ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003849# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003850ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3851ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003852ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003853ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003854
Guido van Rossumf78abae1997-01-21 22:02:36 +00003855if test "${CONFIG_HEADERS+set}" != set; then
3856EOF
3857cat >> $CONFIG_STATUS <<EOF
3858 CONFIG_HEADERS="config.h"
3859EOF
3860cat >> $CONFIG_STATUS <<\EOF
3861fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003863 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003865 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3867 *) ac_file_in="${ac_file}.in" ;;
3868 esac
3869
Guido van Rossum7f43da71994-08-01 12:15:30 +00003870 echo creating $ac_file
3871
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003872 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00003873 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3874 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003875
3876EOF
3877
3878# Transform confdefs.h into a sed script conftest.vals that substitutes
3879# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003880# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881# Protect against being in an unquoted here document in config.status.
3882rm -f conftest.vals
3883cat > conftest.hdr <<\EOF
3884s/[\\&%]/\\&/g
3885s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003886s%#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 +00003887s%ac_d%ac_u%gp
3888s%ac_u%ac_e%gp
3889EOF
3890sed -n -f conftest.hdr confdefs.h > conftest.vals
3891rm -f conftest.hdr
3892
3893# This sed command replaces #undef with comments. This is necessary, for
3894# example, in the case of _POSIX_SOURCE, which is predefined and required
3895# on some systems where configure will not decide to define it.
3896cat >> conftest.vals <<\EOF
3897s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3898EOF
3899
3900# Break up conftest.vals because some shells have a limit on
3901# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003902
3903rm -f conftest.tail
3904while :
3905do
3906 ac_lines=`grep -c . conftest.vals`
3907 # grep -c gives empty output for an empty file on some AIX systems.
3908 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3909 # Write a limited-size here document to conftest.frag.
3910 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3911 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3912 echo 'CEOF
3913 sed -f conftest.frag conftest.in > conftest.out
3914 rm -f conftest.in
3915 mv conftest.out conftest.in
3916' >> $CONFIG_STATUS
3917 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3918 rm -f conftest.vals
3919 mv conftest.tail conftest.vals
3920done
3921rm -f conftest.vals
3922
3923cat >> $CONFIG_STATUS <<\EOF
3924 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00003925 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003926 cat conftest.in >> conftest.h
3927 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00003928 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003929 echo "$ac_file is unchanged"
3930 rm -f conftest.h
3931 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003932 # Remove last slash and all that follows it. Not all systems have dirname.
3933 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3934 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3935 # The file is in a subdirectory.
3936 test ! -d "$ac_dir" && mkdir "$ac_dir"
3937 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003938 rm -f $ac_file
3939 mv conftest.h $ac_file
3940 fi
3941fi; done
3942
Guido van Rossumf78abae1997-01-21 22:02:36 +00003943EOF
3944cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003945
Guido van Rossumf78abae1997-01-21 22:02:36 +00003946EOF
3947cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003948
3949exit 0
3950EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003951chmod +x $CONFIG_STATUS
3952rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003953test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003954