blob: 4ee5fe97868167a2d1807ebec8763c186d604539 [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 Rossum81652ab1996-07-21 02:53:27 +00003# From configure.in Revision: 1.28
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
17--without-gcc never use gcc"
18ac_help="$ac_help
Guido van Rossum2d38f911996-06-26 19:47:01 +000019--with-readline[=DIRECTORY] use GNU readline library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020ac_help="$ac_help
21--with-thread[=DIRECTORY] make interpreter thread-safe"
22ac_help="$ac_help
23--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
24ac_help="$ac_help
25--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
26ac_help="$ac_help
27--with-libm=STRING math library"
28ac_help="$ac_help
29--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000030
Guido van Rossum7f43da71994-08-01 12:15:30 +000031# Initialize some variables set by options.
32# The variables have the same names as the options, with
33# dashes changed to underlines.
34build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000035cache_file=./config.cache
36exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000037host=NONE
38no_create=
39nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000040no_recursion=
41prefix=NONE
42program_prefix=NONE
43program_suffix=NONE
44program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000045silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000046site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000047srcdir=
48target=NONE
49verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050x_includes=NONE
51x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000052bindir='${exec_prefix}/bin'
53sbindir='${exec_prefix}/sbin'
54libexecdir='${exec_prefix}/libexec'
55datadir='${prefix}/share'
56sysconfdir='${prefix}/etc'
57sharedstatedir='${prefix}/com'
58localstatedir='${prefix}/var'
59libdir='${exec_prefix}/lib'
60includedir='${prefix}/include'
61oldincludedir='/usr/include'
62infodir='${prefix}/info'
63mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000064
65# Initialize some other variables.
66subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000067MFLAGS= MAKEFLAGS=
Guido van Rossum7f43da71994-08-01 12:15:30 +000068
69ac_prev=
70for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000071do
Guido van Rossum627b2d71993-12-24 10:39:16 +000072
Guido van Rossum7f43da71994-08-01 12:15:30 +000073 # If the previous option needs an argument, assign it.
74 if test -n "$ac_prev"; then
75 eval "$ac_prev=\$ac_option"
76 ac_prev=
77 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000078 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000079
Guido van Rossum7f43da71994-08-01 12:15:30 +000080 case "$ac_option" in
81 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
82 *) ac_optarg= ;;
83 esac
84
Guido van Rossum76be6ed1995-01-02 18:33:54 +000085 # Accept the important Cygnus configure options, so we can diagnose typos.
86
Guido van Rossum7f43da71994-08-01 12:15:30 +000087 case "$ac_option" in
88
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000089 -bindir | --bindir | --bindi | --bind | --bin | --bi)
90 ac_prev=bindir ;;
91 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
92 bindir="$ac_optarg" ;;
93
94 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +000095 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000096 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +000097 build="$ac_optarg" ;;
98
Guido van Rossum76be6ed1995-01-02 18:33:54 +000099 -cache-file | --cache-file | --cache-fil | --cache-fi \
100 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
101 ac_prev=cache_file ;;
102 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
103 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
104 cache_file="$ac_optarg" ;;
105
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000106 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
107 ac_prev=datadir ;;
108 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
109 | --da=*)
110 datadir="$ac_optarg" ;;
111
Guido van Rossum7f43da71994-08-01 12:15:30 +0000112 -disable-* | --disable-*)
113 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000114 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000115 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000116 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000117 fi
118 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 eval "enable_${ac_feature}=no" ;;
120
121 -enable-* | --enable-*)
122 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000123 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000125 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000126 fi
127 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128 case "$ac_option" in
129 *=*) ;;
130 *) ac_optarg=yes ;;
131 esac
132 eval "enable_${ac_feature}='$ac_optarg'" ;;
133
Guido van Rossum7f43da71994-08-01 12:15:30 +0000134 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
135 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
136 | --exec | --exe | --ex)
137 ac_prev=exec_prefix ;;
138 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
139 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
140 | --exec=* | --exe=* | --ex=*)
141 exec_prefix="$ac_optarg" ;;
142
143 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000144 # Obsolete; use --with-gas.
145 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146
147 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000148 # Omit some internal or obsolete options to make the list less imposing.
149 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000150 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000151Usage: configure [options] [host]
152Options: [defaults in brackets after descriptions]
153Configuration:
154 --cache-file=FILE cache test results in FILE
155 --help print this message
156 --no-create do not create output files
157 --quiet, --silent do not print \`checking...' messages
158 --version print the version of autoconf that created configure
159Directory and file names:
160 --prefix=PREFIX install architecture-independent files in PREFIX
161 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000162 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000163 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000164 --bindir=DIR user executables in DIR [EPREFIX/bin]
165 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
166 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
167 --datadir=DIR read-only architecture-independent data in DIR
168 [PREFIX/share]
169 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
170 --sharedstatedir=DIR modifiable architecture-independent data in DIR
171 [PREFIX/com]
172 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
173 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
174 --includedir=DIR C header files in DIR [PREFIX/include]
175 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
176 --infodir=DIR info documentation in DIR [PREFIX/info]
177 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000178 --srcdir=DIR find the sources in DIR [configure dir or ..]
179 --program-prefix=PREFIX prepend PREFIX to installed program names
180 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000181 --program-transform-name=PROGRAM
182 run sed PROGRAM on installed program names
183EOF
184 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000185Host type:
186 --build=BUILD configure for building on BUILD [BUILD=HOST]
187 --host=HOST configure for HOST [guessed]
188 --target=TARGET configure for TARGET [TARGET=HOST]
189Features and packages:
190 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
191 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
192 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
193 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
194 --x-includes=DIR X include files are in DIR
195 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000196EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000197 if test -n "$ac_help"; then
198 echo "--enable and --with options recognized:$ac_help"
199 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000200 exit 0 ;;
201
202 -host | --host | --hos | --ho)
203 ac_prev=host ;;
204 -host=* | --host=* | --hos=* | --ho=*)
205 host="$ac_optarg" ;;
206
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000207 -includedir | --includedir | --includedi | --included | --include \
208 | --includ | --inclu | --incl | --inc)
209 ac_prev=includedir ;;
210 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
211 | --includ=* | --inclu=* | --incl=* | --inc=*)
212 includedir="$ac_optarg" ;;
213
214 -infodir | --infodir | --infodi | --infod | --info | --inf)
215 ac_prev=infodir ;;
216 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
217 infodir="$ac_optarg" ;;
218
219 -libdir | --libdir | --libdi | --libd)
220 ac_prev=libdir ;;
221 -libdir=* | --libdir=* | --libdi=* | --libd=*)
222 libdir="$ac_optarg" ;;
223
224 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
225 | --libexe | --libex | --libe)
226 ac_prev=libexecdir ;;
227 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
228 | --libexe=* | --libex=* | --libe=*)
229 libexecdir="$ac_optarg" ;;
230
231 -localstatedir | --localstatedir | --localstatedi | --localstated \
232 | --localstate | --localstat | --localsta | --localst \
233 | --locals | --local | --loca | --loc | --lo)
234 ac_prev=localstatedir ;;
235 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
236 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
237 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
238 localstatedir="$ac_optarg" ;;
239
240 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241 ac_prev=mandir ;;
242 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
243 mandir="$ac_optarg" ;;
244
Guido van Rossum7f43da71994-08-01 12:15:30 +0000245 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000246 # Obsolete; use --without-fp.
247 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000248
249 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250 | --no-cr | --no-c)
251 no_create=yes ;;
252
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000253 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
254 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
255 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000256
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000257 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
258 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
259 | --oldin | --oldi | --old | --ol | --o)
260 ac_prev=oldincludedir ;;
261 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
262 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
263 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
264 oldincludedir="$ac_optarg" ;;
265
Guido van Rossum7f43da71994-08-01 12:15:30 +0000266 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267 ac_prev=prefix ;;
268 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
269 prefix="$ac_optarg" ;;
270
271 -program-prefix | --program-prefix | --program-prefi | --program-pref \
272 | --program-pre | --program-pr | --program-p)
273 ac_prev=program_prefix ;;
274 -program-prefix=* | --program-prefix=* | --program-prefi=* \
275 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
276 program_prefix="$ac_optarg" ;;
277
278 -program-suffix | --program-suffix | --program-suffi | --program-suff \
279 | --program-suf | --program-su | --program-s)
280 ac_prev=program_suffix ;;
281 -program-suffix=* | --program-suffix=* | --program-suffi=* \
282 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
283 program_suffix="$ac_optarg" ;;
284
285 -program-transform-name | --program-transform-name \
286 | --program-transform-nam | --program-transform-na \
287 | --program-transform-n | --program-transform- \
288 | --program-transform | --program-transfor \
289 | --program-transfo | --program-transf \
290 | --program-trans | --program-tran \
291 | --progr-tra | --program-tr | --program-t)
292 ac_prev=program_transform_name ;;
293 -program-transform-name=* | --program-transform-name=* \
294 | --program-transform-nam=* | --program-transform-na=* \
295 | --program-transform-n=* | --program-transform-=* \
296 | --program-transform=* | --program-transfor=* \
297 | --program-transfo=* | --program-transf=* \
298 | --program-trans=* | --program-tran=* \
299 | --progr-tra=* | --program-tr=* | --program-t=*)
300 program_transform_name="$ac_optarg" ;;
301
302 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
303 | -silent | --silent | --silen | --sile | --sil)
304 silent=yes ;;
305
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000306 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307 ac_prev=sbindir ;;
308 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309 | --sbi=* | --sb=*)
310 sbindir="$ac_optarg" ;;
311
312 -sharedstatedir | --sharedstatedir | --sharedstatedi \
313 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
314 | --sharedst | --shareds | --shared | --share | --shar \
315 | --sha | --sh)
316 ac_prev=sharedstatedir ;;
317 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
318 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
319 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320 | --sha=* | --sh=*)
321 sharedstatedir="$ac_optarg" ;;
322
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000323 -site | --site | --sit)
324 ac_prev=site ;;
325 -site=* | --site=* | --sit=*)
326 site="$ac_optarg" ;;
327
Guido van Rossum7f43da71994-08-01 12:15:30 +0000328 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329 ac_prev=srcdir ;;
330 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
331 srcdir="$ac_optarg" ;;
332
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000333 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
334 | --syscon | --sysco | --sysc | --sys | --sy)
335 ac_prev=sysconfdir ;;
336 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
337 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
338 sysconfdir="$ac_optarg" ;;
339
Guido van Rossum7f43da71994-08-01 12:15:30 +0000340 -target | --target | --targe | --targ | --tar | --ta | --t)
341 ac_prev=target ;;
342 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
343 target="$ac_optarg" ;;
344
345 -v | -verbose | --verbose | --verbos | --verbo | --verb)
346 verbose=yes ;;
347
348 -version | --version | --versio | --versi | --vers)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000349 echo "configure generated by autoconf version 2.10"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350 exit 0 ;;
351
352 -with-* | --with-*)
353 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000354 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000355 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000356 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000357 fi
358 ac_package=`echo $ac_package| sed 's/-/_/g'`
359 case "$ac_option" in
360 *=*) ;;
361 *) ac_optarg=yes ;;
362 esac
363 eval "with_${ac_package}='$ac_optarg'" ;;
364
365 -without-* | --without-*)
366 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000367 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000369 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000370 fi
371 ac_package=`echo $ac_package| sed 's/-/_/g'`
372 eval "with_${ac_package}=no" ;;
373
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374 --x)
375 # Obsolete; use --with-x.
376 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000377
378 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
379 | --x-incl | --x-inc | --x-in | --x-i)
380 ac_prev=x_includes ;;
381 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
382 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
383 x_includes="$ac_optarg" ;;
384
385 -x-libraries | --x-libraries | --x-librarie | --x-librari \
386 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
387 ac_prev=x_libraries ;;
388 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
389 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
390 x_libraries="$ac_optarg" ;;
391
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000393 ;;
394
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000395 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000396 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000399 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 { 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 +0000401 fi
402 nonopt="$ac_option"
403 ;;
404
405 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000406done
407
Guido van Rossum7f43da71994-08-01 12:15:30 +0000408if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000410fi
411
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000412trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000414# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000415# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000416# 1 file creation
417# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000418# 3 some systems may open it to /dev/tty
419# 4 used on the Kubota Titan
420# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421# 5 compiler messages saved in config.log
422if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000423 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000424else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000425 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426fi
427exec 5>./config.log
428
429echo "\
430This file contains any messages produced by compilers while
431running configure, to aid debugging if configure makes a mistake.
432" 1>&5
433
434# Strip out --no-create and --no-recursion so they do not pile up.
435# Also quote any args containing shell metacharacters.
436ac_configure_args=
437for ac_arg
438do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 case "$ac_arg" in
440 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
441 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000442 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
443 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
444 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
445 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
446 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000447 esac
448done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000449
450# NLS nuisances.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000451# Only set LANG and LC_ALL to C if already set.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000452# These must not be set unconditionally because not all systems understand
453# e.g. LANG=C (notably SCO).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000454if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
455if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000456
Guido van Rossum7f43da71994-08-01 12:15:30 +0000457# confdefs.h avoids OS command line length limits that DEFS can exceed.
458rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000459# AIX cpp loses on an empty file, so make sure it contains at least a newline.
460echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000461
462# A filename unique to this package, relative to the directory that
463# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000464ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000465
466# Find the source files, if location was not specified.
467if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000468 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000469 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000470 ac_prog=$0
471 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
473 srcdir=$ac_confdir
474 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000475 srcdir=..
476 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000477else
478 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000479fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481 if test "$ac_srcdir_defaulted" = yes; then
482 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000486fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000487srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
488
489# Prefer explicitly selected file to automatically selected ones.
490if test -z "$CONFIG_SITE"; then
491 if test "x$prefix" != xNONE; then
492 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
493 else
494 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495 fi
496fi
497for ac_site_file in $CONFIG_SITE; do
498 if test -r "$ac_site_file"; then
499 echo "loading site script $ac_site_file"
500 . "$ac_site_file"
501 fi
502done
503
504if test -r "$cache_file"; then
505 echo "loading cache $cache_file"
506 . $cache_file
507else
508 echo "creating cache $cache_file"
509 > $cache_file
510fi
511
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000513# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000514ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000515ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000517
518if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
519 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
520 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
521 ac_n= ac_c='
522' ac_t=' '
523 else
524 ac_n=-n ac_c= ac_t=
525 fi
526else
527 ac_n= ac_c='\c' ac_t=
528fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000529
Guido van Rossum0a516c91994-09-12 10:58:40 +0000530
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000531
Guido van Rossum627b2d71993-12-24 10:39:16 +0000532
533# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000534echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000535# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000536if test "${with_gcc+set}" = set; then
537 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000538
539 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000540 no) CC=cc
541 without_gcc=yes;;
542 yes) CC=gcc
543 without_gcc=no;;
544 *) CC=$withval
545 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000546 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000547else
Guido van Rossume77438c1995-09-13 18:59:59 +0000548
549 case `uname -s` in
550 OSF1) CC=cc
551 without_gcc=;;
552 *) without_gcc=no;;
553 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000554fi
555
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000556echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000557
Guido van Rossum8b131c51995-03-09 14:10:13 +0000558# If the user switches compilers, we can't believe the cache
559if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
560then
561 { echo "configure: error: cached CC is different -- throw away $cache_file
562(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
563fi
564
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565# Extract the first word of "gcc", so it can be a program name with args.
566set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000567echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
568if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
569 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000570else
571 if test -n "$CC"; then
572 ac_cv_prog_CC="$CC" # Let the user override the test.
573else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000574 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
575 for ac_dir in $PATH; do
576 test -z "$ac_dir" && ac_dir=.
577 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000578 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000579 break
580 fi
581 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000582 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000583fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000584fi
585CC="$ac_cv_prog_CC"
586if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000587 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000588else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000589 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000590fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000591
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000592if test -z "$CC"; then
593 # Extract the first word of "cc", so it can be a program name with args.
594set dummy cc; ac_word=$2
595echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
596if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
597 echo $ac_n "(cached) $ac_c" 1>&6
598else
599 if test -n "$CC"; then
600 ac_cv_prog_CC="$CC" # Let the user override the test.
601else
602 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
603 ac_prog_rejected=no
604 for ac_dir in $PATH; do
605 test -z "$ac_dir" && ac_dir=.
606 if test -f $ac_dir/$ac_word; then
607 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
608 ac_prog_rejected=yes
609 continue
610 fi
611 ac_cv_prog_CC="cc"
612 break
613 fi
614 done
615 IFS="$ac_save_ifs"
616if test $ac_prog_rejected = yes; then
617 # We found a bogon in the path, so make sure we never use it.
618 set dummy $ac_cv_prog_CC
619 shift
620 if test $# -gt 0; then
621 # We chose a different compiler from the bogus one.
622 # However, it has the same basename, so the bogon will be chosen
623 # first if we set CC to just the basename; use the full file name.
624 shift
625 set dummy "$ac_dir/$ac_word" "$@"
626 shift
627 ac_cv_prog_CC="$@"
628 fi
629fi
630fi
631fi
632CC="$ac_cv_prog_CC"
633if test -n "$CC"; then
634 echo "$ac_t""$CC" 1>&6
635else
636 echo "$ac_t""no" 1>&6
637fi
638
639 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
640fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000641
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000642echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
643if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
644 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000645else
646 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000647#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000648 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000649#endif
650EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000651if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000652 ac_cv_prog_gcc=yes
653else
654 ac_cv_prog_gcc=no
655fi
656fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000657
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000658echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000659if test $ac_cv_prog_gcc = yes; then
660 GCC=yes
661 if test "${CFLAGS+set}" != set; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000662 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
663if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
664 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000665else
666 echo 'void f(){}' > conftest.c
667if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
668 ac_cv_prog_gcc_g=yes
669else
670 ac_cv_prog_gcc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000671fi
672rm -f conftest*
673
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000674fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000675
676echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000677 if test $ac_cv_prog_gcc_g = yes; then
678 CFLAGS="-g -O"
679 else
680 CFLAGS="-O"
681 fi
682 fi
683else
684 GCC=
685 test "${CFLAGS+set}" = set || CFLAGS="-g"
686fi
687
688# Extract the first word of "ranlib", so it can be a program name with args.
689set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000690echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
691if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
692 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000693else
694 if test -n "$RANLIB"; then
695 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
696else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000697 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
698 for ac_dir in $PATH; do
699 test -z "$ac_dir" && ac_dir=.
700 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000701 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000702 break
703 fi
704 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000705 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000706 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000707fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000708fi
709RANLIB="$ac_cv_prog_RANLIB"
710if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000711 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000712else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000713 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000714fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000715
716
Guido van Rossum7f43da71994-08-01 12:15:30 +0000717for ac_prog in ar aal
718do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000719# Extract the first word of "$ac_prog", so it can be a program name with args.
720set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000721echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
722if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
723 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000724else
725 if test -n "$AR"; then
726 ac_cv_prog_AR="$AR" # Let the user override the test.
727else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
729 for ac_dir in $PATH; do
730 test -z "$ac_dir" && ac_dir=.
731 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000732 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000733 break
734 fi
735 done
736 IFS="$ac_save_ifs"
737fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000738fi
739AR="$ac_cv_prog_AR"
740if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000741 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000742else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000743 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000744fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000745
746test -n "$AR" && break
747done
748test -n "$AR" || AR="ar"
749
750
Guido van Rossumda88dad1995-01-26 00:46:29 +0000751
752
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000753# Install just never works :-(
754if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000755then
756 INSTALL=cp
757 INSTALL_PROGRAM=cp
758 INSTALL_DATA=cp
759else
760 INSTALL_PROGRAM="$INSTALL"
761 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000762fi
763
764# Optimizer/debugger flags passed between Makefiles
765if test -z "$OPT"
766then OPT=-O
767fi
768
Guido van Rossum627b2d71993-12-24 10:39:16 +0000769# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000770echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000771# On Suns, sometimes $CPP names a directory.
772if test -n "$CPP" && test -d "$CPP"; then
773 CPP=
774fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000775if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000776if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
777 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778else
779 # This must be in double quotes, not single quotes, because CPP may get
780 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000781 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782 # On the NeXT, cc -E runs the code through the compiler's parser,
783 # not just through cpp.
784 cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000785#line 786 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000786#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000788Syntax Error
789EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000790ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
791{ (eval echo configure:792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793if test -z "$ac_err"; then
794 :
795else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796 echo "$ac_err" >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797 rm -rf conftest*
798 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799 cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800#line 801 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803Syntax Error
804EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
806{ (eval echo configure:807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000809 :
810else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000812 rm -rf conftest*
813 CPP=/lib/cpp
814fi
815rm -f conftest*
816fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819fi
Guido van Rossume77438c1995-09-13 18:59:59 +0000820 CPP="$ac_cv_prog_CPP"
821else
822 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000823fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000824echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000825
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000826echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828#line 829 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829#include "confdefs.h"
830#ifdef _AIX
831 yes
832#endif
833
834EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
836 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000837 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000838 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839#define _ALL_SOURCE 1
840EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842else
843 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000844 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000845fi
846rm -f conftest*
847
848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849ac_safe=`echo "minix/config.h" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000850echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
851if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
852 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853else
854 cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855#line 856 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856#include "confdefs.h"
857#include <minix/config.h>
858EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000865else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866 echo "$ac_err" >&5
867 rm -rf conftest*
868 eval "ac_cv_header_$ac_safe=no"
869fi
870rm -f conftest*
871fi
872if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000873 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 MINIX=yes
875else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000876 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +0000878fi
879
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880if test "$MINIX" = yes; then
881 cat >> confdefs.h <<\EOF
882#define _POSIX_SOURCE 1
883EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000884
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 cat >> confdefs.h <<\EOF
886#define _POSIX_1_SOURCE 2
887EOF
888
889 cat >> confdefs.h <<\EOF
890#define _MINIX 1
891EOF
892
893fi
894
Guido van Rossumda88dad1995-01-26 00:46:29 +0000895
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000896# checks for header files
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897# If we cannot run a trivial program, we must be cross compiling.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000898echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
899if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
900 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901else
902 if test "$cross_compiling" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000903 ac_cv_c_cross=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904else
905cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906#line 907 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907#include "confdefs.h"
908main(){return(0);}
909EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910{ (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911if test -s conftest && (./conftest; exit) 2>/dev/null; then
912 ac_cv_c_cross=no
913else
914 ac_cv_c_cross=yes
915fi
916fi
917rm -fr conftest*
918fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000920echo "$ac_t""$ac_cv_c_cross" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921cross_compiling=$ac_cv_c_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000923echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
924if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
925 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926else
927 cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928#line 929 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000929#include "confdefs.h"
930#include <stdlib.h>
931#include <stdarg.h>
932#include <string.h>
933#include <float.h>
934EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
936{ (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000939 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 ac_cv_header_stdc=yes
941else
942 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000943 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 ac_cv_header_stdc=no
945fi
946rm -f conftest*
947
948if test $ac_cv_header_stdc = yes; then
949 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
950cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951#line 952 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952#include "confdefs.h"
953#include <string.h>
954EOF
955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
956 egrep "memchr" >/dev/null 2>&1; then
957 :
958else
959 rm -rf conftest*
960 ac_cv_header_stdc=no
961fi
962rm -f conftest*
963
964fi
965
966if test $ac_cv_header_stdc = yes; then
967 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
968cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969#line 970 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970#include "confdefs.h"
971#include <stdlib.h>
972EOF
973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
974 egrep "free" >/dev/null 2>&1; then
975 :
976else
977 rm -rf conftest*
978 ac_cv_header_stdc=no
979fi
980rm -f conftest*
981
982fi
983
984if test $ac_cv_header_stdc = yes; then
985 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
986if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988else
989cat > conftest.$ac_ext <<EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990#line 991 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000991#include "confdefs.h"
992#include <ctype.h>
993#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
994#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +0000996int main () { int i; for (i = 0; i < 256; i++)
997if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
998exit (0); }
999
1000EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001{ (eval echo configure:1002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001002if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 :
1004else
1005 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001006fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001008rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009fi
1010fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001012echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013if test $ac_cv_header_stdc = yes; then
1014 cat >> confdefs.h <<\EOF
1015#define STDC_HEADERS 1
1016EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017
1018fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019
Guido van Rossum2d38f911996-06-26 19:47:01 +00001020for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h \
1021signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossum22b6db61996-06-28 20:18:10 +00001022sys/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 +00001023sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001024do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001026echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1027if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1028 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001029else
1030 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001031#line 1032 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001032#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001033#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001034EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2d38f911996-06-26 19:47:01 +00001036{ (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001039 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 eval "ac_cv_header_$ac_safe=yes"
1041else
1042 echo "$ac_err" >&5
1043 rm -rf conftest*
1044 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001045fi
1046rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047fi
1048if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001049 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001051 cat >> confdefs.h <<EOF
1052#define $ac_tr_hdr 1
1053EOF
1054
1055else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001056 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001058done
1059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060ac_header_dirent=no
1061for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1062do
1063ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001064echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1065if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1066 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001067else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001069#line 1070 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070#include "confdefs.h"
1071#include <sys/types.h>
1072#include <$ac_hdr>
1073int main() { return 0; }
1074int t() {
1075DIR *dirp = 0;
1076; return 0; }
1077EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001078if { (eval echo configure:1079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 rm -rf conftest*
1080 eval "ac_cv_header_dirent_$ac_safe=yes"
1081else
1082 rm -rf conftest*
1083 eval "ac_cv_header_dirent_$ac_safe=no"
1084fi
1085rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001086
1087fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001089 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091 cat >> confdefs.h <<EOF
1092#define $ac_tr_hdr 1
1093EOF
1094 ac_header_dirent=$ac_hdr; break
1095else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001096 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097fi
1098done
1099# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1100if test $ac_header_dirent = dirent.h; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001101echo $ac_n "checking for -ldir""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
1103if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001104 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105else
1106 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001107LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001109#line 1110 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111/* Override any gcc2 internal prototype to avoid an error. */
1112/* We use char because int might match the return type of a gcc2
1113 builtin and then its argument prototype would still apply. */
1114char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115
1116int main() { return 0; }
1117int t() {
1118opendir()
1119; return 0; }
1120EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001121if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001124else
1125 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127fi
1128rm -f conftest*
1129LIBS="$ac_save_LIBS"
1130
1131fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001132if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001133 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 LIBS="$LIBS -ldir"
1135else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001136 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137fi
1138
1139else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001140echo $ac_n "checking for -lx""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
1142if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144else
1145 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001146LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001147cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001148#line 1149 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150/* Override any gcc2 internal prototype to avoid an error. */
1151/* We use char because int might match the return type of a gcc2
1152 builtin and then its argument prototype would still apply. */
1153char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001154
1155int main() { return 0; }
1156int t() {
1157opendir()
1158; return 0; }
1159EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001160if { (eval echo configure:1161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163else
1164 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166fi
1167rm -f conftest*
1168LIBS="$ac_save_LIBS"
1169
1170fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001172 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 LIBS="$LIBS -lx"
1174else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001175 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176fi
1177
1178fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179
1180
1181# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001182was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001183echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001185#line 1186 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186#include "confdefs.h"
1187#include <time.h>
1188EOF
1189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1190 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001191 rm -rf conftest*
1192 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001193else
1194 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195 cat >> confdefs.h <<\EOF
1196#define clock_t long
1197EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001198
1199fi
1200rm -f conftest*
1201
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001202echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001203
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001204echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1205if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1206 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207else
1208 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001209#line 1210 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210#include "confdefs.h"
1211#include <sys/types.h>
1212#if STDC_HEADERS
1213#include <stdlib.h>
1214#endif
1215EOF
1216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1217 egrep "mode_t" >/dev/null 2>&1; then
1218 rm -rf conftest*
1219 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001220else
1221 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223fi
1224rm -f conftest*
1225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001227echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228if test $ac_cv_type_mode_t = no; then
1229 cat >> confdefs.h <<\EOF
1230#define mode_t int
1231EOF
1232
1233fi
1234
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001235echo $ac_n "checking for off_t""... $ac_c" 1>&6
1236if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1237 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238else
1239 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001240#line 1241 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241#include "confdefs.h"
1242#include <sys/types.h>
1243#if STDC_HEADERS
1244#include <stdlib.h>
1245#endif
1246EOF
1247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1248 egrep "off_t" >/dev/null 2>&1; then
1249 rm -rf conftest*
1250 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001251else
1252 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001253 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254fi
1255rm -f conftest*
1256
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001257fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001258echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001259if test $ac_cv_type_off_t = no; then
1260 cat >> confdefs.h <<\EOF
1261#define off_t long
1262EOF
1263
1264fi
1265
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001266echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1267if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1268 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269else
1270 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001271#line 1272 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272#include "confdefs.h"
1273#include <sys/types.h>
1274#if STDC_HEADERS
1275#include <stdlib.h>
1276#endif
1277EOF
1278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1279 egrep "pid_t" >/dev/null 2>&1; then
1280 rm -rf conftest*
1281 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282else
1283 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285fi
1286rm -f conftest*
1287
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001289echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290if test $ac_cv_type_pid_t = no; then
1291 cat >> confdefs.h <<\EOF
1292#define pid_t int
1293EOF
1294
1295fi
1296
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001297echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1298if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1299 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300else
1301 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001302#line 1303 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303#include "confdefs.h"
1304#include <sys/types.h>
1305#include <signal.h>
1306#ifdef signal
1307#undef signal
1308#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001309#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001310extern "C" void (*signal (int, void (*)(int)))(int);
1311#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001312void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001313#endif
1314
Guido van Rossum7f43da71994-08-01 12:15:30 +00001315int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316int t() {
1317int i;
1318; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001320if { (eval echo configure:1321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323else
1324 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326fi
1327rm -f conftest*
1328
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001329fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001330
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001331echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332cat >> confdefs.h <<EOF
1333#define RETSIGTYPE $ac_cv_type_signal
1334EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001337echo $ac_n "checking for size_t""... $ac_c" 1>&6
1338if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1339 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340else
1341 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001342#line 1343 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343#include "confdefs.h"
1344#include <sys/types.h>
1345#if STDC_HEADERS
1346#include <stdlib.h>
1347#endif
1348EOF
1349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1350 egrep "size_t" >/dev/null 2>&1; then
1351 rm -rf conftest*
1352 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353else
1354 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001356fi
1357rm -f conftest*
1358
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001360echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001361if test $ac_cv_type_size_t = no; then
1362 cat >> confdefs.h <<\EOF
1363#define size_t unsigned
1364EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365
1366fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001368echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1369if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371else
1372 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001373#line 1374 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374#include "confdefs.h"
1375#include <sys/types.h>
1376EOF
1377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1378 egrep "uid_t" >/dev/null 2>&1; then
1379 rm -rf conftest*
1380 ac_cv_type_uid_t=yes
1381else
1382 rm -rf conftest*
1383 ac_cv_type_uid_t=no
1384fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001385rm -f conftest*
1386
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001387fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001388
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001389echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390if test $ac_cv_type_uid_t = no; then
1391 cat >> confdefs.h <<\EOF
1392#define uid_t int
1393EOF
1394
1395 cat >> confdefs.h <<\EOF
1396#define gid_t int
1397EOF
1398
1399fi
1400
Guido van Rossum627b2d71993-12-24 10:39:16 +00001401
Guido van Rossum0a516c91994-09-12 10:58:40 +00001402# Set name for machine-dependent library files
1403
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001404echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001405if test -z "$MACHDEP"
1406then
Guido van Rossum2242fd11995-09-19 16:19:29 +00001407 ac_sys_system=`uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1408 ac_sys_release=`uname -r | tr -d '/ ' | sed 's/\..*//'`
Guido van Rossume77438c1995-09-13 18:59:59 +00001409 ac_sys_cpu=`(uname -p 2>/dev/null || uname -m) |
Guido van Rossum2242fd11995-09-19 16:19:29 +00001410 tr '[A-Z]' '[a-z]'`
Guido van Rossume77438c1995-09-13 18:59:59 +00001411## MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001412 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum0a516c91994-09-12 10:58:40 +00001413 case MACHDEP in
1414 '') MACHDEP=unknown;;
1415 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001416fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001417echo "$ac_t""$MACHDEP" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001418
1419# Set info about shared libraries.
1420# XXX This should try things out instead of testing uname!
1421
1422
1423
1424
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001425ac_sys_system=`uname -s`
1426ac_sys_release=`uname -r`
Guido van Rossum0a516c91994-09-12 10:58:40 +00001427# SO is the extension of shared libraries `(including the dot!)
1428# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001429echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001430if test -z "$SO"
1431then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001432 case $ac_sys_system in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001433 hp*|HP*) SO=.sl;;
1434 *) SO=.so;;
1435 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001436fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001437echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001438# LDSHARED is the ld *command* used to create shared library
1439# -- "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 +00001440echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001441if test -z "$LDSHARED"
1442then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001443 case $ac_sys_system/$ac_sys_release in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001444 IRIX*) LDSHARED="ld -shared";;
1445 SunOS/4*) LDSHARED="ld";;
1446 SunOS/5*) LDSHARED="ld -G";;
1447 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001448 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1449 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001450 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001451 FreeBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001452 *) LDSHARED="ld";;
1453 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001454fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001455echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001456# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001457# library -- this is only needed for a few systems
1458echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001459if test -z "$CCSHARED"
1460then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461 case $ac_sys_system in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001462 hp*|HP*) if test "$GCC" = yes;
1463 then CCSHARED="-fpic";
1464 else CCSHARED="+z";
1465 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001466 Linux*) CCSHARED="-fpic";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001467 FreeBSD*) CCSHARED="-fpic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001468 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001469fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001471# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001472# the python executable -- this is only needed for a few systems
1473echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001474if test -z "$LINKFORSHARED"
1475then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001476 case $ac_sys_system in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001477 hp*|HP*) LINKFORSHARED="-Wl,-E";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001478 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001479 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001480fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001481echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001482
Guido van Rossum627b2d71993-12-24 10:39:16 +00001483# checks for libraries
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001484echo $ac_n "checking for -ldl""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001485ac_lib_var=`echo dl'_'dlopen | tr './+\055' '__p_'`
1486if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001487 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488else
1489 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001490LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001492#line 1493 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001493#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001494/* Override any gcc2 internal prototype to avoid an error. */
1495/* We use char because int might match the return type of a gcc2
1496 builtin and then its argument prototype would still apply. */
1497char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001498
Guido van Rossum7f43da71994-08-01 12:15:30 +00001499int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001500int t() {
1501dlopen()
1502; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001503EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001504if { (eval echo configure:1505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001505 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001506 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001507else
1508 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001509 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001510fi
1511rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001512LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001513
Guido van Rossum627b2d71993-12-24 10:39:16 +00001514fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001515if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001516 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001517 ac_tr_lib=HAVE_LIB`echo dl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001518 cat >> confdefs.h <<EOF
1519#define $ac_tr_lib 1
1520EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001521
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001522 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001523
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001524else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001525 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001526fi
1527 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001528echo $ac_n "checking for -ldld""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001529ac_lib_var=`echo dld'_'shl_load | tr './+\055' '__p_'`
1530if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001531 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001532else
1533 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001534LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001535cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001536#line 1537 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001537#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001538/* Override any gcc2 internal prototype to avoid an error. */
1539/* We use char because int might match the return type of a gcc2
1540 builtin and then its argument prototype would still apply. */
1541char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001542
Guido van Rossum7f43da71994-08-01 12:15:30 +00001543int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001544int t() {
1545shl_load()
1546; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001547EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001548if { (eval echo configure:1549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001549 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001550 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001551else
1552 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001553 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001554fi
1555rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001557
Guido van Rossum627b2d71993-12-24 10:39:16 +00001558fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001559if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001560 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001561 ac_tr_lib=HAVE_LIB`echo dld | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001562 cat >> confdefs.h <<EOF
1563#define $ac_tr_lib 1
1564EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001565
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001566 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001567
1568else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001569 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001570fi
1571 # Dynamic linking for HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001572echo $ac_n "checking for -lsun""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001573ac_lib_var=`echo sun'_'getpwnam | tr './+\055' '__p_'`
1574if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001575 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576else
1577 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001578LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001579cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001580#line 1581 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001581#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001582/* Override any gcc2 internal prototype to avoid an error. */
1583/* We use char because int might match the return type of a gcc2
1584 builtin and then its argument prototype would still apply. */
1585char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001586
1587int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001588int t() {
1589getpwnam()
1590; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001591EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001593 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001594 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001595else
1596 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001597 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001598fi
1599rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001600LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001601
Guido van Rossum7f43da71994-08-01 12:15:30 +00001602fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001603if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001604 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001605 ac_tr_lib=HAVE_LIB`echo sun | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001606 cat >> confdefs.h <<EOF
1607#define $ac_tr_lib 1
1608EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001609
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001610 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001611
1612else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001613 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614fi
1615 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001616# The following three (nsl,inet,socket) are needed on Sequent;
1617# the order of checking must be this. Most SVR4 platforms will
1618# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1619# broken. I see no elegant solution (probably CHECK_LIB should be
1620# fixed to only add the library if the given entry point is not
1621# satisfied without it).
1622if test "`uname -s`" != IRIX
1623then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001624echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001625ac_lib_var=`echo nsl'_'t_open | tr './+\055' '__p_'`
1626if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001627 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001628else
1629 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001630LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001631cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001632#line 1633 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001633#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001634/* Override any gcc2 internal prototype to avoid an error. */
1635/* We use char because int might match the return type of a gcc2
1636 builtin and then its argument prototype would still apply. */
1637char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001638
1639int main() { return 0; }
1640int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001641t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001642; return 0; }
1643EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001644if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001645 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001646 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001647else
1648 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001649 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001650fi
1651rm -f conftest*
1652LIBS="$ac_save_LIBS"
1653
1654fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001655if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001656 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001657 LIBS="-lnsl $LIBS"
1658else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001659 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001660fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001661 # SVR4
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001662echo $ac_n "checking for -linet""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001663ac_lib_var=`echo inet'_'gethostbyname | tr './+\055' '__p_'`
1664if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001665 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001666else
1667 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001668LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001669cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001670#line 1671 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001671#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001672/* Override any gcc2 internal prototype to avoid an error. */
1673/* We use char because int might match the return type of a gcc2
1674 builtin and then its argument prototype would still apply. */
1675char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001676
1677int main() { return 0; }
1678int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001679gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001680; return 0; }
1681EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001682if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001683 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001684 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001685else
1686 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001687 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001688fi
1689rm -f conftest*
1690LIBS="$ac_save_LIBS"
1691
1692fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001693if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001694 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001695 LIBS="-linet $LIBS"
1696else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001697 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001698fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001699 # Sequent
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001700echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001701ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
1702if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001703 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704else
1705 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001706LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001708#line 1709 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001709#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001710/* Override any gcc2 internal prototype to avoid an error. */
1711/* We use char because int might match the return type of a gcc2
1712 builtin and then its argument prototype would still apply. */
1713char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001714
1715int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716int t() {
1717socket()
1718; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001719EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001720if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001721 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001722 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001723else
1724 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001725 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001726fi
1727rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001730fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001731if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001732 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001733 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001734else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001735 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001736fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001737 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00001738fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001739
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001740# XXX need to check whether libreadline.a actually exists there!
1741# XXX Also, on some systems, it's libreadline.so...
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001742echo $ac_n "checking for --with-readline""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001743# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001744if test "${with_readline+set}" = set; then
1745 withval="$with_readline"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001747echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001748cat >> confdefs.h <<\EOF
1749#define WITH_READLINE 1
1750EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001751
Guido van Rossum2d38f911996-06-26 19:47:01 +00001752if test -d "$withval"
1753then LIBS="$LIBS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001754fi
1755termcap=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001756echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001757ac_lib_var=`echo termcap'_'tgetent | tr './+\055' '__p_'`
1758if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001759 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001760else
1761 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001762LIBS="-ltermcap $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001763cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001764#line 1765 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001765#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001766/* Override any gcc2 internal prototype to avoid an error. */
1767/* We use char because int might match the return type of a gcc2
1768 builtin and then its argument prototype would still apply. */
1769char tgetent();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001770
Guido van Rossum7f43da71994-08-01 12:15:30 +00001771int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772int t() {
1773tgetent()
1774; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001775EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001776if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001777 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001778 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001779else
1780 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001781 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001782fi
1783rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001784LIBS="$ac_save_LIBS"
1785
1786fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001787if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001788 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001789 termcap=termcap
Guido van Rossum7f43da71994-08-01 12:15:30 +00001790else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001791 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001793echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001794ac_lib_var=`echo termlib'_'tgetent | tr './+\055' '__p_'`
1795if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001796 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797else
1798 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001799LIBS="-ltermlib $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001801#line 1802 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001802#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001803/* Override any gcc2 internal prototype to avoid an error. */
1804/* We use char because int might match the return type of a gcc2
1805 builtin and then its argument prototype would still apply. */
1806char tgetent();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001807
1808int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809int t() {
1810tgetent()
1811; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001812EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001813if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001814 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001815 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816else
1817 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001818 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001819fi
1820rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001821LIBS="$ac_save_LIBS"
1822
1823fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001824if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001825 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001826 termcap=termlib
Guido van Rossum7f43da71994-08-01 12:15:30 +00001827else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001828 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00001829
1830{ echo "configure: error: no working termcap/termlib -- do not use --with-readline" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001831fi
1832
1833fi
1834
Guido van Rossum2d38f911996-06-26 19:47:01 +00001835echo $ac_n "checking for -lreadline""... $ac_c" 1>&6
1836ac_lib_var=`echo readline'_'readline | tr './+\055' '__p_'`
1837if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1838 echo $ac_n "(cached) $ac_c" 1>&6
1839else
1840 ac_save_LIBS="$LIBS"
1841LIBS="-lreadline -l$termcap $LIBS"
1842cat > conftest.$ac_ext <<EOF
1843#line 1844 "configure"
1844#include "confdefs.h"
1845/* Override any gcc2 internal prototype to avoid an error. */
1846/* We use char because int might match the return type of a gcc2
1847 builtin and then its argument prototype would still apply. */
1848char readline();
1849
1850int main() { return 0; }
1851int t() {
1852readline()
1853; return 0; }
1854EOF
1855if { (eval echo configure:1856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1856 rm -rf conftest*
1857 eval "ac_cv_lib_$ac_lib_var=yes"
1858else
1859 rm -rf conftest*
1860 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001861fi
Guido van Rossum2d38f911996-06-26 19:47:01 +00001862rm -f conftest*
1863LIBS="$ac_save_LIBS"
1864
1865fi
1866if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1867 echo "$ac_t""yes" 1>&6
1868
1869LIBS="$LIBS -lreadline"
1870# Avoid possible conflict between shared libraries termcap and gl
1871# on IRIX 5: both contain a routine called clear.
1872if test -f /usr/lib/lib$termcap.a
1873then LIBS="$LIBS /usr/lib/lib$termcap.a"
1874else LIBS="$LIBS -l$termcap"
1875fi
1876
1877else
1878 echo "$ac_t""no" 1>&6
1879{ echo "configure: error: no working GNU readline -- do not use --with-readline" 1>&2; exit 1; }
1880fi
1881
Guido van Rossumda88dad1995-01-26 00:46:29 +00001882else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001883 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001884fi
1885
1886
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001887echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001889if test "${with_thread+set}" = set; then
1890 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001892echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001893if test -d "$withval"
1894then LIBS="$LIBS -L$withval"
1895fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001896echo $ac_n "checking for -lpthreads""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001897ac_lib_var=`echo pthreads'_'pthread_create | tr './+\055' '__p_'`
1898if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001899 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001900else
1901 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001902LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001903cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001904#line 1905 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001905#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001906/* Override any gcc2 internal prototype to avoid an error. */
1907/* We use char because int might match the return type of a gcc2
1908 builtin and then its argument prototype would still apply. */
1909char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001910
1911int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001912int t() {
1913pthread_create()
1914; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001915EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00001916if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001917 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001918 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919else
1920 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001921 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001922fi
1923rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001925
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001927if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001928 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001929 cat >> confdefs.h <<\EOF
1930#define WITH_THREAD 1
1931EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001932
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001933cat >> confdefs.h <<\EOF
1934#define _POSIX_THREADS 1
1935EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001936
1937LIBS="$LIBS -lpthreads"
1938LIBOBJS="$LIBOBJS thread.o"
1939else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001940 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00001941
1942echo $ac_n "checking for -lpthread""... $ac_c" 1>&6
1943ac_lib_var=`echo pthread'_'pthread_create | tr './+\055' '__p_'`
1944if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1945 echo $ac_n "(cached) $ac_c" 1>&6
1946else
1947 ac_save_LIBS="$LIBS"
1948LIBS="-lpthread $LIBS"
1949cat > conftest.$ac_ext <<EOF
1950#line 1951 "configure"
1951#include "confdefs.h"
1952/* Override any gcc2 internal prototype to avoid an error. */
1953/* We use char because int might match the return type of a gcc2
1954 builtin and then its argument prototype would still apply. */
1955char pthread_create();
1956
1957int main() { return 0; }
1958int t() {
1959pthread_create()
1960; return 0; }
1961EOF
1962if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1963 rm -rf conftest*
1964 eval "ac_cv_lib_$ac_lib_var=yes"
1965else
1966 rm -rf conftest*
1967 eval "ac_cv_lib_$ac_lib_var=no"
1968fi
1969rm -f conftest*
1970LIBS="$ac_save_LIBS"
1971
1972fi
1973if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1974 echo "$ac_t""yes" 1>&6
1975 cat >> confdefs.h <<\EOF
1976#define WITH_THREAD 1
1977EOF
1978
1979cat >> confdefs.h <<\EOF
1980#define _POSIX_THREADS 1
1981EOF
1982
1983LIBS="$LIBS -lpthread"
1984LIBOBJS="$LIBOBJS thread.o"
1985else
1986 echo "$ac_t""no" 1>&6
1987fi
1988
1989
Guido van Rossum627b2d71993-12-24 10:39:16 +00001990fi
1991
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001992echo $ac_n "checking for -lmpc""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001993ac_lib_var=`echo mpc'_'usconfig | tr './+\055' '__p_'`
1994if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001995 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001996else
1997 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001998LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001999cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002000#line 2001 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002001#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002002/* Override any gcc2 internal prototype to avoid an error. */
2003/* We use char because int might match the return type of a gcc2
2004 builtin and then its argument prototype would still apply. */
2005char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002006
Guido van Rossum7f43da71994-08-01 12:15:30 +00002007int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002008int t() {
2009usconfig()
2010; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002011EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002012if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002013 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002014 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002015else
2016 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002017 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002018fi
2019rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002020LIBS="$ac_save_LIBS"
2021
2022fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002023if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002024 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002025 cat >> confdefs.h <<\EOF
2026#define WITH_THREAD 1
2027EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002028
Guido van Rossum7f43da71994-08-01 12:15:30 +00002029LIBS="$LIBS -lmpc"
2030LIBOBJS="$LIBOBJS thread.o"
2031else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002032 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002033fi
2034
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002035echo $ac_n "checking for -lthread""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002036ac_lib_var=`echo thread'_'thr_create | tr './+\055' '__p_'`
2037if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002038 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002039else
2040 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002041LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002042cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002043#line 2044 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002044#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002045/* Override any gcc2 internal prototype to avoid an error. */
2046/* We use char because int might match the return type of a gcc2
2047 builtin and then its argument prototype would still apply. */
2048char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002049
Guido van Rossum7f43da71994-08-01 12:15:30 +00002050int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002051int t() {
2052thr_create()
2053; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002054EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002056 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002057 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002058else
2059 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002060 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002061fi
2062rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002063LIBS="$ac_save_LIBS"
2064
2065fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002066if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002067 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002068 cat >> confdefs.h <<\EOF
2069#define WITH_THREAD 1
2070EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002071
Guido van Rossum7f43da71994-08-01 12:15:30 +00002072LIBS="$LIBS -lthread"
2073LIBOBJS="$LIBOBJS thread.o"
2074else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002075 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002076fi
2077
Guido van Rossum7f43da71994-08-01 12:15:30 +00002078
Guido van Rossumda88dad1995-01-26 00:46:29 +00002079else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002080 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002081fi
2082
Guido van Rossum7f43da71994-08-01 12:15:30 +00002083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002084# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002085
2086DLINCLDIR=/
2087
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002088echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002089# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002090if test "${with_sgi_dl+set}" = set; then
2091 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002092
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002093echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094cat >> confdefs.h <<\EOF
2095#define WITH_SGI_DL 1
2096EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002097
2098dldir=$withval
2099if test -d "$dldir"
2100then LIBS="$LIBS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002101else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002102fi
2103DLINCLDIR=${dldir}
2104LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002105else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002106 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002107fi
2108
2109
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002110echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002111# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002112if test "${with_dl_dld+set}" = set; then
2113 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002114
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002115echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002116cat >> confdefs.h <<\EOF
2117#define WITH_DL_DLD 1
2118EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002119
2120dldir=`echo "$withval" | sed 's/,.*//'`
2121dlddir=`echo "$withval" | sed 's/.*,//'`
2122if test -d "$dldir" -a -d "$dlddir"
2123then LIBS="$LIBS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002124else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002125fi
2126DLINCLDIR=${dldir}
2127LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002128else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002129 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002130fi
2131
2132
Guido van Rossum627b2d71993-12-24 10:39:16 +00002133# checks for library functions
Guido van Rossum2d38f911996-06-26 19:47:01 +00002134for ac_func in chown clock dlopen flock ftime ftruncate \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002135 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
Guido van Rossum22b6db61996-06-28 20:18:10 +00002136 link lstat mkfifo nice plock readlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002137 select setgid setuid setsid setpgid setpgrp setvbuf \
2138 sigaction siginterrupt sigrelse strftime symlink \
2139 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002140do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002141echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2142if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2143 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002144else
2145 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002146#line 2147 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002147#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002148/* System header to define __stub macros and hopefully few prototypes,
2149 which can conflict with char $ac_func(); below. */
2150#include <assert.h>
2151/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002152/* We use char because int might match the return type of a gcc2
2153 builtin and then its argument prototype would still apply. */
2154char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002155
Guido van Rossum7f43da71994-08-01 12:15:30 +00002156int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157int t() {
2158
Guido van Rossum627b2d71993-12-24 10:39:16 +00002159/* The GNU C library defines this for functions which it implements
2160 to always fail with ENOSYS. Some functions are actually named
2161 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002162#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002163choke me
2164#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002165$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002166#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002167
Guido van Rossum7f43da71994-08-01 12:15:30 +00002168; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002169EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002170if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002171 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002172 eval "ac_cv_func_$ac_func=yes"
2173else
2174 rm -rf conftest*
2175 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002176fi
2177rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002178
2179fi
2180if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002181 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002182 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002183 cat >> confdefs.h <<EOF
2184#define $ac_tr_func 1
2185EOF
2186
2187else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002188 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002189fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002190done
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002191 \
Guido van Rossum7f43da71994-08-01 12:15:30 +00002192for ac_func in dup2 getcwd strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002193do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002194echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2195if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2196 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002197else
2198 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002199#line 2200 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002200#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002201/* System header to define __stub macros and hopefully few prototypes,
2202 which can conflict with char $ac_func(); below. */
2203#include <assert.h>
2204/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002205/* We use char because int might match the return type of a gcc2
2206 builtin and then its argument prototype would still apply. */
2207char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002208
Guido van Rossum7f43da71994-08-01 12:15:30 +00002209int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210int t() {
2211
Guido van Rossum627b2d71993-12-24 10:39:16 +00002212/* The GNU C library defines this for functions which it implements
2213 to always fail with ENOSYS. Some functions are actually named
2214 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002216choke me
2217#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002218$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002219#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002220
Guido van Rossum7f43da71994-08-01 12:15:30 +00002221; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002222EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002223if { (eval echo configure:2224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002224 rm -rf conftest*
2225 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002226else
2227 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002228 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002229fi
2230rm -f conftest*
2231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002232fi
2233if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002234 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235 :
2236else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002237 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002238LIBOBJS="$LIBOBJS ${ac_func}.o"
2239fi
2240
Guido van Rossum627b2d71993-12-24 10:39:16 +00002241done
2242
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002243echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
2244if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2245 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002246else
2247 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002248#line 2249 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002249#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002250/* System header to define __stub macros and hopefully few prototypes,
2251 which can conflict with char getpgrp(); below. */
2252#include <assert.h>
2253/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002254/* We use char because int might match the return type of a gcc2
2255 builtin and then its argument prototype would still apply. */
2256char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002257
Guido van Rossum7f43da71994-08-01 12:15:30 +00002258int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002259int t() {
2260
Guido van Rossum627b2d71993-12-24 10:39:16 +00002261/* The GNU C library defines this for functions which it implements
2262 to always fail with ENOSYS. Some functions are actually named
2263 something starting with __ and the normal name is an alias. */
2264#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2265choke me
2266#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002267getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002268#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002269
2270; return 0; }
2271EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002272if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002273 rm -rf conftest*
2274 eval "ac_cv_func_getpgrp=yes"
2275else
2276 rm -rf conftest*
2277 eval "ac_cv_func_getpgrp=no"
2278fi
2279rm -f conftest*
2280
2281fi
2282if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002283 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002284 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002285#line 2286 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002286#include "confdefs.h"
2287#include <unistd.h>
2288int main() { return 0; }
2289int t() {
2290getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002291; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002292EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002293if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002294 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002295 cat >> confdefs.h <<\EOF
2296#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002297EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002298
2299fi
2300rm -f conftest*
2301
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002302else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002303 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002304fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002305
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002306echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
2307if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2308 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002309else
2310 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002311#line 2312 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002312#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002313/* System header to define __stub macros and hopefully few prototypes,
2314 which can conflict with char setpgrp(); below. */
2315#include <assert.h>
2316/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002317/* We use char because int might match the return type of a gcc2
2318 builtin and then its argument prototype would still apply. */
2319char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002320
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002321int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002322int t() {
2323
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002324/* The GNU C library defines this for functions which it implements
2325 to always fail with ENOSYS. Some functions are actually named
2326 something starting with __ and the normal name is an alias. */
2327#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2328choke me
2329#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002330setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002331#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002332
2333; return 0; }
2334EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002335if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002336 rm -rf conftest*
2337 eval "ac_cv_func_setpgrp=yes"
2338else
2339 rm -rf conftest*
2340 eval "ac_cv_func_setpgrp=no"
2341fi
2342rm -f conftest*
2343
2344fi
2345if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002346 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002347 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002348#line 2349 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002349#include "confdefs.h"
2350#include <unistd.h>
2351int main() { return 0; }
2352int t() {
2353setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002354; return 0; }
2355EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002356if { (eval echo configure:2357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002357 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002358 cat >> confdefs.h <<\EOF
2359#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002360EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002361
2362fi
2363rm -f conftest*
2364
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002365else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002366 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002367fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002368
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002369echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
2370if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2371 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002372else
2373 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002374#line 2375 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002375#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002376/* System header to define __stub macros and hopefully few prototypes,
2377 which can conflict with char gettimeofday(); below. */
2378#include <assert.h>
2379/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002384int main() { return 0; }
2385int t() {
2386
2387/* The GNU C library defines this for functions which it implements
2388 to always fail with ENOSYS. Some functions are actually named
2389 something starting with __ and the normal name is an alias. */
2390#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2391choke me
2392#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002393gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002394#endif
2395
2396; return 0; }
2397EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002398if { (eval echo configure:2399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002399 rm -rf conftest*
2400 eval "ac_cv_func_gettimeofday=yes"
2401else
2402 rm -rf conftest*
2403 eval "ac_cv_func_gettimeofday=no"
2404fi
2405rm -f conftest*
2406
2407fi
2408if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002409 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002410 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002411#line 2412 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002412#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002413#include <sys/time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002414int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002415int t() {
2416gettimeofday((struct timeval*)0,(struct timezone*)0);
2417; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002418EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002419if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002420 :
2421else
2422 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002423 cat >> confdefs.h <<\EOF
2424#define GETTIMEOFDAY_NO_TZ 1
2425EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002426
2427fi
2428rm -f conftest*
2429
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002430else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002431 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002432fi
2433
2434
2435# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002436echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2437if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2438 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002439else
2440 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002441#line 2442 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002442#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002443#include <sys/types.h>
2444#include <sys/time.h>
2445#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002446int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447int t() {
2448struct tm *tp;
2449; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002450EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002451if { (eval echo configure:2452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002452 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002453 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002454else
2455 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002456 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002457fi
2458rm -f conftest*
2459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002460fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002461
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002462echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002463if test $ac_cv_header_time = yes; then
2464 cat >> confdefs.h <<\EOF
2465#define TIME_WITH_SYS_TIME 1
2466EOF
2467
2468fi
2469
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002470echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2471if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2472 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002473else
2474 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002475#line 2476 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002476#include "confdefs.h"
2477#include <sys/types.h>
2478#include <time.h>
2479int main() { return 0; }
2480int t() {
2481struct tm *tp; tp->tm_sec;
2482; return 0; }
2483EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002484if { (eval echo configure:2485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002485 rm -rf conftest*
2486 ac_cv_struct_tm=time.h
2487else
2488 rm -rf conftest*
2489 ac_cv_struct_tm=sys/time.h
2490fi
2491rm -f conftest*
2492
2493fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002494
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002495echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002496if test $ac_cv_struct_tm = sys/time.h; then
2497 cat >> confdefs.h <<\EOF
2498#define TM_IN_SYS_TIME 1
2499EOF
2500
2501fi
2502
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002503echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2504if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2505 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506else
2507 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002508#line 2509 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002509#include "confdefs.h"
2510#include <sys/types.h>
2511#include <$ac_cv_struct_tm>
2512int main() { return 0; }
2513int t() {
2514struct tm tm; tm.tm_zone;
2515; return 0; }
2516EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002517if { (eval echo configure:2518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002518 rm -rf conftest*
2519 ac_cv_struct_tm_zone=yes
2520else
2521 rm -rf conftest*
2522 ac_cv_struct_tm_zone=no
2523fi
2524rm -f conftest*
2525
2526fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002527
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002528echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002529if test "$ac_cv_struct_tm_zone" = yes; then
2530 cat >> confdefs.h <<\EOF
2531#define HAVE_TM_ZONE 1
2532EOF
2533
2534else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002535 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2536if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002538else
2539 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002540#line 2541 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002541#include "confdefs.h"
2542#include <time.h>
2543#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002544extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002545#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00002546int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002547int t() {
2548atoi(*tzname);
2549; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002550EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002551if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002552 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002553 ac_cv_var_tzname=yes
2554else
2555 rm -rf conftest*
2556 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002557fi
2558rm -f conftest*
2559
2560fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002561
2562echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002563 if test $ac_cv_var_tzname = yes; then
2564 cat >> confdefs.h <<\EOF
2565#define HAVE_TZNAME 1
2566EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002567
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002568 fi
2569fi
2570
2571
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002572echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
2573if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+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 Rossum2d38f911996-06-26 19:47:01 +00002577#line 2578 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002578#include "confdefs.h"
2579#include <time.h>
2580int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002581int t() {
2582return altzone;
2583; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002584EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002585if { (eval echo configure:2586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002586 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587 ac_cv_header_time_altzone=yes
2588else
2589 rm -rf conftest*
2590 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002591fi
2592rm -f conftest*
2593
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002594fi
2595
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002596echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597if test $ac_cv_header_time_altzone = yes; then
2598 cat >> confdefs.h <<\EOF
2599#define HAVE_ALTZONE 1
2600EOF
2601
2602fi
2603
Guido van Rossumda88dad1995-01-26 00:46:29 +00002604was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002605echo $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 +00002606cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002607#line 2608 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002608#include "confdefs.h"
2609
2610#include <sys/types.h>
2611#include <sys/select.h>
2612#include <sys/time.h>
2613
2614int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615int t() {
2616;
2617; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002618EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002619if { (eval echo configure:2620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002620 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621 cat >> confdefs.h <<\EOF
2622#define SYS_SELECT_WITH_SYS_TIME 1
2623EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002624 was_it_defined=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002625fi
2626rm -f conftest*
2627
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002628echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002629
2630# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00002631
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002632echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2633if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2634 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002635else
2636 if test "$GCC" = yes; then
2637 # GCC predefines this symbol on systems where it applies.
2638cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002639#line 2640 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002640#include "confdefs.h"
2641#ifdef __CHAR_UNSIGNED__
2642 yes
2643#endif
2644
2645EOF
2646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2647 egrep "yes" >/dev/null 2>&1; then
2648 rm -rf conftest*
2649 ac_cv_c_char_unsigned=yes
2650else
2651 rm -rf conftest*
2652 ac_cv_c_char_unsigned=no
2653fi
2654rm -f conftest*
2655
2656else
2657if test "$cross_compiling" = yes; then
2658 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2659else
2660cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002661#line 2662 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002662#include "confdefs.h"
2663/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002664#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00002665#define volatile
2666#endif
2667main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00002668 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002669}
2670EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002671{ (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002672if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673 ac_cv_c_char_unsigned=yes
2674else
2675 ac_cv_c_char_unsigned=no
2676fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002677fi
2678rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
2680fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002682echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2684 cat >> confdefs.h <<\EOF
2685#define __CHAR_UNSIGNED__ 1
2686EOF
2687
2688fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002689
2690
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002691echo $ac_n "checking for working const""... $ac_c" 1>&6
2692if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694else
2695 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002696#line 2697 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697#include "confdefs.h"
2698
2699int main() { return 0; }
2700int t() {
2701
2702/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002703typedef int charset[2]; const charset x;
2704/* SunOS 4.1.1 cc rejects this. */
2705char const *const *ccp;
2706char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707/* NEC SVR4.0.2 mips cc rejects this. */
2708struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002709static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002710/* AIX XL C 1.02.0.0 rejects this.
2711 It does not let you subtract one const X* pointer from another in an arm
2712 of an if-expression whose if-part is not a constant expression */
2713const char *g = "string";
2714ccp = &g + (g ? g-g : 0);
2715/* HPUX 7.0 cc rejects these. */
2716++ccp;
2717p = (char**) ccp;
2718ccp = (char const *const *) p;
2719{ /* SCO 3.2v4 cc rejects this. */
2720 char *t;
2721 char const *s = 0 ? (char *) 0 : (char const *) 0;
2722
2723 *t++ = 0;
2724}
2725{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002727 const int *foo = &x[0];
2728 ++foo;
2729}
2730{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2731 typedef const int *iptr;
2732 iptr p = 0;
2733 ++p;
2734}
2735{ /* AIX XL C 1.02.0.0 rejects this saying
2736 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2737 struct s { int j; const int *ap[3]; };
2738 struct s *b; b->j = 5;
2739}
2740{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2741 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742}
2743
2744; return 0; }
2745EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002746if { (eval echo configure:2747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747 rm -rf conftest*
2748 ac_cv_c_const=yes
2749else
2750 rm -rf conftest*
2751 ac_cv_c_const=no
2752fi
2753rm -f conftest*
2754
2755fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002756
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002757echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758if test $ac_cv_c_const = no; then
2759 cat >> confdefs.h <<\EOF
2760#define const
2761EOF
2762
2763fi
2764
2765
Guido van Rossumda88dad1995-01-26 00:46:29 +00002766works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002767echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002769#line 2770 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002770#include "confdefs.h"
2771
Guido van Rossum7f43da71994-08-01 12:15:30 +00002772int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773int t() {
2774volatile int x; x = 0;
2775; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002776EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002777if { (eval echo configure:2778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002778 rm -rf conftest*
2779 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002780else
2781 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002782 cat >> confdefs.h <<\EOF
2783#define volatile
2784EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002785
2786fi
2787rm -f conftest*
2788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002789echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002790
Guido van Rossumda88dad1995-01-26 00:46:29 +00002791works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002792echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002794#line 2795 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002795#include "confdefs.h"
2796
2797int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002798int t() {
2799signed char c;
2800; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002801EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002802if { (eval echo configure:2803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002803 rm -rf conftest*
2804 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002805else
2806 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002807 cat >> confdefs.h <<\EOF
2808#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00002809EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002810
2811fi
2812rm -f conftest*
2813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002814echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002815
Guido van Rossumda88dad1995-01-26 00:46:29 +00002816have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002817echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002818cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002819#line 2820 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002820#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002821int foo(int x) { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002822int main() { return 0; }
2823int t() {
2824return foo(10);
2825; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002826EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002827if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002828 rm -rf conftest*
2829 cat >> confdefs.h <<\EOF
2830#define HAVE_PROTOTYPES 1
2831EOF
2832 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002833fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002835
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002836echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002837
Guido van Rossumda88dad1995-01-26 00:46:29 +00002838works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002839echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002841#line 2842 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002842#include "confdefs.h"
2843
2844#include <stdarg.h>
2845int foo(int x, ...) { return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847int main() { return 0; }
2848int t() {
2849return foo(10, 11, 12);
2850; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002851EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002852if { (eval echo configure:2853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002853 rm -rf conftest*
2854 cat >> confdefs.h <<\EOF
2855#define HAVE_STDARG_PROTOTYPES 1
2856EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002857 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002858fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002859rm -f conftest*
2860
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002861echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862
Guido van Rossumda88dad1995-01-26 00:46:29 +00002863if test "$have_prototypes" = yes; then
2864bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002865echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002866cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002867#line 2868 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002868#include "confdefs.h"
2869#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002870int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002871int t() {
2872char **t;execve("@",t,t);
2873; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002874EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002875if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002876 :
2877else
2878 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002879 cat >> confdefs.h <<\EOF
2880#define BAD_EXEC_PROTOTYPES 1
2881EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002882 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002883fi
2884rm -f conftest*
2885
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002886echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002887fi
2888
Guido van Rossumda88dad1995-01-26 00:46:29 +00002889bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002890echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002891if test "$cross_compiling" = yes; then
2892 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2893else
2894cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002895#line 2896 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002896#include "confdefs.h"
2897
2898struct s { int a; int b; };
2899static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002900int foobar() {
2901 static int random;
2902 random = (int) &foo;
2903 return random;
2904}
Guido van Rossum7f43da71994-08-01 12:15:30 +00002905static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002906main() {
2907 exit(!((int)&foo == foobar()));
2908}
Guido van Rossum7f43da71994-08-01 12:15:30 +00002909
2910EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002911{ (eval echo configure:2912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002912if test -s conftest && (./conftest; exit) 2>/dev/null; then
2913 :
2914else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002915 cat >> confdefs.h <<\EOF
2916#define BAD_STATIC_FORWARD 1
2917EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002918 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002919fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002920fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002921rm -fr conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002922echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002923
Guido van Rossumda88dad1995-01-26 00:46:29 +00002924va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002925echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002926cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002927#line 2928 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002928#include "confdefs.h"
2929
2930#ifdef HAVE_STDARG_PROTOTYPES
2931#include <stdarg.h>
2932#else
2933#include <varargs.h>
2934#endif
2935
2936int main() { return 0; }
2937int t() {
2938va_list list1, list2; list1 = list2;
2939; return 0; }
2940EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002941if { (eval echo configure:2942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002942 :
2943else
2944 rm -rf conftest*
2945 cat >> confdefs.h <<\EOF
2946#define VA_LIST_IS_ARRAY 1
2947EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002948 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002949fi
2950rm -f conftest*
2951
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002952echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002953
Guido van Rossum627b2d71993-12-24 10:39:16 +00002954# checks for system services
2955# (none yet)
2956
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002957# Linux requires this for correct f.p. operations
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002958echo $ac_n "checking for -lieee""... $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002959ac_lib_var=`echo ieee'_'__fpu_control | tr './+\055' '__p_'`
2960if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002961 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002962else
2963 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002964LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002965cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002966#line 2967 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002967#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002968/* Override any gcc2 internal prototype to avoid an error. */
2969/* We use char because int might match the return type of a gcc2
2970 builtin and then its argument prototype would still apply. */
2971char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002972
Guido van Rossum7f43da71994-08-01 12:15:30 +00002973int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002974int t() {
2975__fpu_control()
2976; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002977EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00002978if { (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002979 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002980 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002981else
Guido van Rossum627b2d71993-12-24 10:39:16 +00002982 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002983 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002984fi
2985rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002986LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002987
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002988fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002989if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002990 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002991 ac_tr_lib=HAVE_LIB`echo ieee | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002992 cat >> confdefs.h <<EOF
2993#define $ac_tr_lib 1
2994EOF
2995
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002996 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002997
2998else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002999 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003000fi
3001
3002
Guido van Rossum7f43da71994-08-01 12:15:30 +00003003# check for --with-libm=...
3004
3005LIBM=-lm
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003006# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003007if test "${with_libm+set}" = set; then
3008 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003009
3010if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003011then LIBM=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003012else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003013fi
3014fi
3015
3016
3017# check for --with-libc=...
3018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003019# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003020if test "${with_libc+set}" = set; then
3021 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003022
3023if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003024then LIBC=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003025else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003026fi
3027fi
3028
3029
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003030# check for hypot() in math library
3031LIBS_SAVE=$LIBS
3032LIBS="$LIBS $LIBM"
3033for ac_func in hypot
3034do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003035echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3036if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3037 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003038else
3039 cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00003040#line 3041 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003041#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003042/* System header to define __stub macros and hopefully few prototypes,
3043 which can conflict with char $ac_func(); below. */
3044#include <assert.h>
3045/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003046/* We use char because int might match the return type of a gcc2
3047 builtin and then its argument prototype would still apply. */
3048char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003049
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003050int main() { return 0; }
3051int t() {
3052
3053/* The GNU C library defines this for functions which it implements
3054 to always fail with ENOSYS. Some functions are actually named
3055 something starting with __ and the normal name is an alias. */
3056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3057choke me
3058#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003059$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003060#endif
3061
3062; return 0; }
3063EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00003064if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003065 rm -rf conftest*
3066 eval "ac_cv_func_$ac_func=yes"
3067else
3068 rm -rf conftest*
3069 eval "ac_cv_func_$ac_func=no"
3070fi
3071rm -f conftest*
3072
3073fi
3074if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003075 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003076 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003077 cat >> confdefs.h <<EOF
3078#define $ac_tr_func 1
3079EOF
3080
3081else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003082 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003083fi
3084done
3085
3086LIBS=$LIBS_SAVE
3087
Guido van Rossumda88dad1995-01-26 00:46:29 +00003088# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003089echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
3090if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3091 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003092else
3093 if test "$cross_compiling" = yes; then
3094 ac_cv_func_getopt=no
3095else
3096cat > conftest.$ac_ext <<EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00003097#line 3098 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003098#include "confdefs.h"
3099#include <stdio.h>
3100extern int optind, opterr, getopt();
3101extern char* optarg;
3102int main() {
3103 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3104 opterr = 0;
3105 if (getopt(3, av, "f:") == 'f') { exit(1); }
3106 exit(0);
3107}
3108EOF
Guido van Rossum2d38f911996-06-26 19:47:01 +00003109{ (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00003110if test -s conftest && (./conftest; exit) 2>/dev/null; then
3111 ac_cv_func_getopt=yes
3112else
3113 ac_cv_func_getopt=no
3114fi
3115fi
3116rm -fr conftest*
3117fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003118echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003119test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3120
Guido van Rossum627b2d71993-12-24 10:39:16 +00003121# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003123cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003124# This file is a shell script that caches the results of configure
3125# tests run on this system so they can be shared between configure
3126# scripts and configure runs. It is not useful on other systems.
3127# If it contains results you don't want to keep, you may remove or edit it.
3128#
3129# By default, configure uses ./config.cache as the cache file,
3130# creating it if it does not exist already. You can give configure
3131# the --cache-file=FILE option to use a different cache file; that is
3132# what configure does when it calls configure scripts in
3133# subdirectories, so they share the cache.
3134# Giving --cache-file=/dev/null disables caching, for debugging configure.
3135# config.status only pays attention to the cache file if you give it the
3136# --recheck option to rerun configure.
3137#
3138EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003139# Ultrix sh set writes to stderr and can't be redirected directly,
3140# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003141(set) 2>&1 |
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003142 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3143 >> confcache
3144if cmp -s $cache_file confcache; then
3145 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003146else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003147 if test -w $cache_file; then
3148 echo "updating cache $cache_file"
3149 cat confcache > $cache_file
3150 else
3151 echo "not updating unwritable cache $cache_file"
3152 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003153fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003154rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003155
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003156trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003157
3158test "x$prefix" = xNONE && prefix=$ac_default_prefix
3159# Let make expand exec_prefix.
3160test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003161
Guido van Rossum7f43da71994-08-01 12:15:30 +00003162# Any assignment to VPATH causes Sun make to only execute
3163# the first set of double-colon rules, so remove it if not needed.
3164# If there is a colon in the path, we need to keep it.
3165if test "x$srcdir" = x.; then
3166 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3167fi
3168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003171DEFS=-DHAVE_CONFIG_H
3172
3173# Without the "./", some shells look in PATH for config.status.
3174: ${CONFIG_STATUS=./config.status}
3175
3176echo creating $CONFIG_STATUS
3177rm -f $CONFIG_STATUS
3178cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003179#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003180# Generated automatically by configure.
3181# Run this file to recreate the current configuration.
3182# This directory was configured as follows,
3183# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3184#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003185# $0 $ac_configure_args
3186#
3187# Compiler output produced by configure, useful for debugging
3188# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003190ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003191for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003192do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003193 case "\$ac_option" in
3194 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003195 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3196 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003197 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003198 echo "$CONFIG_STATUS generated by autoconf version 2.10"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003199 exit 0 ;;
3200 -help | --help | --hel | --he | --h)
3201 echo "\$ac_cs_usage"; exit 0 ;;
3202 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003203 esac
3204done
3205
Guido van Rossum7f43da71994-08-01 12:15:30 +00003206ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003207
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003208trap 'rm -fr `echo "Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003209EOF
3210cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003211
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003212# Protect against being on the right side of a sed subst in config.status.
3213sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3214 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003215$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003216$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003217s%@CFLAGS@%$CFLAGS%g
3218s%@CPPFLAGS@%$CPPFLAGS%g
3219s%@CXXFLAGS@%$CXXFLAGS%g
3220s%@DEFS@%$DEFS%g
3221s%@LDFLAGS@%$LDFLAGS%g
3222s%@LIBS@%$LIBS%g
3223s%@exec_prefix@%$exec_prefix%g
3224s%@prefix@%$prefix%g
3225s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003226s%@bindir@%$bindir%g
3227s%@sbindir@%$sbindir%g
3228s%@libexecdir@%$libexecdir%g
3229s%@datadir@%$datadir%g
3230s%@sysconfdir@%$sysconfdir%g
3231s%@sharedstatedir@%$sharedstatedir%g
3232s%@localstatedir@%$localstatedir%g
3233s%@libdir@%$libdir%g
3234s%@includedir@%$includedir%g
3235s%@oldincludedir@%$oldincludedir%g
3236s%@infodir@%$infodir%g
3237s%@mandir@%$mandir%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003238s%@CC@%$CC%g
3239s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003240s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003241s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003242s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3243s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003244s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003245s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003246s%@MACHDEP@%$MACHDEP%g
3247s%@SO@%$SO%g
3248s%@LDSHARED@%$LDSHARED%g
3249s%@CCSHARED@%$CCSHARED%g
3250s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003251s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003252s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003253s%@LIBM@%$LIBM%g
3254s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003255
3256CEOF
3257EOF
3258cat >> $CONFIG_STATUS <<EOF
3259
3260CONFIG_FILES=\${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
3261EOF
3262cat >> $CONFIG_STATUS <<\EOF
3263for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3264 # Support "outfile[:infile]", defaulting infile="outfile.in".
3265 case "$ac_file" in
3266 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3267 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3268 *) ac_file_in="${ac_file}.in" ;;
3269 esac
3270
3271 # Adjust relative srcdir, etc. for subdirectories.
3272
3273 # Remove last slash and all that follows it. Not all systems have dirname.
3274 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3275 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3276 # The file is in a subdirectory.
3277 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003278 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003279 # A "../" for each directory in $ac_dir_suffix.
3280 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3281 else
3282 ac_dir_suffix= ac_dots=
3283 fi
3284
3285 case "$ac_given_srcdir" in
3286 .) srcdir=.
3287 if test -z "$ac_dots"; then top_srcdir=.
3288 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3289 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3290 *) # Relative path.
3291 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3292 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3293 esac
3294
3295 echo creating "$ac_file"
3296 rm -f "$ac_file"
3297 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3298 case "$ac_file" in
3299 *Makefile*) ac_comsub="1i\\
3300# $configure_input" ;;
3301 *) ac_comsub= ;;
3302 esac
3303 sed -e "$ac_comsub
3304s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003305s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003306s%@top_srcdir@%$top_srcdir%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003307" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00003308fi; done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003309rm -f conftest.subs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003310
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3312# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00003313#
3314# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003315ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3316ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003317ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003318ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003319# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003320ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3321ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003322ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003323ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003324# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003325ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3326ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003327ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003329
3330CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3332 # Support "outfile[:infile]", defaulting infile="outfile.in".
3333 case "$ac_file" in
3334 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3335 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3336 *) ac_file_in="${ac_file}.in" ;;
3337 esac
3338
Guido van Rossum7f43da71994-08-01 12:15:30 +00003339 echo creating $ac_file
3340
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341 rm -f conftest.frag conftest.in conftest.out
3342 cp $ac_given_srcdir/$ac_file_in conftest.in
3343
3344EOF
3345
3346# Transform confdefs.h into a sed script conftest.vals that substitutes
3347# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003349# Protect against being in an unquoted here document in config.status.
3350rm -f conftest.vals
3351cat > conftest.hdr <<\EOF
3352s/[\\&%]/\\&/g
3353s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354s%#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 +00003355s%ac_d%ac_u%gp
3356s%ac_u%ac_e%gp
3357EOF
3358sed -n -f conftest.hdr confdefs.h > conftest.vals
3359rm -f conftest.hdr
3360
3361# This sed command replaces #undef with comments. This is necessary, for
3362# example, in the case of _POSIX_SOURCE, which is predefined and required
3363# on some systems where configure will not decide to define it.
3364cat >> conftest.vals <<\EOF
3365s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3366EOF
3367
3368# Break up conftest.vals because some shells have a limit on
3369# the size of here documents, and old seds have small limits too.
3370# Maximum number of lines to put in a single here document.
3371ac_max_here_lines=12
3372
3373rm -f conftest.tail
3374while :
3375do
3376 ac_lines=`grep -c . conftest.vals`
3377 # grep -c gives empty output for an empty file on some AIX systems.
3378 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3379 # Write a limited-size here document to conftest.frag.
3380 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3381 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3382 echo 'CEOF
3383 sed -f conftest.frag conftest.in > conftest.out
3384 rm -f conftest.in
3385 mv conftest.out conftest.in
3386' >> $CONFIG_STATUS
3387 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3388 rm -f conftest.vals
3389 mv conftest.tail conftest.vals
3390done
3391rm -f conftest.vals
3392
3393cat >> $CONFIG_STATUS <<\EOF
3394 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00003395 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003396 cat conftest.in >> conftest.h
3397 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00003398 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003399 echo "$ac_file is unchanged"
3400 rm -f conftest.h
3401 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003402 # Remove last slash and all that follows it. Not all systems have dirname.
3403 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3404 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3405 # The file is in a subdirectory.
3406 test ! -d "$ac_dir" && mkdir "$ac_dir"
3407 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003408 rm -f $ac_file
3409 mv conftest.h $ac_file
3410 fi
3411fi; done
3412
3413
Guido van Rossum627b2d71993-12-24 10:39:16 +00003414
3415exit 0
3416EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417chmod +x $CONFIG_STATUS
3418rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003419test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003420