blob: 99da8219f15fc530f03323053aa42db0bdb2fcfe [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 Rossum2b3ac691996-08-30 15:18:41 +00003# From configure.in Revision: 1.35
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006# Generated automatically using autoconf version 2.10
7# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017--with-next-archs='arch1 arch2 ..' build MAB binary"
18ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019--without-gcc never use gcc"
20ac_help="$ac_help
Guido van Rossuma68acba1996-07-31 17:36:39 +000021--with-libs='lib1 ...' link against additional libs"
22ac_help="$ac_help
Guido van Rossum2d38f911996-06-26 19:47:01 +000023--with-readline[=DIRECTORY] use GNU readline library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
25--with-thread[=DIRECTORY] make interpreter thread-safe"
26ac_help="$ac_help
27--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
28ac_help="$ac_help
29--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
30ac_help="$ac_help
31--with-libm=STRING math library"
32ac_help="$ac_help
33--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000034
Guido van Rossum7f43da71994-08-01 12:15:30 +000035# Initialize some variables set by options.
36# The variables have the same names as the options, with
37# dashes changed to underlines.
38build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000039cache_file=./config.cache
40exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000041host=NONE
42no_create=
43nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000044no_recursion=
45prefix=NONE
46program_prefix=NONE
47program_suffix=NONE
48program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000049silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000051srcdir=
52target=NONE
53verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000054x_includes=NONE
55x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000056bindir='${exec_prefix}/bin'
57sbindir='${exec_prefix}/sbin'
58libexecdir='${exec_prefix}/libexec'
59datadir='${prefix}/share'
60sysconfdir='${prefix}/etc'
61sharedstatedir='${prefix}/com'
62localstatedir='${prefix}/var'
63libdir='${exec_prefix}/lib'
64includedir='${prefix}/include'
65oldincludedir='/usr/include'
66infodir='${prefix}/info'
67mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068
69# Initialize some other variables.
70subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000071MFLAGS= MAKEFLAGS=
Guido van Rossum7f43da71994-08-01 12:15:30 +000072
73ac_prev=
74for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000075do
Guido van Rossum627b2d71993-12-24 10:39:16 +000076
Guido van Rossum7f43da71994-08-01 12:15:30 +000077 # If the previous option needs an argument, assign it.
78 if test -n "$ac_prev"; then
79 eval "$ac_prev=\$ac_option"
80 ac_prev=
81 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000082 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000083
Guido van Rossum7f43da71994-08-01 12:15:30 +000084 case "$ac_option" in
85 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
86 *) ac_optarg= ;;
87 esac
88
Guido van Rossum76be6ed1995-01-02 18:33:54 +000089 # Accept the important Cygnus configure options, so we can diagnose typos.
90
Guido van Rossum7f43da71994-08-01 12:15:30 +000091 case "$ac_option" in
92
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000093 -bindir | --bindir | --bindi | --bind | --bin | --bi)
94 ac_prev=bindir ;;
95 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
96 bindir="$ac_optarg" ;;
97
98 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +000099 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000100 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000101 build="$ac_optarg" ;;
102
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000103 -cache-file | --cache-file | --cache-fil | --cache-fi \
104 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
105 ac_prev=cache_file ;;
106 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
107 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
108 cache_file="$ac_optarg" ;;
109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000110 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111 ac_prev=datadir ;;
112 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113 | --da=*)
114 datadir="$ac_optarg" ;;
115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 -disable-* | --disable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000118 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000119 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000121 fi
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 eval "enable_${ac_feature}=no" ;;
124
125 -enable-* | --enable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000127 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000128 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000130 fi
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 case "$ac_option" in
133 *=*) ;;
134 *) ac_optarg=yes ;;
135 esac
136 eval "enable_${ac_feature}='$ac_optarg'" ;;
137
Guido van Rossum7f43da71994-08-01 12:15:30 +0000138 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
139 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
140 | --exec | --exe | --ex)
141 ac_prev=exec_prefix ;;
142 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
143 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
144 | --exec=* | --exe=* | --ex=*)
145 exec_prefix="$ac_optarg" ;;
146
147 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Obsolete; use --with-gas.
149 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000150
151 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000152 # Omit some internal or obsolete options to make the list less imposing.
153 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000154 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000155Usage: configure [options] [host]
156Options: [defaults in brackets after descriptions]
157Configuration:
158 --cache-file=FILE cache test results in FILE
159 --help print this message
160 --no-create do not create output files
161 --quiet, --silent do not print \`checking...' messages
162 --version print the version of autoconf that created configure
163Directory and file names:
164 --prefix=PREFIX install architecture-independent files in PREFIX
165 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000166 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000167 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000168 --bindir=DIR user executables in DIR [EPREFIX/bin]
169 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
170 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
171 --datadir=DIR read-only architecture-independent data in DIR
172 [PREFIX/share]
173 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
174 --sharedstatedir=DIR modifiable architecture-independent data in DIR
175 [PREFIX/com]
176 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
177 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
178 --includedir=DIR C header files in DIR [PREFIX/include]
179 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
180 --infodir=DIR info documentation in DIR [PREFIX/info]
181 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182 --srcdir=DIR find the sources in DIR [configure dir or ..]
183 --program-prefix=PREFIX prepend PREFIX to installed program names
184 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000185 --program-transform-name=PROGRAM
186 run sed PROGRAM on installed program names
187EOF
188 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000189Host type:
190 --build=BUILD configure for building on BUILD [BUILD=HOST]
191 --host=HOST configure for HOST [guessed]
192 --target=TARGET configure for TARGET [TARGET=HOST]
193Features and packages:
194 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
195 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
196 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
197 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
198 --x-includes=DIR X include files are in DIR
199 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000200EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000201 if test -n "$ac_help"; then
202 echo "--enable and --with options recognized:$ac_help"
203 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000204 exit 0 ;;
205
206 -host | --host | --hos | --ho)
207 ac_prev=host ;;
208 -host=* | --host=* | --hos=* | --ho=*)
209 host="$ac_optarg" ;;
210
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000211 -includedir | --includedir | --includedi | --included | --include \
212 | --includ | --inclu | --incl | --inc)
213 ac_prev=includedir ;;
214 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
215 | --includ=* | --inclu=* | --incl=* | --inc=*)
216 includedir="$ac_optarg" ;;
217
218 -infodir | --infodir | --infodi | --infod | --info | --inf)
219 ac_prev=infodir ;;
220 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
221 infodir="$ac_optarg" ;;
222
223 -libdir | --libdir | --libdi | --libd)
224 ac_prev=libdir ;;
225 -libdir=* | --libdir=* | --libdi=* | --libd=*)
226 libdir="$ac_optarg" ;;
227
228 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
229 | --libexe | --libex | --libe)
230 ac_prev=libexecdir ;;
231 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
232 | --libexe=* | --libex=* | --libe=*)
233 libexecdir="$ac_optarg" ;;
234
235 -localstatedir | --localstatedir | --localstatedi | --localstated \
236 | --localstate | --localstat | --localsta | --localst \
237 | --locals | --local | --loca | --loc | --lo)
238 ac_prev=localstatedir ;;
239 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
240 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
241 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
242 localstatedir="$ac_optarg" ;;
243
244 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
245 ac_prev=mandir ;;
246 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
247 mandir="$ac_optarg" ;;
248
Guido van Rossum7f43da71994-08-01 12:15:30 +0000249 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000250 # Obsolete; use --without-fp.
251 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000252
253 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
254 | --no-cr | --no-c)
255 no_create=yes ;;
256
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000257 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
258 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000260
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000261 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
262 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
263 | --oldin | --oldi | --old | --ol | --o)
264 ac_prev=oldincludedir ;;
265 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
266 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
267 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
268 oldincludedir="$ac_optarg" ;;
269
Guido van Rossum7f43da71994-08-01 12:15:30 +0000270 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
271 ac_prev=prefix ;;
272 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
273 prefix="$ac_optarg" ;;
274
275 -program-prefix | --program-prefix | --program-prefi | --program-pref \
276 | --program-pre | --program-pr | --program-p)
277 ac_prev=program_prefix ;;
278 -program-prefix=* | --program-prefix=* | --program-prefi=* \
279 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
280 program_prefix="$ac_optarg" ;;
281
282 -program-suffix | --program-suffix | --program-suffi | --program-suff \
283 | --program-suf | --program-su | --program-s)
284 ac_prev=program_suffix ;;
285 -program-suffix=* | --program-suffix=* | --program-suffi=* \
286 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
287 program_suffix="$ac_optarg" ;;
288
289 -program-transform-name | --program-transform-name \
290 | --program-transform-nam | --program-transform-na \
291 | --program-transform-n | --program-transform- \
292 | --program-transform | --program-transfor \
293 | --program-transfo | --program-transf \
294 | --program-trans | --program-tran \
295 | --progr-tra | --program-tr | --program-t)
296 ac_prev=program_transform_name ;;
297 -program-transform-name=* | --program-transform-name=* \
298 | --program-transform-nam=* | --program-transform-na=* \
299 | --program-transform-n=* | --program-transform-=* \
300 | --program-transform=* | --program-transfor=* \
301 | --program-transfo=* | --program-transf=* \
302 | --program-trans=* | --program-tran=* \
303 | --progr-tra=* | --program-tr=* | --program-t=*)
304 program_transform_name="$ac_optarg" ;;
305
306 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
307 | -silent | --silent | --silen | --sile | --sil)
308 silent=yes ;;
309
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000310 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
311 ac_prev=sbindir ;;
312 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
313 | --sbi=* | --sb=*)
314 sbindir="$ac_optarg" ;;
315
316 -sharedstatedir | --sharedstatedir | --sharedstatedi \
317 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
318 | --sharedst | --shareds | --shared | --share | --shar \
319 | --sha | --sh)
320 ac_prev=sharedstatedir ;;
321 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
322 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
323 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
324 | --sha=* | --sh=*)
325 sharedstatedir="$ac_optarg" ;;
326
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000327 -site | --site | --sit)
328 ac_prev=site ;;
329 -site=* | --site=* | --sit=*)
330 site="$ac_optarg" ;;
331
Guido van Rossum7f43da71994-08-01 12:15:30 +0000332 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
333 ac_prev=srcdir ;;
334 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
335 srcdir="$ac_optarg" ;;
336
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000337 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
338 | --syscon | --sysco | --sysc | --sys | --sy)
339 ac_prev=sysconfdir ;;
340 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
341 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
342 sysconfdir="$ac_optarg" ;;
343
Guido van Rossum7f43da71994-08-01 12:15:30 +0000344 -target | --target | --targe | --targ | --tar | --ta | --t)
345 ac_prev=target ;;
346 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
347 target="$ac_optarg" ;;
348
349 -v | -verbose | --verbose | --verbos | --verbo | --verb)
350 verbose=yes ;;
351
352 -version | --version | --versio | --versi | --vers)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000353 echo "configure generated by autoconf version 2.10"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354 exit 0 ;;
355
356 -with-* | --with-*)
357 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000358 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000361 fi
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 case "$ac_option" in
364 *=*) ;;
365 *) ac_optarg=yes ;;
366 esac
367 eval "with_${ac_package}='$ac_optarg'" ;;
368
369 -without-* | --without-*)
370 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000371 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000372 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 fi
375 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 eval "with_${ac_package}=no" ;;
377
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000378 --x)
379 # Obsolete; use --with-x.
380 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381
382 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
383 | --x-incl | --x-inc | --x-in | --x-i)
384 ac_prev=x_includes ;;
385 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
386 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
387 x_includes="$ac_optarg" ;;
388
389 -x-libraries | --x-libraries | --x-librarie | --x-librari \
390 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
391 ac_prev=x_libraries ;;
392 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
393 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
394 x_libraries="$ac_optarg" ;;
395
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000396 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000397 ;;
398
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000399 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000400 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000401 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000403 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000404 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000405 fi
406 nonopt="$ac_option"
407 ;;
408
409 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000410done
411
Guido van Rossum7f43da71994-08-01 12:15:30 +0000412if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000414fi
415
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000416trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000418# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000419# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000420# 1 file creation
421# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000422# 3 some systems may open it to /dev/tty
423# 4 used on the Kubota Titan
424# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000425# 5 compiler messages saved in config.log
426if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000427 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000429 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430fi
431exec 5>./config.log
432
433echo "\
434This file contains any messages produced by compilers while
435running configure, to aid debugging if configure makes a mistake.
436" 1>&5
437
438# Strip out --no-create and --no-recursion so they do not pile up.
439# Also quote any args containing shell metacharacters.
440ac_configure_args=
441for ac_arg
442do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000443 case "$ac_arg" in
444 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
445 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000446 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
447 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
448 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
449 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
450 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000451 esac
452done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000453
454# NLS nuisances.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455# Only set LANG and LC_ALL to C if already set.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000456# These must not be set unconditionally because not all systems understand
457# e.g. LANG=C (notably SCO).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000458if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
459if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000460
Guido van Rossum7f43da71994-08-01 12:15:30 +0000461# confdefs.h avoids OS command line length limits that DEFS can exceed.
462rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000463# AIX cpp loses on an empty file, so make sure it contains at least a newline.
464echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000465
466# A filename unique to this package, relative to the directory that
467# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000468ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000469
470# Find the source files, if location was not specified.
471if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000473 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000474 ac_prog=$0
475 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
476 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
477 srcdir=$ac_confdir
478 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000479 srcdir=..
480 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481else
482 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000484if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000485 if test "$ac_srcdir_defaulted" = yes; then
486 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000489 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000490fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
492
493# Prefer explicitly selected file to automatically selected ones.
494if test -z "$CONFIG_SITE"; then
495 if test "x$prefix" != xNONE; then
496 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
497 else
498 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 fi
500fi
501for ac_site_file in $CONFIG_SITE; do
502 if test -r "$ac_site_file"; then
503 echo "loading site script $ac_site_file"
504 . "$ac_site_file"
505 fi
506done
507
508if test -r "$cache_file"; then
509 echo "loading cache $cache_file"
510 . $cache_file
511else
512 echo "creating cache $cache_file"
513 > $cache_file
514fi
515
Guido van Rossum7f43da71994-08-01 12:15:30 +0000516ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000517# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000519ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
520ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000521
522if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
523 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
524 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
525 ac_n= ac_c='
526' ac_t=' '
527 else
528 ac_n=-n ac_c= ac_t=
529 fi
530else
531 ac_n= ac_c='\c' ac_t=
532fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000533
Guido van Rossum0a516c91994-09-12 10:58:40 +0000534
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000535
Guido van Rossum627b2d71993-12-24 10:39:16 +0000536
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000537# NEXTSTEP stuff
538echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
539# Check whether --with-next-archs or --without-next-archs was given.
540if test "${with_next_archs+set}" = set; then
541 withval="$with_next_archs"
542
543 if test -n "$withval"; then
544 ac_sys_cpu=_`/usr/lib/arch_tool -choose_obj_dir $withval`
545 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
546 else
547 ac_sys_cpu=_`arch`
548 fi
549
550fi
551
552echo "$ac_t""$with_next_archs" 1>&6
553
554# Set name for machine-dependent library files
555
556echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
557if test -z "$MACHDEP"
558then
559 if test -f /usr/lib/NextStep/software_version; then
560 set X `hostinfo | grep 'NeXT Mach.*:' | \
561 sed -e 's/://' -e 's/\./_/'` && \
562 ac_sys_system=next && ac_sys_release=$4
563 MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
564 else
565 ac_sys_system=`uname -s`
Guido van Rossum42dcad31996-07-31 22:48:44 +0000566 if test "$ac_sys_system" = "AIX" ; then
567 ac_sys_release=`uname -v`
568 else
569 ac_sys_release=`uname -r`
570 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000571 ac_md_system=`echo $ac_sys_system |
572 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
573 ac_md_release=`echo $ac_sys_release |
574 tr -d '/ ' | sed 's/\..*//'`
575 MACHDEP="$ac_md_system$ac_md_release"
576 fi
577 case MACHDEP in
578 '') MACHDEP=unknown;;
579 esac
580fi
581echo "$ac_t""$MACHDEP" 1>&6
582
Guido van Rossum627b2d71993-12-24 10:39:16 +0000583# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000584echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000585# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000586if test "${with_gcc+set}" = set; then
587 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000588
589 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000590 no) CC=cc
591 without_gcc=yes;;
592 yes) CC=gcc
593 without_gcc=no;;
594 *) CC=$withval
595 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000596 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000597else
Guido van Rossume77438c1995-09-13 18:59:59 +0000598
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000599 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000600 OSF1) CC=cc
601 without_gcc=;;
602 *) without_gcc=no;;
603 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604fi
605
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000606echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000607
Guido van Rossum8b131c51995-03-09 14:10:13 +0000608# If the user switches compilers, we can't believe the cache
609if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
610then
611 { echo "configure: error: cached CC is different -- throw away $cache_file
612(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
613fi
614
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000615# Extract the first word of "gcc", so it can be a program name with args.
616set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000617echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
618if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
619 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000620else
621 if test -n "$CC"; then
622 ac_cv_prog_CC="$CC" # Let the user override the test.
623else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000624 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
625 for ac_dir in $PATH; do
626 test -z "$ac_dir" && ac_dir=.
627 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000628 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000629 break
630 fi
631 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000632 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000633fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000634fi
635CC="$ac_cv_prog_CC"
636if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000637 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000638else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000639 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000640fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000641
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000642if test -z "$CC"; then
643 # Extract the first word of "cc", so it can be a program name with args.
644set dummy cc; ac_word=$2
645echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
646if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
647 echo $ac_n "(cached) $ac_c" 1>&6
648else
649 if test -n "$CC"; then
650 ac_cv_prog_CC="$CC" # Let the user override the test.
651else
652 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
653 ac_prog_rejected=no
654 for ac_dir in $PATH; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
690fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000691
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000692echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
693if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
694 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000695else
696 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000697#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000698 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000699#endif
700EOF
Guido van Rossum42dcad31996-07-31 22:48:44 +0000701if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000702 ac_cv_prog_gcc=yes
703else
704 ac_cv_prog_gcc=no
705fi
706fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000707
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000708echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000709if test $ac_cv_prog_gcc = yes; then
710 GCC=yes
711 if test "${CFLAGS+set}" != set; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000712 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
713if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
714 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715else
716 echo 'void f(){}' > conftest.c
717if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
718 ac_cv_prog_gcc_g=yes
719else
720 ac_cv_prog_gcc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721fi
722rm -f conftest*
723
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000724fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000725
726echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000727 if test $ac_cv_prog_gcc_g = yes; then
728 CFLAGS="-g -O"
729 else
730 CFLAGS="-O"
731 fi
732 fi
733else
734 GCC=
735 test "${CFLAGS+set}" = set || CFLAGS="-g"
736fi
737
738# Extract the first word of "ranlib", so it can be a program name with args.
739set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000740echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
741if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
742 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000743else
744 if test -n "$RANLIB"; then
745 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
746else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
748 for ac_dir in $PATH; do
749 test -z "$ac_dir" && ac_dir=.
750 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000751 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000752 break
753 fi
754 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000757fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758fi
759RANLIB="$ac_cv_prog_RANLIB"
760if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000761 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000762else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000763 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000765
766
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767for ac_prog in ar aal
768do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769# Extract the first word of "$ac_prog", so it can be a program name with args.
770set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000771echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
772if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
773 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000774else
775 if test -n "$AR"; then
776 ac_cv_prog_AR="$AR" # Let the user override the test.
777else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000778 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
779 for ac_dir in $PATH; do
780 test -z "$ac_dir" && ac_dir=.
781 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783 break
784 fi
785 done
786 IFS="$ac_save_ifs"
787fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788fi
789AR="$ac_cv_prog_AR"
790if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000791 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000793 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795
796test -n "$AR" && break
797done
798test -n "$AR" || AR="ar"
799
800
Guido van Rossumda88dad1995-01-26 00:46:29 +0000801
802
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000803# Install just never works :-(
804if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000805then
806 INSTALL=cp
807 INSTALL_PROGRAM=cp
808 INSTALL_DATA=cp
809else
810 INSTALL_PROGRAM="$INSTALL"
811 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000812fi
813
814# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000815
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000816if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000817then
818 case $ac_sys_system in
Guido van Rossuma68acba1996-07-31 17:36:39 +0000819 NeXT|next) OPT="-g -Wall -O3 -fomit-frame-pointer";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000820 *) OPT="-O";;
821 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000822fi
823
Guido van Rossuma68acba1996-07-31 17:36:39 +0000824if test -z "$ac_arch_flags"
825then
826 OPT="$OPT $ac_arch_flags"
827fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000829echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830# On Suns, sometimes $CPP names a directory.
831if test -n "$CPP" && test -d "$CPP"; then
832 CPP=
833fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000835if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
836 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837else
838 # This must be in double quotes, not single quotes, because CPP may get
839 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841 # On the NeXT, cc -E runs the code through the compiler's parser,
842 # not just through cpp.
843 cat > conftest.$ac_ext <<EOF
Guido van Rossum42dcad31996-07-31 22:48:44 +0000844#line 845 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000845#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000847Syntax Error
848EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum42dcad31996-07-31 22:48:44 +0000850{ (eval echo configure:851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852if test -z "$ac_err"; then
853 :
854else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855 echo "$ac_err" >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 rm -rf conftest*
857 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858 cat > conftest.$ac_ext <<EOF
Guido van Rossum42dcad31996-07-31 22:48:44 +0000859#line 860 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862Syntax Error
863EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum42dcad31996-07-31 22:48:44 +0000865{ (eval echo configure:866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000868 :
869else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871 rm -rf conftest*
872 CPP=/lib/cpp
873fi
874rm -f conftest*
875fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878fi
Guido van Rossume77438c1995-09-13 18:59:59 +0000879 CPP="$ac_cv_prog_CPP"
880else
881 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000883echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000884
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000885echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886cat > conftest.$ac_ext <<EOF
Guido van Rossum42dcad31996-07-31 22:48:44 +0000887#line 888 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000888#include "confdefs.h"
889#ifdef _AIX
890 yes
891#endif
892
893EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
895 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000896 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000897 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898#define _ALL_SOURCE 1
899EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901else
902 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000903 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904fi
905rm -f conftest*
906
907
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908ac_safe=`echo "minix/config.h" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000909echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
910if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
911 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912else
913 cat > conftest.$ac_ext <<EOF
Guido van Rossum42dcad31996-07-31 22:48:44 +0000914#line 915 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915#include "confdefs.h"
916#include <minix/config.h>
917EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum42dcad31996-07-31 22:48:44 +0000919{ (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000924else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 echo "$ac_err" >&5
926 rm -rf conftest*
927 eval "ac_cv_header_$ac_safe=no"
928fi
929rm -f conftest*
930fi
931if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000932 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933 MINIX=yes
934else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000935 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +0000937fi
938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939if test "$MINIX" = yes; then
940 cat >> confdefs.h <<\EOF
941#define _POSIX_SOURCE 1
942EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 cat >> confdefs.h <<\EOF
945#define _POSIX_1_SOURCE 2
946EOF
947
948 cat >> confdefs.h <<\EOF
949#define _MINIX 1
950EOF
951
952fi
953
Guido van Rossumda88dad1995-01-26 00:46:29 +0000954
Guido van Rossum84e7b241996-08-19 21:59:00 +0000955# check for ANSI or K&R ("traditional") preprocessor
956echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
957cat > conftest.$ac_ext <<EOF
958#line 959 "configure"
959#include "confdefs.h"
960
961#define spam(name, doc) {#name, &name, #name "() -- " doc}
962int foo;
963struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
964
965int main() { return 0; }
966int t() {
967;
968; return 0; }
969EOF
970if { (eval echo configure:971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
971 rm -rf conftest*
972 cpp_type=ansi
973else
974 rm -rf conftest*
975 cat >> confdefs.h <<\EOF
976#define HAVE_OLD_CPP 1
977EOF
978 cpp_type=traditional
979fi
980rm -f conftest*
981
982echo "$ac_t""$cpp_type" 1>&6
983
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000984# checks for header files
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985# If we cannot run a trivial program, we must be cross compiling.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000986echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
987if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
988 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989else
990 if test "$cross_compiling" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000991 ac_cv_c_cross=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992else
993cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +0000994#line 995 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995#include "confdefs.h"
996main(){return(0);}
997EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +0000998{ (eval echo configure:999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999if test -s conftest && (./conftest; exit) 2>/dev/null; then
1000 ac_cv_c_cross=no
1001else
1002 ac_cv_c_cross=yes
1003fi
1004fi
1005rm -fr conftest*
1006fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001008echo "$ac_t""$ac_cv_c_cross" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009cross_compiling=$ac_cv_c_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001011echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1012if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1013 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014else
1015 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001016#line 1017 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017#include "confdefs.h"
1018#include <stdlib.h>
1019#include <stdarg.h>
1020#include <string.h>
1021#include <float.h>
1022EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001024{ (eval echo configure:1025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001027 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001028 ac_cv_header_stdc=yes
1029else
1030 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001031 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032 ac_cv_header_stdc=no
1033fi
1034rm -f conftest*
1035
1036if test $ac_cv_header_stdc = yes; then
1037 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1038cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001039#line 1040 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040#include "confdefs.h"
1041#include <string.h>
1042EOF
1043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1044 egrep "memchr" >/dev/null 2>&1; then
1045 :
1046else
1047 rm -rf conftest*
1048 ac_cv_header_stdc=no
1049fi
1050rm -f conftest*
1051
1052fi
1053
1054if test $ac_cv_header_stdc = yes; then
1055 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1056cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001057#line 1058 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001058#include "confdefs.h"
1059#include <stdlib.h>
1060EOF
1061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1062 egrep "free" >/dev/null 2>&1; then
1063 :
1064else
1065 rm -rf conftest*
1066 ac_cv_header_stdc=no
1067fi
1068rm -f conftest*
1069
1070fi
1071
1072if test $ac_cv_header_stdc = yes; then
1073 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1074if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076else
1077cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001078#line 1079 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001079#include "confdefs.h"
1080#include <ctype.h>
1081#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1082#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001084int main () { int i; for (i = 0; i < 256; i++)
1085if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1086exit (0); }
1087
1088EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001089{ (eval echo configure:1090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001090if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091 :
1092else
1093 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001094fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001096rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097fi
1098fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001100echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101if test $ac_cv_header_stdc = yes; then
1102 cat >> confdefs.h <<\EOF
1103#define STDC_HEADERS 1
1104EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001105
1106fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001107
Guido van Rossum2d38f911996-06-26 19:47:01 +00001108for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h \
1109signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossum22b6db61996-06-28 20:18:10 +00001110sys/audioio.h sys/lock.h sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001111sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001112do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001113ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001114echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1115if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1116 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117else
1118 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001119#line 1120 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001120#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001124{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128 eval "ac_cv_header_$ac_safe=yes"
1129else
1130 echo "$ac_err" >&5
1131 rm -rf conftest*
1132 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001133fi
1134rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135fi
1136if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001137 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 cat >> confdefs.h <<EOF
1140#define $ac_tr_hdr 1
1141EOF
1142
1143else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001144 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146done
1147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148ac_header_dirent=no
1149for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1150do
1151ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001152echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1153if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1154 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001155else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001157#line 1158 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158#include "confdefs.h"
1159#include <sys/types.h>
1160#include <$ac_hdr>
1161int main() { return 0; }
1162int t() {
1163DIR *dirp = 0;
1164; return 0; }
1165EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001166if { (eval echo configure:1167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 rm -rf conftest*
1168 eval "ac_cv_header_dirent_$ac_safe=yes"
1169else
1170 rm -rf conftest*
1171 eval "ac_cv_header_dirent_$ac_safe=no"
1172fi
1173rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001174
1175fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001177 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179 cat >> confdefs.h <<EOF
1180#define $ac_tr_hdr 1
1181EOF
1182 ac_header_dirent=$ac_hdr; break
1183else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001184 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185fi
1186done
1187# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1188if test $ac_header_dirent = dirent.h; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001189echo $ac_n "checking for -ldir""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001190ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
1191if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001192 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193else
1194 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001195LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001197#line 1198 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001199/* Override any gcc2 internal prototype to avoid an error. */
1200/* We use char because int might match the return type of a gcc2
1201 builtin and then its argument prototype would still apply. */
1202char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203
1204int main() { return 0; }
1205int t() {
1206opendir()
1207; return 0; }
1208EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001209if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001211 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001214 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215fi
1216rm -f conftest*
1217LIBS="$ac_save_LIBS"
1218
1219fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001220if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001221 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 LIBS="$LIBS -ldir"
1223else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001224 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225fi
1226
1227else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001228echo $ac_n "checking for -lx""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001229ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
1230if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001231 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232else
1233 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001234LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001236#line 1237 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001238/* Override any gcc2 internal prototype to avoid an error. */
1239/* We use char because int might match the return type of a gcc2
1240 builtin and then its argument prototype would still apply. */
1241char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
1243int main() { return 0; }
1244int t() {
1245opendir()
1246; return 0; }
1247EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001248if { (eval echo configure:1249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001250 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001251else
1252 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001253 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001254fi
1255rm -f conftest*
1256LIBS="$ac_save_LIBS"
1257
1258fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001260 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001261 LIBS="$LIBS -lx"
1262else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001263 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001264fi
1265
1266fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267
1268
1269# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001270was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001271echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001273#line 1274 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274#include "confdefs.h"
1275#include <time.h>
1276EOF
1277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1278 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001279 rm -rf conftest*
1280 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281else
1282 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283 cat >> confdefs.h <<\EOF
1284#define clock_t long
1285EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286
1287fi
1288rm -f conftest*
1289
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001290echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001291
Guido van Rossum84e7b241996-08-19 21:59:00 +00001292# Add some code to confdefs.h so that the test for off_t works on SCO
1293cat >> confdefs.h <<\EOF
1294#if defined(SCO_DS)
1295#undef _OFF_T
1296#endif
1297EOF
1298
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001299echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1300if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1301 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302else
1303 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001304#line 1305 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305#include "confdefs.h"
1306#include <sys/types.h>
1307#if STDC_HEADERS
1308#include <stdlib.h>
1309#endif
1310EOF
1311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1312 egrep "mode_t" >/dev/null 2>&1; then
1313 rm -rf conftest*
1314 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315else
1316 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318fi
1319rm -f conftest*
1320
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001321fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001322echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323if test $ac_cv_type_mode_t = no; then
1324 cat >> confdefs.h <<\EOF
1325#define mode_t int
1326EOF
1327
1328fi
1329
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001330echo $ac_n "checking for off_t""... $ac_c" 1>&6
1331if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1332 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333else
1334 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001335#line 1336 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336#include "confdefs.h"
1337#include <sys/types.h>
1338#if STDC_HEADERS
1339#include <stdlib.h>
1340#endif
1341EOF
1342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1343 egrep "off_t" >/dev/null 2>&1; then
1344 rm -rf conftest*
1345 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346else
1347 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001348 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001349fi
1350rm -f conftest*
1351
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001353echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354if test $ac_cv_type_off_t = no; then
1355 cat >> confdefs.h <<\EOF
1356#define off_t long
1357EOF
1358
1359fi
1360
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001361echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1362if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1363 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001366#line 1367 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367#include "confdefs.h"
1368#include <sys/types.h>
1369#if STDC_HEADERS
1370#include <stdlib.h>
1371#endif
1372EOF
1373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1374 egrep "pid_t" >/dev/null 2>&1; then
1375 rm -rf conftest*
1376 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377else
1378 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001379 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001380fi
1381rm -f conftest*
1382
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001384echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001385if test $ac_cv_type_pid_t = no; then
1386 cat >> confdefs.h <<\EOF
1387#define pid_t int
1388EOF
1389
1390fi
1391
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001392echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1393if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1394 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395else
1396 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001397#line 1398 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001398#include "confdefs.h"
1399#include <sys/types.h>
1400#include <signal.h>
1401#ifdef signal
1402#undef signal
1403#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001404#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001405extern "C" void (*signal (int, void (*)(int)))(int);
1406#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001407void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001408#endif
1409
Guido van Rossum7f43da71994-08-01 12:15:30 +00001410int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001411int t() {
1412int i;
1413; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001414EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001415if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001416 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001417 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001418else
1419 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001420 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001421fi
1422rm -f conftest*
1423
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001424fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001425
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001426echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001427cat >> confdefs.h <<EOF
1428#define RETSIGTYPE $ac_cv_type_signal
1429EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001430
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001431
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001432echo $ac_n "checking for size_t""... $ac_c" 1>&6
1433if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1434 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001435else
1436 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001437#line 1438 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001438#include "confdefs.h"
1439#include <sys/types.h>
1440#if STDC_HEADERS
1441#include <stdlib.h>
1442#endif
1443EOF
1444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1445 egrep "size_t" >/dev/null 2>&1; then
1446 rm -rf conftest*
1447 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001448else
1449 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001451fi
1452rm -f conftest*
1453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001454fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001455echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001456if test $ac_cv_type_size_t = no; then
1457 cat >> confdefs.h <<\EOF
1458#define size_t unsigned
1459EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001460
1461fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001462
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001463echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1464if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1465 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001466else
1467 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001468#line 1469 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001469#include "confdefs.h"
1470#include <sys/types.h>
1471EOF
1472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1473 egrep "uid_t" >/dev/null 2>&1; then
1474 rm -rf conftest*
1475 ac_cv_type_uid_t=yes
1476else
1477 rm -rf conftest*
1478 ac_cv_type_uid_t=no
1479fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001480rm -f conftest*
1481
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001482fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001483
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001484echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001485if test $ac_cv_type_uid_t = no; then
1486 cat >> confdefs.h <<\EOF
1487#define uid_t int
1488EOF
1489
1490 cat >> confdefs.h <<\EOF
1491#define gid_t int
1492EOF
1493
1494fi
1495
Guido van Rossum627b2d71993-12-24 10:39:16 +00001496
Guido van Rossum0a516c91994-09-12 10:58:40 +00001497
1498# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001499
1500
1501
1502
Guido van Rossum0a516c91994-09-12 10:58:40 +00001503# SO is the extension of shared libraries `(including the dot!)
1504# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001505echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001506if test -z "$SO"
1507then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001508 case $ac_sys_system in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001509 hp*|HP*) SO=.sl;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001510 NeXT|next) SO=.a;; # no shared libs on NeXT 3.3 and less
Guido van Rossum0a516c91994-09-12 10:58:40 +00001511 *) SO=.so;;
1512 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001513fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001514echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001515# LDSHARED is the ld *command* used to create shared library
1516# -- "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 +00001517echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001518if test -z "$LDSHARED"
1519then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001520 case $ac_sys_system/$ac_sys_release in
Guido van Rossum84e7b241996-08-19 21:59:00 +00001521 AIX*) LDSHARED="ld_so_aix \$(CC)";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001522 IRIX*) LDSHARED="ld -shared";;
1523 SunOS/4*) LDSHARED="ld";;
1524 SunOS/5*) LDSHARED="ld -G";;
1525 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001526 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1527 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001528 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001529 FreeBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001530 NeXT|next/3*) LDSHARED="ld -u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001531 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001532 *) LDSHARED="ld";;
1533 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001534fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001535echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001536# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001537# library -- this is only needed for a few systems
1538echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001539if test -z "$CCSHARED"
1540then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001541 case $ac_sys_system in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001542 hp*|HP*) if test "$GCC" = yes;
1543 then CCSHARED="-fpic";
1544 else CCSHARED="+z";
1545 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001546 Linux*) CCSHARED="-fpic";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001547 FreeBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001548 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001549 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001550fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001551echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001552# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001553# the python executable -- this is only needed for a few systems
1554echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001555if test -z "$LINKFORSHARED"
1556then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001557 case $ac_sys_system in
Guido van Rossum42dcad31996-07-31 22:48:44 +00001558 AIX*) LINKFORSHARED="-Wl,-bE:python.exp";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001559 hp*|HP*) LINKFORSHARED="-Wl,-E";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001560 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001561 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001562 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001563fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001564echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001565
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566# checks for libraries
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001567echo $ac_n "checking for -ldl""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001568ac_lib_var=`echo dl'_'dlopen | tr './+\055' '__p_'`
1569if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001570 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001571else
1572 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001573LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001574cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001575#line 1576 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001576#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001577/* Override any gcc2 internal prototype to avoid an error. */
1578/* We use char because int might match the return type of a gcc2
1579 builtin and then its argument prototype would still apply. */
1580char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001581
Guido van Rossum7f43da71994-08-01 12:15:30 +00001582int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583int t() {
1584dlopen()
1585; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001586EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001587if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001588 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001589 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001590else
1591 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001592 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001593fi
1594rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001595LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001596
Guido van Rossum627b2d71993-12-24 10:39:16 +00001597fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001598if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001599 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001600 ac_tr_lib=HAVE_LIB`echo dl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001601 cat >> confdefs.h <<EOF
1602#define $ac_tr_lib 1
1603EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001604
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001605 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001606
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001608 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609fi
1610 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001611echo $ac_n "checking for -ldld""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001612ac_lib_var=`echo dld'_'shl_load | tr './+\055' '__p_'`
1613if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001614 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001615else
1616 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001617LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001618cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001619#line 1620 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001620#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001621/* Override any gcc2 internal prototype to avoid an error. */
1622/* We use char because int might match the return type of a gcc2
1623 builtin and then its argument prototype would still apply. */
1624char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001625
Guido van Rossum7f43da71994-08-01 12:15:30 +00001626int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001627int t() {
1628shl_load()
1629; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001630EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001631if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001632 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001633 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634else
1635 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001636 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001637fi
1638rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001639LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001640
Guido van Rossum627b2d71993-12-24 10:39:16 +00001641fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001642if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001643 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001644 ac_tr_lib=HAVE_LIB`echo dld | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001645 cat >> confdefs.h <<EOF
1646#define $ac_tr_lib 1
1647EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001648
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001649 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650
1651else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001652 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653fi
1654 # Dynamic linking for HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001655echo $ac_n "checking for -lsun""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001656ac_lib_var=`echo sun'_'getpwnam | tr './+\055' '__p_'`
1657if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001658 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001659else
1660 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001661LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001663#line 1664 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001664#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001665/* Override any gcc2 internal prototype to avoid an error. */
1666/* We use char because int might match the return type of a gcc2
1667 builtin and then its argument prototype would still apply. */
1668char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001669
1670int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671int t() {
1672getpwnam()
1673; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001674EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001675if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001676 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001677 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678else
1679 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001680 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001681fi
1682rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001684
Guido van Rossum7f43da71994-08-01 12:15:30 +00001685fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001686if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001687 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001688 ac_tr_lib=HAVE_LIB`echo sun | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 cat >> confdefs.h <<EOF
1690#define $ac_tr_lib 1
1691EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001692
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001693 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694
1695else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001696 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697fi
1698 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001699# The following three (nsl,inet,socket) are needed on Sequent;
1700# the order of checking must be this. Most SVR4 platforms will
1701# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1702# broken. I see no elegant solution (probably CHECK_LIB should be
1703# fixed to only add the library if the given entry point is not
1704# satisfied without it).
Guido van Rossum2b3ac691996-08-30 15:18:41 +00001705if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00001706then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001707echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001708ac_lib_var=`echo nsl'_'t_open | tr './+\055' '__p_'`
1709if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001710 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001711else
1712 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001713LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001714cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001715#line 1716 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001716#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001717/* Override any gcc2 internal prototype to avoid an error. */
1718/* We use char because int might match the return type of a gcc2
1719 builtin and then its argument prototype would still apply. */
1720char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001721
1722int main() { return 0; }
1723int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001724t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001725; return 0; }
1726EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001727if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001728 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001729 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001730else
1731 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001732 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001733fi
1734rm -f conftest*
1735LIBS="$ac_save_LIBS"
1736
1737fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001738if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001739 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001740 LIBS="-lnsl $LIBS"
1741else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001742 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001743fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001744 # SVR4
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001745echo $ac_n "checking for -linet""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001746ac_lib_var=`echo inet'_'gethostbyname | tr './+\055' '__p_'`
1747if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001748 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001749else
1750 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001751LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001752cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001753#line 1754 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001754#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001755/* Override any gcc2 internal prototype to avoid an error. */
1756/* We use char because int might match the return type of a gcc2
1757 builtin and then its argument prototype would still apply. */
1758char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001759
1760int main() { return 0; }
1761int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001762gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001763; return 0; }
1764EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001765if { (eval echo configure:1766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001766 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001767 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001768else
1769 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001770 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001771fi
1772rm -f conftest*
1773LIBS="$ac_save_LIBS"
1774
1775fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001776if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001777 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001778 LIBS="-linet $LIBS"
1779else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001780 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001781fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001782 # Sequent
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001783echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001784ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
1785if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001787else
1788 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001789LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001790cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001791#line 1792 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +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 socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001797
1798int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799int t() {
1800socket()
1801; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001802EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001803if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001805 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806else
1807 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001808 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001809fi
1810rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001812
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001814if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001815 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001816 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001818 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001819fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001820 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00001821fi
Guido van Rossuma68acba1996-07-31 17:36:39 +00001822echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
1823# Check whether --with-libs or --without-libs was given.
1824if test "${with_libs+set}" = set; then
1825 withval="$with_libs"
1826
1827echo "$ac_t""$withval" 1>&6
1828LIBS="$withval $LIBS"
1829
1830else
1831 echo "$ac_t""no" 1>&6
1832fi
1833
Guido van Rossum7f43da71994-08-01 12:15:30 +00001834
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001835echo $ac_n "checking for --with-readline""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001837if test "${with_readline+set}" = set; then
1838 withval="$with_readline"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001839
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001840echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001841cat >> confdefs.h <<\EOF
1842#define WITH_READLINE 1
1843EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001844
Guido van Rossum2d38f911996-06-26 19:47:01 +00001845if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001846then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001847fi
1848termcap=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001849echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001850ac_lib_var=`echo termcap'_'tgetent | tr './+\055' '__p_'`
1851if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001852 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001853else
1854 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001855LIBS="-ltermcap $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001856cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001857#line 1858 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001858#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001859/* Override any gcc2 internal prototype to avoid an error. */
1860/* We use char because int might match the return type of a gcc2
1861 builtin and then its argument prototype would still apply. */
1862char tgetent();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001863
Guido van Rossum7f43da71994-08-01 12:15:30 +00001864int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001865int t() {
1866tgetent()
1867; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001869if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001870 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001871 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001872else
1873 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001874 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001875fi
1876rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001877LIBS="$ac_save_LIBS"
1878
1879fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001880if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001881 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001882 termcap=termcap
Guido van Rossum7f43da71994-08-01 12:15:30 +00001883else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001884 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001886echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001887ac_lib_var=`echo termlib'_'tgetent | tr './+\055' '__p_'`
1888if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001889 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890else
1891 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001892LIBS="-ltermlib $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001894#line 1895 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001895#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001896/* Override any gcc2 internal prototype to avoid an error. */
1897/* We use char because int might match the return type of a gcc2
1898 builtin and then its argument prototype would still apply. */
1899char tgetent();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001900
1901int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001902int t() {
1903tgetent()
1904; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001905EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001906if { (eval echo configure:1907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001907 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001908 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001909else
1910 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001911 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001912fi
1913rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914LIBS="$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 Rossum76be6ed1995-01-02 18:33:54 +00001919 termcap=termlib
Guido van Rossum7f43da71994-08-01 12:15:30 +00001920else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001921 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00001922
1923{ echo "configure: error: no working termcap/termlib -- do not use --with-readline" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001924fi
1925
1926fi
1927
Guido van Rossum2d38f911996-06-26 19:47:01 +00001928echo $ac_n "checking for -lreadline""... $ac_c" 1>&6
1929ac_lib_var=`echo readline'_'readline | tr './+\055' '__p_'`
1930if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932else
1933 ac_save_LIBS="$LIBS"
1934LIBS="-lreadline -l$termcap $LIBS"
1935cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001936#line 1937 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00001937#include "confdefs.h"
1938/* Override any gcc2 internal prototype to avoid an error. */
1939/* We use char because int might match the return type of a gcc2
1940 builtin and then its argument prototype would still apply. */
1941char readline();
1942
1943int main() { return 0; }
1944int t() {
1945readline()
1946; return 0; }
1947EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001948if { (eval echo configure:1949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00001949 rm -rf conftest*
1950 eval "ac_cv_lib_$ac_lib_var=yes"
1951else
1952 rm -rf conftest*
1953 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001954fi
Guido van Rossum2d38f911996-06-26 19:47:01 +00001955rm -f conftest*
1956LIBS="$ac_save_LIBS"
1957
1958fi
1959if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1960 echo "$ac_t""yes" 1>&6
1961
1962LIBS="$LIBS -lreadline"
1963# Avoid possible conflict between shared libraries termcap and gl
1964# on IRIX 5: both contain a routine called clear.
1965if test -f /usr/lib/lib$termcap.a
1966then LIBS="$LIBS /usr/lib/lib$termcap.a"
1967else LIBS="$LIBS -l$termcap"
1968fi
1969
1970else
1971 echo "$ac_t""no" 1>&6
1972{ echo "configure: error: no working GNU readline -- do not use --with-readline" 1>&2; exit 1; }
1973fi
1974
Guido van Rossumda88dad1995-01-26 00:46:29 +00001975else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001976 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001977fi
1978
1979
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001980echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001981# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001982if test "${with_thread+set}" = set; then
1983 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001984
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001985echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001986if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001987then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001988fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00001989cat >> confdefs.h <<\EOF
1990#define _REENTRANT 1
1991EOF
1992
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001993ac_safe=`echo "mach/cthreads.h" | tr './\055' '___'`
1994echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
1995if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1996 echo $ac_n "(cached) $ac_c" 1>&6
1997else
1998 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00001999#line 2000 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002000#include "confdefs.h"
2001#include <mach/cthreads.h>
2002EOF
2003ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002004{ (eval echo configure:2005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002005ac_err=`grep -v '^ *+' conftest.out`
2006if test -z "$ac_err"; then
2007 rm -rf conftest*
2008 eval "ac_cv_header_$ac_safe=yes"
2009else
2010 echo "$ac_err" >&5
2011 rm -rf conftest*
2012 eval "ac_cv_header_$ac_safe=no"
2013fi
2014rm -f conftest*
2015fi
2016if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2017 echo "$ac_t""yes" 1>&6
2018 cat >> confdefs.h <<\EOF
2019#define WITH_THREAD 1
2020EOF
2021
2022cat >> confdefs.h <<\EOF
2023#define C_THREADS 1
2024EOF
2025
2026LIBOBJS="$LIBOBJS thread.o"
2027else
2028 echo "$ac_t""no" 1>&6
2029
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002030echo $ac_n "checking for -lpthreads""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002031ac_lib_var=`echo pthreads'_'pthread_create | tr './+\055' '__p_'`
2032if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002033 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034else
2035 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002036LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002037cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002038#line 2039 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002039#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002040/* Override any gcc2 internal prototype to avoid an error. */
2041/* We use char because int might match the return type of a gcc2
2042 builtin and then its argument prototype would still apply. */
2043char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002044
2045int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002046int t() {
2047pthread_create()
2048; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002049EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002050if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002051 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002052 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002053else
2054 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002055 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002056fi
2057rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002058LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002060fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002061if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002062 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002063 cat >> confdefs.h <<\EOF
2064#define WITH_THREAD 1
2065EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002067cat >> confdefs.h <<\EOF
2068#define _POSIX_THREADS 1
2069EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002070
2071LIBS="$LIBS -lpthreads"
2072LIBOBJS="$LIBOBJS thread.o"
2073else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002074 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002075
2076echo $ac_n "checking for -lpthread""... $ac_c" 1>&6
2077ac_lib_var=`echo pthread'_'pthread_create | tr './+\055' '__p_'`
2078if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2079 echo $ac_n "(cached) $ac_c" 1>&6
2080else
2081 ac_save_LIBS="$LIBS"
2082LIBS="-lpthread $LIBS"
2083cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002084#line 2085 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002085#include "confdefs.h"
2086/* Override any gcc2 internal prototype to avoid an error. */
2087/* We use char because int might match the return type of a gcc2
2088 builtin and then its argument prototype would still apply. */
2089char pthread_create();
2090
2091int main() { return 0; }
2092int t() {
2093pthread_create()
2094; return 0; }
2095EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002096if { (eval echo configure:2097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002097 rm -rf conftest*
2098 eval "ac_cv_lib_$ac_lib_var=yes"
2099else
2100 rm -rf conftest*
2101 eval "ac_cv_lib_$ac_lib_var=no"
2102fi
2103rm -f conftest*
2104LIBS="$ac_save_LIBS"
2105
2106fi
2107if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 cat >> confdefs.h <<\EOF
2110#define WITH_THREAD 1
2111EOF
2112
2113cat >> confdefs.h <<\EOF
2114#define _POSIX_THREADS 1
2115EOF
2116
2117LIBS="$LIBS -lpthread"
2118LIBOBJS="$LIBOBJS thread.o"
2119else
2120 echo "$ac_t""no" 1>&6
2121fi
2122
2123
Guido van Rossum627b2d71993-12-24 10:39:16 +00002124fi
2125
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002126fi
2127
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002128echo $ac_n "checking for -lmpc""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002129ac_lib_var=`echo mpc'_'usconfig | tr './+\055' '__p_'`
2130if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002131 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132else
2133 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002134LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002135cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002136#line 2137 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002137#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002138/* Override any gcc2 internal prototype to avoid an error. */
2139/* We use char because int might match the return type of a gcc2
2140 builtin and then its argument prototype would still apply. */
2141char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002142
Guido van Rossum7f43da71994-08-01 12:15:30 +00002143int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002144int t() {
2145usconfig()
2146; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002147EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002148if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002149 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002150 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002151else
2152 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002153 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002154fi
2155rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002156LIBS="$ac_save_LIBS"
2157
2158fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002159if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002160 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002161 cat >> confdefs.h <<\EOF
2162#define WITH_THREAD 1
2163EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002164
Guido van Rossum7f43da71994-08-01 12:15:30 +00002165LIBS="$LIBS -lmpc"
2166LIBOBJS="$LIBOBJS thread.o"
2167else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002168 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002169fi
2170
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002171echo $ac_n "checking for -lthread""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002172ac_lib_var=`echo thread'_'thr_create | tr './+\055' '__p_'`
2173if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002174 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002175else
2176 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002177LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002178cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002179#line 2180 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002180#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002181/* Override any gcc2 internal prototype to avoid an error. */
2182/* We use char because int might match the return type of a gcc2
2183 builtin and then its argument prototype would still apply. */
2184char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002185
Guido van Rossum7f43da71994-08-01 12:15:30 +00002186int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002187int t() {
2188thr_create()
2189; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002190EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002191if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002192 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002193 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002194else
2195 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002196 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002197fi
2198rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002199LIBS="$ac_save_LIBS"
2200
2201fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002202if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002203 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002204 cat >> confdefs.h <<\EOF
2205#define WITH_THREAD 1
2206EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002207
Guido van Rossum7f43da71994-08-01 12:15:30 +00002208LIBS="$LIBS -lthread"
2209LIBOBJS="$LIBOBJS thread.o"
2210else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002211 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002212fi
2213
Guido van Rossum7f43da71994-08-01 12:15:30 +00002214
Guido van Rossumda88dad1995-01-26 00:46:29 +00002215else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002216 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002217fi
2218
Guido van Rossum7f43da71994-08-01 12:15:30 +00002219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002220# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002221
2222DLINCLDIR=/
2223
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002224echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002225# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002226if test "${with_sgi_dl+set}" = set; then
2227 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002228
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002229echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002230cat >> confdefs.h <<\EOF
2231#define WITH_SGI_DL 1
2232EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002233
2234dldir=$withval
2235if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002236then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002237else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002238fi
2239DLINCLDIR=${dldir}
2240LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002241else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002242 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002243fi
2244
2245
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002246echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002248if test "${with_dl_dld+set}" = set; then
2249 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002250
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002251echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252cat >> confdefs.h <<\EOF
2253#define WITH_DL_DLD 1
2254EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002255
2256dldir=`echo "$withval" | sed 's/,.*//'`
2257dlddir=`echo "$withval" | sed 's/.*,//'`
2258if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002259then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002260else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002261fi
2262DLINCLDIR=${dldir}
2263LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002264else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002265 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002266fi
2267
2268
Guido van Rossum627b2d71993-12-24 10:39:16 +00002269# checks for library functions
Guido van Rossum2d38f911996-06-26 19:47:01 +00002270for ac_func in chown clock dlopen flock ftime ftruncate \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002271 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
Guido van Rossum57d09151996-07-24 02:42:38 +00002272 link lstat mkfifo nice plock putenv readlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002273 select setgid setuid setsid setpgid setpgrp setvbuf \
2274 sigaction siginterrupt sigrelse strftime symlink \
2275 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002276do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002277echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2278if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2279 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002280else
2281 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002282#line 2283 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002283#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002284/* System header to define __stub macros and hopefully few prototypes,
2285 which can conflict with char $ac_func(); below. */
2286#include <assert.h>
2287/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002288/* We use char because int might match the return type of a gcc2
2289 builtin and then its argument prototype would still apply. */
2290char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002291
Guido van Rossum7f43da71994-08-01 12:15:30 +00002292int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002293int t() {
2294
Guido van Rossum627b2d71993-12-24 10:39:16 +00002295/* The GNU C library defines this for functions which it implements
2296 to always fail with ENOSYS. Some functions are actually named
2297 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002298#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002299choke me
2300#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002301$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002302#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002303
Guido van Rossum7f43da71994-08-01 12:15:30 +00002304; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002305EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002306if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002307 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002308 eval "ac_cv_func_$ac_func=yes"
2309else
2310 rm -rf conftest*
2311 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002312fi
2313rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002314
2315fi
2316if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002317 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002318 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002319 cat >> confdefs.h <<EOF
2320#define $ac_tr_func 1
2321EOF
2322
2323else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002324 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002325fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002326done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002327
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002328for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002329do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002330echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2331if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002333else
2334 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002335#line 2336 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002336#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002337/* System header to define __stub macros and hopefully few prototypes,
2338 which can conflict with char $ac_func(); below. */
2339#include <assert.h>
2340/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002341/* We use char because int might match the return type of a gcc2
2342 builtin and then its argument prototype would still apply. */
2343char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002344
Guido van Rossum7f43da71994-08-01 12:15:30 +00002345int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002346int t() {
2347
Guido van Rossum627b2d71993-12-24 10:39:16 +00002348/* The GNU C library defines this for functions which it implements
2349 to always fail with ENOSYS. Some functions are actually named
2350 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002351#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002352choke me
2353#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002354$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002355#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002356
Guido van Rossum7f43da71994-08-01 12:15:30 +00002357; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002358EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002359if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002360 rm -rf conftest*
2361 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002362else
2363 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002364 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002365fi
2366rm -f conftest*
2367
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002368fi
2369if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002370 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002371 :
2372else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002373 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374LIBOBJS="$LIBOBJS ${ac_func}.o"
2375fi
2376
Guido van Rossum627b2d71993-12-24 10:39:16 +00002377done
2378
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002379echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
2380if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2381 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002382else
2383 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002384#line 2385 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002385#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002386/* System header to define __stub macros and hopefully few prototypes,
2387 which can conflict with char getpgrp(); below. */
2388#include <assert.h>
2389/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002390/* We use char because int might match the return type of a gcc2
2391 builtin and then its argument prototype would still apply. */
2392char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002393
Guido van Rossum7f43da71994-08-01 12:15:30 +00002394int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002395int t() {
2396
Guido van Rossum627b2d71993-12-24 10:39:16 +00002397/* The GNU C library defines this for functions which it implements
2398 to always fail with ENOSYS. Some functions are actually named
2399 something starting with __ and the normal name is an alias. */
2400#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2401choke me
2402#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002403getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002404#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002405
2406; return 0; }
2407EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002408if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002409 rm -rf conftest*
2410 eval "ac_cv_func_getpgrp=yes"
2411else
2412 rm -rf conftest*
2413 eval "ac_cv_func_getpgrp=no"
2414fi
2415rm -f conftest*
2416
2417fi
2418if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002419 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002420 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002421#line 2422 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002422#include "confdefs.h"
2423#include <unistd.h>
2424int main() { return 0; }
2425int t() {
2426getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002427; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002428EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002429if { (eval echo configure:2430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002430 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002431 cat >> confdefs.h <<\EOF
2432#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002433EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002434
2435fi
2436rm -f conftest*
2437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002438else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002439 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002440fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002441
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002442echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
2443if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2444 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002445else
2446 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002447#line 2448 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002448#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002449/* System header to define __stub macros and hopefully few prototypes,
2450 which can conflict with char setpgrp(); below. */
2451#include <assert.h>
2452/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453/* We use char because int might match the return type of a gcc2
2454 builtin and then its argument prototype would still apply. */
2455char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002456
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002457int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002458int t() {
2459
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002460/* The GNU C library defines this for functions which it implements
2461 to always fail with ENOSYS. Some functions are actually named
2462 something starting with __ and the normal name is an alias. */
2463#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2464choke me
2465#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002466setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002467#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002468
2469; return 0; }
2470EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002471if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002472 rm -rf conftest*
2473 eval "ac_cv_func_setpgrp=yes"
2474else
2475 rm -rf conftest*
2476 eval "ac_cv_func_setpgrp=no"
2477fi
2478rm -f conftest*
2479
2480fi
2481if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002482 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002483 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002484#line 2485 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002485#include "confdefs.h"
2486#include <unistd.h>
2487int main() { return 0; }
2488int t() {
2489setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002490; return 0; }
2491EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002492if { (eval echo configure:2493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002493 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002494 cat >> confdefs.h <<\EOF
2495#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002496EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002497
2498fi
2499rm -f conftest*
2500
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002501else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002502 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002503fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002504
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002505echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
2506if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2507 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002508else
2509 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002510#line 2511 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002511#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002512/* System header to define __stub macros and hopefully few prototypes,
2513 which can conflict with char gettimeofday(); below. */
2514#include <assert.h>
2515/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002516/* We use char because int might match the return type of a gcc2
2517 builtin and then its argument prototype would still apply. */
2518char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002519
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002520int main() { return 0; }
2521int t() {
2522
2523/* 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. */
2526#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2527choke me
2528#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002529gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002530#endif
2531
2532; return 0; }
2533EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002534if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002535 rm -rf conftest*
2536 eval "ac_cv_func_gettimeofday=yes"
2537else
2538 rm -rf conftest*
2539 eval "ac_cv_func_gettimeofday=no"
2540fi
2541rm -f conftest*
2542
2543fi
2544if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002545 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002546 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002547#line 2548 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002548#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002549#include <sys/time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002550int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002551int t() {
2552gettimeofday((struct timeval*)0,(struct timezone*)0);
2553; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002554EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002555if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002556 :
2557else
2558 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002559 cat >> confdefs.h <<\EOF
2560#define GETTIMEOFDAY_NO_TZ 1
2561EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002562
2563fi
2564rm -f conftest*
2565
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002566else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002567 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002568fi
2569
2570
2571# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002572echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2573if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2574 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002575else
2576 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002577#line 2578 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002578#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002579#include <sys/types.h>
2580#include <sys/time.h>
2581#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002582int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583int t() {
2584struct tm *tp;
2585; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002586EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002587if { (eval echo configure:2588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002588 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002590else
2591 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002593fi
2594rm -f conftest*
2595
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002596fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002597
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002598echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599if test $ac_cv_header_time = yes; then
2600 cat >> confdefs.h <<\EOF
2601#define TIME_WITH_SYS_TIME 1
2602EOF
2603
2604fi
2605
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002606echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2607if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2608 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002609else
2610 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002611#line 2612 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612#include "confdefs.h"
2613#include <sys/types.h>
2614#include <time.h>
2615int main() { return 0; }
2616int t() {
2617struct tm *tp; tp->tm_sec;
2618; return 0; }
2619EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002620if { (eval echo configure:2621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621 rm -rf conftest*
2622 ac_cv_struct_tm=time.h
2623else
2624 rm -rf conftest*
2625 ac_cv_struct_tm=sys/time.h
2626fi
2627rm -f conftest*
2628
2629fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002630
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002631echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632if test $ac_cv_struct_tm = sys/time.h; then
2633 cat >> confdefs.h <<\EOF
2634#define TM_IN_SYS_TIME 1
2635EOF
2636
2637fi
2638
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002639echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2640if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2641 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002642else
2643 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002644#line 2645 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002645#include "confdefs.h"
2646#include <sys/types.h>
2647#include <$ac_cv_struct_tm>
2648int main() { return 0; }
2649int t() {
2650struct tm tm; tm.tm_zone;
2651; return 0; }
2652EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002653if { (eval echo configure:2654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002654 rm -rf conftest*
2655 ac_cv_struct_tm_zone=yes
2656else
2657 rm -rf conftest*
2658 ac_cv_struct_tm_zone=no
2659fi
2660rm -f conftest*
2661
2662fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002663
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002664echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665if test "$ac_cv_struct_tm_zone" = yes; then
2666 cat >> confdefs.h <<\EOF
2667#define HAVE_TM_ZONE 1
2668EOF
2669
2670else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002671 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2672if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2673 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674else
2675 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002676#line 2677 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002677#include "confdefs.h"
2678#include <time.h>
2679#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002681#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00002682int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683int t() {
2684atoi(*tzname);
2685; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002686EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002687if { (eval echo configure:2688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002688 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689 ac_cv_var_tzname=yes
2690else
2691 rm -rf conftest*
2692 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002693fi
2694rm -f conftest*
2695
2696fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002697
2698echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699 if test $ac_cv_var_tzname = yes; then
2700 cat >> confdefs.h <<\EOF
2701#define HAVE_TZNAME 1
2702EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002704 fi
2705fi
2706
2707
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002708echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
2709if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711else
2712 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002713#line 2714 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002714#include "confdefs.h"
2715#include <time.h>
2716int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002717int t() {
2718return altzone;
2719; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002720EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002721if { (eval echo configure:2722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002722 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723 ac_cv_header_time_altzone=yes
2724else
2725 rm -rf conftest*
2726 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002727fi
2728rm -f conftest*
2729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002730fi
2731
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002732echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002733if test $ac_cv_header_time_altzone = yes; then
2734 cat >> confdefs.h <<\EOF
2735#define HAVE_ALTZONE 1
2736EOF
2737
2738fi
2739
Guido van Rossumda88dad1995-01-26 00:46:29 +00002740was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002741echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002743#line 2744 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002744#include "confdefs.h"
2745
2746#include <sys/types.h>
2747#include <sys/select.h>
2748#include <sys/time.h>
2749
2750int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751int t() {
2752;
2753; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002754EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002755if { (eval echo configure:2756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002756 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002757 cat >> confdefs.h <<\EOF
2758#define SYS_SELECT_WITH_SYS_TIME 1
2759EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002760 was_it_defined=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002761fi
2762rm -f conftest*
2763
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002764echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002765
2766# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00002767
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002768echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2769if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2770 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002771else
2772 if test "$GCC" = yes; then
2773 # GCC predefines this symbol on systems where it applies.
2774cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002775#line 2776 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002776#include "confdefs.h"
2777#ifdef __CHAR_UNSIGNED__
2778 yes
2779#endif
2780
2781EOF
2782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2783 egrep "yes" >/dev/null 2>&1; then
2784 rm -rf conftest*
2785 ac_cv_c_char_unsigned=yes
2786else
2787 rm -rf conftest*
2788 ac_cv_c_char_unsigned=no
2789fi
2790rm -f conftest*
2791
2792else
2793if test "$cross_compiling" = yes; then
2794 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2795else
2796cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002797#line 2798 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002798#include "confdefs.h"
2799/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002800#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00002801#define volatile
2802#endif
2803main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00002804 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002805}
2806EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002807{ (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002808if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809 ac_cv_c_char_unsigned=yes
2810else
2811 ac_cv_c_char_unsigned=no
2812fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002813fi
2814rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815fi
2816fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002817
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002818echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2820 cat >> confdefs.h <<\EOF
2821#define __CHAR_UNSIGNED__ 1
2822EOF
2823
2824fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002825
2826
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002827echo $ac_n "checking for working const""... $ac_c" 1>&6
2828if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2829 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002830else
2831 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002832#line 2833 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002833#include "confdefs.h"
2834
2835int main() { return 0; }
2836int t() {
2837
2838/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002839typedef int charset[2]; const charset x;
2840/* SunOS 4.1.1 cc rejects this. */
2841char const *const *ccp;
2842char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002843/* NEC SVR4.0.2 mips cc rejects this. */
2844struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002845static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002846/* AIX XL C 1.02.0.0 rejects this.
2847 It does not let you subtract one const X* pointer from another in an arm
2848 of an if-expression whose if-part is not a constant expression */
2849const char *g = "string";
2850ccp = &g + (g ? g-g : 0);
2851/* HPUX 7.0 cc rejects these. */
2852++ccp;
2853p = (char**) ccp;
2854ccp = (char const *const *) p;
2855{ /* SCO 3.2v4 cc rejects this. */
2856 char *t;
2857 char const *s = 0 ? (char *) 0 : (char const *) 0;
2858
2859 *t++ = 0;
2860}
2861{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002863 const int *foo = &x[0];
2864 ++foo;
2865}
2866{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2867 typedef const int *iptr;
2868 iptr p = 0;
2869 ++p;
2870}
2871{ /* AIX XL C 1.02.0.0 rejects this saying
2872 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2873 struct s { int j; const int *ap[3]; };
2874 struct s *b; b->j = 5;
2875}
2876{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2877 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002878}
2879
2880; return 0; }
2881EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002882if { (eval echo configure:2883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002883 rm -rf conftest*
2884 ac_cv_c_const=yes
2885else
2886 rm -rf conftest*
2887 ac_cv_c_const=no
2888fi
2889rm -f conftest*
2890
2891fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002892
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002893echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002894if test $ac_cv_c_const = no; then
2895 cat >> confdefs.h <<\EOF
2896#define const
2897EOF
2898
2899fi
2900
2901
Guido van Rossumda88dad1995-01-26 00:46:29 +00002902works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002903echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002904cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002905#line 2906 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002906#include "confdefs.h"
2907
Guido van Rossum7f43da71994-08-01 12:15:30 +00002908int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002909int t() {
2910volatile int x; x = 0;
2911; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002912EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002913if { (eval echo configure:2914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002914 rm -rf conftest*
2915 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002916else
2917 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918 cat >> confdefs.h <<\EOF
2919#define volatile
2920EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002921
2922fi
2923rm -f conftest*
2924
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002925echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002926
Guido van Rossumda88dad1995-01-26 00:46:29 +00002927works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002928echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002929cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002930#line 2931 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002931#include "confdefs.h"
2932
2933int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002934int t() {
2935signed char c;
2936; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002937EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002938if { (eval echo configure:2939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002939 rm -rf conftest*
2940 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002941else
2942 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002943 cat >> confdefs.h <<\EOF
2944#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00002945EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002946
2947fi
2948rm -f conftest*
2949
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002950echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002951
Guido van Rossumda88dad1995-01-26 00:46:29 +00002952have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002953echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002955#line 2956 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002956#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002957int foo(int x) { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002958int main() { return 0; }
2959int t() {
2960return foo(10);
2961; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002962EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002963if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002964 rm -rf conftest*
2965 cat >> confdefs.h <<\EOF
2966#define HAVE_PROTOTYPES 1
2967EOF
2968 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002969fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002970rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002971
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002972echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002973
Guido van Rossumda88dad1995-01-26 00:46:29 +00002974works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002975echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002976cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002977#line 2978 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002978#include "confdefs.h"
2979
2980#include <stdarg.h>
2981int foo(int x, ...) { return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002982
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002983int main() { return 0; }
2984int t() {
2985return foo(10, 11, 12);
2986; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002987EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00002988if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002989 rm -rf conftest*
2990 cat >> confdefs.h <<\EOF
2991#define HAVE_STDARG_PROTOTYPES 1
2992EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002993 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002994fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002995rm -f conftest*
2996
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002997echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002998
Guido van Rossumda88dad1995-01-26 00:46:29 +00002999if test "$have_prototypes" = yes; then
3000bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003001echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003002cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003003#line 3004 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003004#include "confdefs.h"
3005#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00003006int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003007int t() {
3008char **t;execve("@",t,t);
3009; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003010EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003011if { (eval echo configure:3012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003012 :
3013else
3014 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003015 cat >> confdefs.h <<\EOF
3016#define BAD_EXEC_PROTOTYPES 1
3017EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003018 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003019fi
3020rm -f conftest*
3021
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003022echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003023fi
3024
Guido van Rossumda88dad1995-01-26 00:46:29 +00003025bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003026echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027if test "$cross_compiling" = yes; then
3028 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3029else
3030cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003031#line 3032 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003032#include "confdefs.h"
3033
3034struct s { int a; int b; };
3035static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003036int foobar() {
3037 static int random;
3038 random = (int) &foo;
3039 return random;
3040}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003041static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003042main() {
3043 exit(!((int)&foo == foobar()));
3044}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003045
3046EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003047{ (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003048if test -s conftest && (./conftest; exit) 2>/dev/null; then
3049 :
3050else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003051 cat >> confdefs.h <<\EOF
3052#define BAD_STATIC_FORWARD 1
3053EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003054 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003055fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003056fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003057rm -fr conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003058echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003059
Guido van Rossumda88dad1995-01-26 00:46:29 +00003060va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003061echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003062cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003063#line 3064 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064#include "confdefs.h"
3065
3066#ifdef HAVE_STDARG_PROTOTYPES
3067#include <stdarg.h>
3068#else
3069#include <varargs.h>
3070#endif
3071
3072int main() { return 0; }
3073int t() {
3074va_list list1, list2; list1 = list2;
3075; return 0; }
3076EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003077if { (eval echo configure:3078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003078 :
3079else
3080 rm -rf conftest*
3081 cat >> confdefs.h <<\EOF
3082#define VA_LIST_IS_ARRAY 1
3083EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003084 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003085fi
3086rm -f conftest*
3087
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003088echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003089
Guido van Rossum627b2d71993-12-24 10:39:16 +00003090# checks for system services
3091# (none yet)
3092
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003093# Linux requires this for correct f.p. operations
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003094echo $ac_n "checking for -lieee""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003095ac_lib_var=`echo ieee'_'__fpu_control | tr './+\055' '__p_'`
3096if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003097 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003098else
3099 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003100LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003101cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003102#line 3103 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003103#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003104/* Override any gcc2 internal prototype to avoid an error. */
3105/* We use char because int might match the return type of a gcc2
3106 builtin and then its argument prototype would still apply. */
3107char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003108
Guido van Rossum7f43da71994-08-01 12:15:30 +00003109int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003110int t() {
3111__fpu_control()
3112; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003113EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003114if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003115 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003116 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003117else
Guido van Rossum627b2d71993-12-24 10:39:16 +00003118 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003119 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003120fi
3121rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003123
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003124fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003125if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003126 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003127 ac_tr_lib=HAVE_LIB`echo ieee | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003128 cat >> confdefs.h <<EOF
3129#define $ac_tr_lib 1
3130EOF
3131
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003132 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003133
3134else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003135 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003136fi
3137
3138
Guido van Rossum7f43da71994-08-01 12:15:30 +00003139# check for --with-libm=...
3140
3141LIBM=-lm
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003142# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003143if test "${with_libm+set}" = set; then
3144 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003145
3146if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003147then LIBM=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149fi
3150fi
3151
3152
3153# check for --with-libc=...
3154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003155# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003156if test "${with_libc+set}" = set; then
3157 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003158
3159if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003160then LIBC=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003161else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003162fi
3163fi
3164
3165
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003166# check for hypot() in math library
3167LIBS_SAVE=$LIBS
3168LIBS="$LIBS $LIBM"
3169for ac_func in hypot
3170do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003171echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3172if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3173 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003174else
3175 cat > conftest.$ac_ext <<EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003176#line 3177 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003177#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003178/* System header to define __stub macros and hopefully few prototypes,
3179 which can conflict with char $ac_func(); below. */
3180#include <assert.h>
3181/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003182/* We use char because int might match the return type of a gcc2
3183 builtin and then its argument prototype would still apply. */
3184char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003185
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003186int main() { return 0; }
3187int t() {
3188
3189/* The GNU C library defines this for functions which it implements
3190 to always fail with ENOSYS. Some functions are actually named
3191 something starting with __ and the normal name is an alias. */
3192#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3193choke me
3194#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003195$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003196#endif
3197
3198; return 0; }
3199EOF
Guido van Rossum84e7b241996-08-19 21:59:00 +00003200if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003201 rm -rf conftest*
3202 eval "ac_cv_func_$ac_func=yes"
3203else
3204 rm -rf conftest*
3205 eval "ac_cv_func_$ac_func=no"
3206fi
3207rm -f conftest*
3208
3209fi
3210if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003211 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003212 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003213 cat >> confdefs.h <<EOF
3214#define $ac_tr_func 1
3215EOF
3216
3217else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003218 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003219fi
3220done
3221
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003222for ac_func in hypot
3223do
3224echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3225if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3226 echo $ac_n "(cached) $ac_c" 1>&6
3227else
3228 cat > conftest.$ac_ext <<EOF
3229#line 3230 "configure"
3230#include "confdefs.h"
3231/* System header to define __stub macros and hopefully few prototypes,
3232 which can conflict with char $ac_func(); below. */
3233#include <assert.h>
3234/* Override any gcc2 internal prototype to avoid an error. */
3235/* We use char because int might match the return type of a gcc2
3236 builtin and then its argument prototype would still apply. */
3237char $ac_func();
3238
3239int main() { return 0; }
3240int t() {
3241
3242/* The GNU C library defines this for functions which it implements
3243 to always fail with ENOSYS. Some functions are actually named
3244 something starting with __ and the normal name is an alias. */
3245#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3246choke me
3247#else
3248$ac_func();
3249#endif
3250
3251; return 0; }
3252EOF
3253if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3254 rm -rf conftest*
3255 eval "ac_cv_func_$ac_func=yes"
3256else
3257 rm -rf conftest*
3258 eval "ac_cv_func_$ac_func=no"
3259fi
3260rm -f conftest*
3261
3262fi
3263if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3264 echo "$ac_t""yes" 1>&6
3265 :
3266else
3267 echo "$ac_t""no" 1>&6
3268LIBOBJS="$LIBOBJS ${ac_func}.o"
3269fi
3270
3271done
3272
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003273LIBS=$LIBS_SAVE
3274
Guido van Rossumda88dad1995-01-26 00:46:29 +00003275# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003276echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
3277if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3278 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003279else
3280 if test "$cross_compiling" = yes; then
3281 ac_cv_func_getopt=no
3282else
3283cat > conftest.$ac_ext <<EOF
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003284#line 3285 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003285#include "confdefs.h"
3286#include <stdio.h>
3287extern int optind, opterr, getopt();
3288extern char* optarg;
3289int main() {
3290 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3291 opterr = 0;
3292 if (getopt(3, av, "f:") == 'f') { exit(1); }
3293 exit(0);
3294}
3295EOF
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003296{ (eval echo configure:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00003297if test -s conftest && (./conftest; exit) 2>/dev/null; then
3298 ac_cv_func_getopt=yes
3299else
3300 ac_cv_func_getopt=no
3301fi
3302fi
3303rm -fr conftest*
3304fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003305echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003306test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3307
Guido van Rossum627b2d71993-12-24 10:39:16 +00003308# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003309trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003310cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311# This file is a shell script that caches the results of configure
3312# tests run on this system so they can be shared between configure
3313# scripts and configure runs. It is not useful on other systems.
3314# If it contains results you don't want to keep, you may remove or edit it.
3315#
3316# By default, configure uses ./config.cache as the cache file,
3317# creating it if it does not exist already. You can give configure
3318# the --cache-file=FILE option to use a different cache file; that is
3319# what configure does when it calls configure scripts in
3320# subdirectories, so they share the cache.
3321# Giving --cache-file=/dev/null disables caching, for debugging configure.
3322# config.status only pays attention to the cache file if you give it the
3323# --recheck option to rerun configure.
3324#
3325EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003326# Ultrix sh set writes to stderr and can't be redirected directly,
3327# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328(set) 2>&1 |
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003329 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3330 >> confcache
3331if cmp -s $cache_file confcache; then
3332 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003333else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003334 if test -w $cache_file; then
3335 echo "updating cache $cache_file"
3336 cat confcache > $cache_file
3337 else
3338 echo "not updating unwritable cache $cache_file"
3339 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003340fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003341rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003342
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003343trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003344
3345test "x$prefix" = xNONE && prefix=$ac_default_prefix
3346# Let make expand exec_prefix.
3347test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003348
Guido van Rossum7f43da71994-08-01 12:15:30 +00003349# Any assignment to VPATH causes Sun make to only execute
3350# the first set of double-colon rules, so remove it if not needed.
3351# If there is a colon in the path, we need to keep it.
3352if test "x$srcdir" = x.; then
3353 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3354fi
3355
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003356trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003357
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358DEFS=-DHAVE_CONFIG_H
3359
3360# Without the "./", some shells look in PATH for config.status.
3361: ${CONFIG_STATUS=./config.status}
3362
3363echo creating $CONFIG_STATUS
3364rm -f $CONFIG_STATUS
3365cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003366#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003367# Generated automatically by configure.
3368# Run this file to recreate the current configuration.
3369# This directory was configured as follows,
3370# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3371#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003372# $0 $ac_configure_args
3373#
3374# Compiler output produced by configure, useful for debugging
3375# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003376
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003377ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003378for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003379do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003380 case "\$ac_option" in
3381 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003382 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3383 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003384 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003385 echo "$CONFIG_STATUS generated by autoconf version 2.10"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003386 exit 0 ;;
3387 -help | --help | --hel | --he | --h)
3388 echo "\$ac_cs_usage"; exit 0 ;;
3389 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003390 esac
3391done
3392
Guido van Rossum7f43da71994-08-01 12:15:30 +00003393ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003394
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003395trap 'rm -fr `echo "Makefile \
3396 Objects/Makefile \
3397 Parser/Makefile \
3398 Python/Makefile \
3399 Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003400EOF
3401cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003403# Protect against being on the right side of a sed subst in config.status.
3404sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3405 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003406$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003407$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003408s%@CFLAGS@%$CFLAGS%g
3409s%@CPPFLAGS@%$CPPFLAGS%g
3410s%@CXXFLAGS@%$CXXFLAGS%g
3411s%@DEFS@%$DEFS%g
3412s%@LDFLAGS@%$LDFLAGS%g
3413s%@LIBS@%$LIBS%g
3414s%@exec_prefix@%$exec_prefix%g
3415s%@prefix@%$prefix%g
3416s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003417s%@bindir@%$bindir%g
3418s%@sbindir@%$sbindir%g
3419s%@libexecdir@%$libexecdir%g
3420s%@datadir@%$datadir%g
3421s%@sysconfdir@%$sysconfdir%g
3422s%@sharedstatedir@%$sharedstatedir%g
3423s%@localstatedir@%$localstatedir%g
3424s%@libdir@%$libdir%g
3425s%@includedir@%$includedir%g
3426s%@oldincludedir@%$oldincludedir%g
3427s%@infodir@%$infodir%g
3428s%@mandir@%$mandir%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003429s%@MACHDEP@%$MACHDEP%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003430s%@CC@%$CC%g
3431s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003432s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003433s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003434s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3435s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003436s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003437s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003438s%@SO@%$SO%g
3439s%@LDSHARED@%$LDSHARED%g
3440s%@CCSHARED@%$CCSHARED%g
3441s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003442s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003443s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003444s%@LIBM@%$LIBM%g
3445s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003446
3447CEOF
3448EOF
3449cat >> $CONFIG_STATUS <<EOF
3450
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003451CONFIG_FILES=\${CONFIG_FILES-"Makefile \
3452 Objects/Makefile \
3453 Parser/Makefile \
3454 Python/Makefile \
3455 Modules/Makefile.pre"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003456EOF
3457cat >> $CONFIG_STATUS <<\EOF
3458for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3459 # Support "outfile[:infile]", defaulting infile="outfile.in".
3460 case "$ac_file" in
3461 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3462 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3463 *) ac_file_in="${ac_file}.in" ;;
3464 esac
3465
3466 # Adjust relative srcdir, etc. for subdirectories.
3467
3468 # Remove last slash and all that follows it. Not all systems have dirname.
3469 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3470 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3471 # The file is in a subdirectory.
3472 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003473 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003474 # A "../" for each directory in $ac_dir_suffix.
3475 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3476 else
3477 ac_dir_suffix= ac_dots=
3478 fi
3479
3480 case "$ac_given_srcdir" in
3481 .) srcdir=.
3482 if test -z "$ac_dots"; then top_srcdir=.
3483 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3484 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3485 *) # Relative path.
3486 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3487 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3488 esac
3489
3490 echo creating "$ac_file"
3491 rm -f "$ac_file"
3492 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3493 case "$ac_file" in
3494 *Makefile*) ac_comsub="1i\\
3495# $configure_input" ;;
3496 *) ac_comsub= ;;
3497 esac
3498 sed -e "$ac_comsub
3499s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003500s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003501s%@top_srcdir@%$top_srcdir%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003502" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00003503fi; done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003504rm -f conftest.subs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003506# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3507# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00003508#
3509# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003510ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3511ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003512ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003513ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003514# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003515ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3516ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003517ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003518ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003519# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003520ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3521ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003522ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003523ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003524
3525CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003526for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3527 # Support "outfile[:infile]", defaulting infile="outfile.in".
3528 case "$ac_file" in
3529 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3530 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3531 *) ac_file_in="${ac_file}.in" ;;
3532 esac
3533
Guido van Rossum7f43da71994-08-01 12:15:30 +00003534 echo creating $ac_file
3535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003536 rm -f conftest.frag conftest.in conftest.out
3537 cp $ac_given_srcdir/$ac_file_in conftest.in
3538
3539EOF
3540
3541# Transform confdefs.h into a sed script conftest.vals that substitutes
3542# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003543# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003544# Protect against being in an unquoted here document in config.status.
3545rm -f conftest.vals
3546cat > conftest.hdr <<\EOF
3547s/[\\&%]/\\&/g
3548s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003549s%#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 +00003550s%ac_d%ac_u%gp
3551s%ac_u%ac_e%gp
3552EOF
3553sed -n -f conftest.hdr confdefs.h > conftest.vals
3554rm -f conftest.hdr
3555
3556# This sed command replaces #undef with comments. This is necessary, for
3557# example, in the case of _POSIX_SOURCE, which is predefined and required
3558# on some systems where configure will not decide to define it.
3559cat >> conftest.vals <<\EOF
3560s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3561EOF
3562
3563# Break up conftest.vals because some shells have a limit on
3564# the size of here documents, and old seds have small limits too.
3565# Maximum number of lines to put in a single here document.
3566ac_max_here_lines=12
3567
3568rm -f conftest.tail
3569while :
3570do
3571 ac_lines=`grep -c . conftest.vals`
3572 # grep -c gives empty output for an empty file on some AIX systems.
3573 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3574 # Write a limited-size here document to conftest.frag.
3575 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3576 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3577 echo 'CEOF
3578 sed -f conftest.frag conftest.in > conftest.out
3579 rm -f conftest.in
3580 mv conftest.out conftest.in
3581' >> $CONFIG_STATUS
3582 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3583 rm -f conftest.vals
3584 mv conftest.tail conftest.vals
3585done
3586rm -f conftest.vals
3587
3588cat >> $CONFIG_STATUS <<\EOF
3589 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00003590 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003591 cat conftest.in >> conftest.h
3592 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00003593 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003594 echo "$ac_file is unchanged"
3595 rm -f conftest.h
3596 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003597 # Remove last slash and all that follows it. Not all systems have dirname.
3598 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3599 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3600 # The file is in a subdirectory.
3601 test ! -d "$ac_dir" && mkdir "$ac_dir"
3602 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003603 rm -f $ac_file
3604 mv conftest.h $ac_file
3605 fi
3606fi; done
3607
3608
Guido van Rossum627b2d71993-12-24 10:39:16 +00003609
3610exit 0
3611EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003612chmod +x $CONFIG_STATUS
3613rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003614test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003615