blob: 9c5176429f1c30176c360ab5acd080d6658cc720 [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 Rossumb06df271997-08-05 21:50:20 +00003# From configure.in Revision: 1.57
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossumf78abae1997-01-21 22:02:36 +00006# Generated automatically using autoconf version 2.12
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017--with-next-archs='arch1 arch2 ..' build MAB binary"
18ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019--without-gcc never use gcc"
20ac_help="$ac_help
Guido van Rossuma68acba1996-07-31 17:36:39 +000021--with-libs='lib1 ...' link against additional libs"
22ac_help="$ac_help
Guido van Rossumb06df271997-08-05 21:50:20 +000023--with(out)-readline obsolete, edit Modules/Setup instead"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Guido van Rossumec2f0731997-01-22 20:54:01 +000025--with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
26ac_help="$ac_help
27--with-threads alias for --with-thread"
28ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000029--with-thread[=DIRECTORY] make interpreter thread-safe"
30ac_help="$ac_help
31--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
32ac_help="$ac_help
33--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
34ac_help="$ac_help
Guido van Rossum7f253911997-05-09 02:42:48 +000035--with-fpectl enable SIGFPE catching"
36ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000037--with-libm=STRING math library"
38ac_help="$ac_help
39--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000040
Guido van Rossum7f43da71994-08-01 12:15:30 +000041# Initialize some variables set by options.
42# The variables have the same names as the options, with
43# dashes changed to underlines.
44build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000045cache_file=./config.cache
46exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000047host=NONE
48no_create=
49nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050no_recursion=
51prefix=NONE
52program_prefix=NONE
53program_suffix=NONE
54program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000055silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000057srcdir=
58target=NONE
59verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000060x_includes=NONE
61x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000062bindir='${exec_prefix}/bin'
63sbindir='${exec_prefix}/sbin'
64libexecdir='${exec_prefix}/libexec'
65datadir='${prefix}/share'
66sysconfdir='${prefix}/etc'
67sharedstatedir='${prefix}/com'
68localstatedir='${prefix}/var'
69libdir='${exec_prefix}/lib'
70includedir='${prefix}/include'
71oldincludedir='/usr/include'
72infodir='${prefix}/info'
73mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000074
75# Initialize some other variables.
76subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000077MFLAGS= MAKEFLAGS=
Guido van Rossumf78abae1997-01-21 22:02:36 +000078# Maximum number of lines to put in a shell here document.
79ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000080
81ac_prev=
82for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000083do
Guido van Rossum627b2d71993-12-24 10:39:16 +000084
Guido van Rossum7f43da71994-08-01 12:15:30 +000085 # If the previous option needs an argument, assign it.
86 if test -n "$ac_prev"; then
87 eval "$ac_prev=\$ac_option"
88 ac_prev=
89 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000090 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000091
Guido van Rossum7f43da71994-08-01 12:15:30 +000092 case "$ac_option" in
93 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94 *) ac_optarg= ;;
95 esac
96
Guido van Rossum76be6ed1995-01-02 18:33:54 +000097 # Accept the important Cygnus configure options, so we can diagnose typos.
98
Guido van Rossum7f43da71994-08-01 12:15:30 +000099 case "$ac_option" in
100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000101 -bindir | --bindir | --bindi | --bind | --bin | --bi)
102 ac_prev=bindir ;;
103 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104 bindir="$ac_optarg" ;;
105
106 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000108 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 build="$ac_optarg" ;;
110
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000111 -cache-file | --cache-file | --cache-fil | --cache-fi \
112 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
113 ac_prev=cache_file ;;
114 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
115 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
116 cache_file="$ac_optarg" ;;
117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000118 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119 ac_prev=datadir ;;
120 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121 | --da=*)
122 datadir="$ac_optarg" ;;
123
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 -disable-* | --disable-*)
125 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000126 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000127 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 fi
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 eval "enable_${ac_feature}=no" ;;
132
133 -enable-* | --enable-*)
134 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000136 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000137 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000138 fi
139 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140 case "$ac_option" in
141 *=*) ;;
142 *) ac_optarg=yes ;;
143 esac
144 eval "enable_${ac_feature}='$ac_optarg'" ;;
145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
147 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
148 | --exec | --exe | --ex)
149 ac_prev=exec_prefix ;;
150 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
151 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
152 | --exec=* | --exe=* | --ex=*)
153 exec_prefix="$ac_optarg" ;;
154
155 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000156 # Obsolete; use --with-gas.
157 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000158
159 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000160 # Omit some internal or obsolete options to make the list less imposing.
161 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000162 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000163Usage: configure [options] [host]
164Options: [defaults in brackets after descriptions]
165Configuration:
166 --cache-file=FILE cache test results in FILE
167 --help print this message
168 --no-create do not create output files
169 --quiet, --silent do not print \`checking...' messages
170 --version print the version of autoconf that created configure
171Directory and file names:
172 --prefix=PREFIX install architecture-independent files in PREFIX
173 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000174 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000175 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000176 --bindir=DIR user executables in DIR [EPREFIX/bin]
177 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
178 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
179 --datadir=DIR read-only architecture-independent data in DIR
180 [PREFIX/share]
181 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
182 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 [PREFIX/com]
184 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
185 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
186 --includedir=DIR C header files in DIR [PREFIX/include]
187 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
188 --infodir=DIR info documentation in DIR [PREFIX/info]
189 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000190 --srcdir=DIR find the sources in DIR [configure dir or ..]
191 --program-prefix=PREFIX prepend PREFIX to installed program names
192 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --program-transform-name=PROGRAM
194 run sed PROGRAM on installed program names
195EOF
196 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197Host type:
198 --build=BUILD configure for building on BUILD [BUILD=HOST]
199 --host=HOST configure for HOST [guessed]
200 --target=TARGET configure for TARGET [TARGET=HOST]
201Features and packages:
202 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
203 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
204 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
205 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
206 --x-includes=DIR X include files are in DIR
207 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000208EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
211 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000212 exit 0 ;;
213
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
218
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000219 -includedir | --includedir | --includedi | --included | --include \
220 | --includ | --inclu | --incl | --inc)
221 ac_prev=includedir ;;
222 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223 | --includ=* | --inclu=* | --incl=* | --inc=*)
224 includedir="$ac_optarg" ;;
225
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
230
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
235
236 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237 | --libexe | --libex | --libe)
238 ac_prev=libexecdir ;;
239 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240 | --libexe=* | --libex=* | --libe=*)
241 libexecdir="$ac_optarg" ;;
242
243 -localstatedir | --localstatedir | --localstatedi | --localstated \
244 | --localstate | --localstat | --localsta | --localst \
245 | --locals | --local | --loca | --loc | --lo)
246 ac_prev=localstatedir ;;
247 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250 localstatedir="$ac_optarg" ;;
251
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
256
Guido van Rossum7f43da71994-08-01 12:15:30 +0000257 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000258 # Obsolete; use --without-fp.
259 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000260
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
264
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000265 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000269 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271 | --oldin | --oldi | --old | --ol | --o)
272 ac_prev=oldincludedir ;;
273 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276 oldincludedir="$ac_optarg" ;;
277
Guido van Rossum7f43da71994-08-01 12:15:30 +0000278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
282
283 -program-prefix | --program-prefix | --program-prefi | --program-pref \
284 | --program-pre | --program-pr | --program-p)
285 ac_prev=program_prefix ;;
286 -program-prefix=* | --program-prefix=* | --program-prefi=* \
287 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288 program_prefix="$ac_optarg" ;;
289
290 -program-suffix | --program-suffix | --program-suffi | --program-suff \
291 | --program-suf | --program-su | --program-s)
292 ac_prev=program_suffix ;;
293 -program-suffix=* | --program-suffix=* | --program-suffi=* \
294 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295 program_suffix="$ac_optarg" ;;
296
297 -program-transform-name | --program-transform-name \
298 | --program-transform-nam | --program-transform-na \
299 | --program-transform-n | --program-transform- \
300 | --program-transform | --program-transfor \
301 | --program-transfo | --program-transf \
302 | --program-trans | --program-tran \
303 | --progr-tra | --program-tr | --program-t)
304 ac_prev=program_transform_name ;;
305 -program-transform-name=* | --program-transform-name=* \
306 | --program-transform-nam=* | --program-transform-na=* \
307 | --program-transform-n=* | --program-transform-=* \
308 | --program-transform=* | --program-transfor=* \
309 | --program-transfo=* | --program-transf=* \
310 | --program-trans=* | --program-tran=* \
311 | --progr-tra=* | --program-tr=* | --program-t=*)
312 program_transform_name="$ac_optarg" ;;
313
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
317
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000318 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 ac_prev=sbindir ;;
320 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 | --sbi=* | --sb=*)
322 sbindir="$ac_optarg" ;;
323
324 -sharedstatedir | --sharedstatedir | --sharedstatedi \
325 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326 | --sharedst | --shareds | --shared | --share | --shar \
327 | --sha | --sh)
328 ac_prev=sharedstatedir ;;
329 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 | --sha=* | --sh=*)
333 sharedstatedir="$ac_optarg" ;;
334
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
339
Guido van Rossum7f43da71994-08-01 12:15:30 +0000340 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341 ac_prev=srcdir ;;
342 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343 srcdir="$ac_optarg" ;;
344
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000345 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
346 | --syscon | --sysco | --sysc | --sys | --sy)
347 ac_prev=sysconfdir ;;
348 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
349 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
350 sysconfdir="$ac_optarg" ;;
351
Guido van Rossum7f43da71994-08-01 12:15:30 +0000352 -target | --target | --targe | --targ | --tar | --ta | --t)
353 ac_prev=target ;;
354 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355 target="$ac_optarg" ;;
356
357 -v | -verbose | --verbose | --verbos | --verbo | --verb)
358 verbose=yes ;;
359
360 -version | --version | --versio | --versi | --vers)
Guido van Rossumf78abae1997-01-21 22:02:36 +0000361 echo "configure generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 exit 0 ;;
363
364 -with-* | --with-*)
365 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000366 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 fi
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 case "$ac_option" in
372 *=*) ;;
373 *) ac_optarg=yes ;;
374 esac
375 eval "with_${ac_package}='$ac_optarg'" ;;
376
377 -without-* | --without-*)
378 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000380 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000381 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000382 fi
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 eval "with_${ac_package}=no" ;;
385
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000386 --x)
387 # Obsolete; use --with-x.
388 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
391 | --x-incl | --x-inc | --x-in | --x-i)
392 ac_prev=x_includes ;;
393 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
394 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
395 x_includes="$ac_optarg" ;;
396
397 -x-libraries | --x-libraries | --x-librarie | --x-librari \
398 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
399 ac_prev=x_libraries ;;
400 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
401 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
402 x_libraries="$ac_optarg" ;;
403
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000404 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000405 ;;
406
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000407 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000408 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000410 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000411 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000412 { 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 +0000413 fi
414 nonopt="$ac_option"
415 ;;
416
417 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000418done
419
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422fi
423
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000424trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000427# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428# 1 file creation
429# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000430# 3 some systems may open it to /dev/tty
431# 4 used on the Kubota Titan
432# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433# 5 compiler messages saved in config.log
434if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000435 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000436else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000437 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000438fi
439exec 5>./config.log
440
441echo "\
442This file contains any messages produced by compilers while
443running configure, to aid debugging if configure makes a mistake.
444" 1>&5
445
446# Strip out --no-create and --no-recursion so they do not pile up.
447# Also quote any args containing shell metacharacters.
448ac_configure_args=
449for ac_arg
450do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000451 case "$ac_arg" in
452 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
453 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000454 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
455 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
456 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
457 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
458 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000459 esac
460done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000461
462# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000463# Only set these to C if already set. These must not be set unconditionally
464# because not all systems understand e.g. LANG=C (notably SCO).
465# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
466# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000468if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000471
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472# confdefs.h avoids OS command line length limits that DEFS can exceed.
473rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000474# AIX cpp loses on an empty file, so make sure it contains at least a newline.
475echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000476
477# A filename unique to this package, relative to the directory that
478# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000479ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480
481# Find the source files, if location was not specified.
482if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000485 ac_prog=$0
486 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
487 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488 srcdir=$ac_confdir
489 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000490 srcdir=..
491 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000492else
493 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000494fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000495if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000496 if test "$ac_srcdir_defaulted" = yes; then
497 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000499 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000500 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000502srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504# Prefer explicitly selected file to automatically selected ones.
505if test -z "$CONFIG_SITE"; then
506 if test "x$prefix" != xNONE; then
507 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508 else
509 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
510 fi
511fi
512for ac_site_file in $CONFIG_SITE; do
513 if test -r "$ac_site_file"; then
514 echo "loading site script $ac_site_file"
515 . "$ac_site_file"
516 fi
517done
518
519if test -r "$cache_file"; then
520 echo "loading cache $cache_file"
521 . $cache_file
522else
523 echo "creating cache $cache_file"
524 > $cache_file
525fi
526
Guido van Rossum7f43da71994-08-01 12:15:30 +0000527ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000528# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000529ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000530ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000532cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000533
534if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
535 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
536 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
537 ac_n= ac_c='
538' ac_t=' '
539 else
540 ac_n=-n ac_c= ac_t=
541 fi
542else
543 ac_n= ac_c='\c' ac_t=
544fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000545
Guido van Rossum0a516c91994-09-12 10:58:40 +0000546
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000547
Guido van Rossum627b2d71993-12-24 10:39:16 +0000548
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000549# Set VERSION so we only need to edit in one place (i.e., here)
550
551VERSION=1.5
552
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000553# NEXTSTEP stuff
Guido van Rossum563e7081996-09-10 18:20:48 +0000554if test -f /usr/lib/NextStep/software_version; then
555
556 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000557echo "configure:558: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000558 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000559if test "${with_next_archs+set}" = set; then
560 withval="$with_next_archs"
561
Guido van Rossum563e7081996-09-10 18:20:48 +0000562 if test -n "$withval"; then
563 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
564 # GCC does not currently support multi archs on the NeXT
565 with_gcc=no
566 fi
567 echo "$ac_t""$with_next_archs" 1>&6
568
569else
570 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000571fi
572
Guido van Rossum563e7081996-09-10 18:20:48 +0000573
574 if test -z "$MACHDEP"
575 then
576 set X `hostinfo | grep 'NeXT Mach.*:' | \
577 sed -e 's/://' -e 's/\./_/'` && \
578 ac_sys_system=next && ac_sys_release=$4
579
580 MACHDEP="$ac_sys_system$ac_sys_release"
581 fi
582fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000583
584# Set name for machine-dependent library files
585
586echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000587echo "configure:588: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000588if test -z "$MACHDEP"
589then
Guido van Rossum563e7081996-09-10 18:20:48 +0000590 ac_sys_system=`uname -s`
591 if test "$ac_sys_system" = "AIX" ; then
592 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000593 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000594 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000595 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000596 ac_md_system=`echo $ac_sys_system |
597 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
598 ac_md_release=`echo $ac_sys_release |
599 tr -d '/ ' | sed 's/\..*//'`
600 MACHDEP="$ac_md_system$ac_md_release"
601
Guido van Rossum07397971997-04-29 21:49:50 +0000602 case $MACHDEP in
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000603 '') MACHDEP=unknown;;
604 esac
605fi
606echo "$ac_t""$MACHDEP" 1>&6
607
Guido van Rossum627b2d71993-12-24 10:39:16 +0000608# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000609echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000610echo "configure:611: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000611# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000612if test "${with_gcc+set}" = set; then
613 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000614
615 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000616 no) CC=cc
617 without_gcc=yes;;
618 yes) CC=gcc
619 without_gcc=no;;
620 *) CC=$withval
621 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000622 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000623else
Guido van Rossume77438c1995-09-13 18:59:59 +0000624
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000626 OSF1) CC=cc
627 without_gcc=;;
628 *) without_gcc=no;;
629 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000630fi
631
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000632echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000633
Guido van Rossum8b131c51995-03-09 14:10:13 +0000634# If the user switches compilers, we can't believe the cache
635if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
636then
637 { echo "configure: error: cached CC is different -- throw away $cache_file
638(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
639fi
640
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000641# Extract the first word of "gcc", so it can be a program name with args.
642set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000644echo "configure:645: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
652 for ac_dir in $PATH; do
653 test -z "$ac_dir" && ac_dir=.
654 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000655 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000656 break
657 fi
658 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000659 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000660fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000661fi
662CC="$ac_cv_prog_CC"
663if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000664 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000665else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000666 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000667fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000669if test -z "$CC"; then
670 # Extract the first word of "cc", so it can be a program name with args.
671set dummy cc; ac_word=$2
672echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000673echo "configure:674: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000674if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
675 echo $ac_n "(cached) $ac_c" 1>&6
676else
677 if test -n "$CC"; then
678 ac_cv_prog_CC="$CC" # Let the user override the test.
679else
680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
681 ac_prog_rejected=no
682 for ac_dir in $PATH; do
683 test -z "$ac_dir" && ac_dir=.
684 if test -f $ac_dir/$ac_word; then
685 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
686 ac_prog_rejected=yes
687 continue
688 fi
689 ac_cv_prog_CC="cc"
690 break
691 fi
692 done
693 IFS="$ac_save_ifs"
694if test $ac_prog_rejected = yes; then
695 # We found a bogon in the path, so make sure we never use it.
696 set dummy $ac_cv_prog_CC
697 shift
698 if test $# -gt 0; then
699 # We chose a different compiler from the bogus one.
700 # However, it has the same basename, so the bogon will be chosen
701 # first if we set CC to just the basename; use the full file name.
702 shift
703 set dummy "$ac_dir/$ac_word" "$@"
704 shift
705 ac_cv_prog_CC="$@"
706 fi
707fi
708fi
709fi
710CC="$ac_cv_prog_CC"
711if test -n "$CC"; then
712 echo "$ac_t""$CC" 1>&6
713else
714 echo "$ac_t""no" 1>&6
715fi
716
717 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
718fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000719
Guido van Rossumf78abae1997-01-21 22:02:36 +0000720echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000721echo "configure:722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000722
723ac_ext=c
724# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
725ac_cpp='$CPP $CPPFLAGS'
726ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
727ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
728cross_compiling=$ac_cv_prog_cc_cross
729
730cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000731#line 732 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000732#include "confdefs.h"
733main(){return(0);}
734EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000735if { (eval echo configure:736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000736 ac_cv_prog_cc_works=yes
737 # If we can't run a trivial program, we are probably using a cross compiler.
738 if (./conftest; exit) 2>/dev/null; then
739 ac_cv_prog_cc_cross=no
740 else
741 ac_cv_prog_cc_cross=yes
742 fi
743else
744 echo "configure: failed program was:" >&5
745 cat conftest.$ac_ext >&5
746 ac_cv_prog_cc_works=no
747fi
748rm -fr conftest*
749
750echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
751if test $ac_cv_prog_cc_works = no; then
752 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
753fi
754echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000755echo "configure:756: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000756echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
757cross_compiling=$ac_cv_prog_cc_cross
758
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000759echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000760echo "configure:761: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000761if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
762 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763else
764 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000765#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767#endif
768EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000769if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770 ac_cv_prog_gcc=yes
771else
772 ac_cv_prog_gcc=no
773fi
774fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000776echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000777
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778if test $ac_cv_prog_gcc = yes; then
779 GCC=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +0000780 ac_test_CFLAGS="${CFLAGS+set}"
781 ac_save_CFLAGS="$CFLAGS"
782 CFLAGS=
783 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000784echo "configure:785: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000785if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787else
788 echo 'void f(){}' > conftest.c
789if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000790 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000792 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000793fi
794rm -f conftest*
795
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000797
Guido van Rossumf78abae1997-01-21 22:02:36 +0000798echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
799 if test "$ac_test_CFLAGS" = set; then
800 CFLAGS="$ac_save_CFLAGS"
801 elif test $ac_cv_prog_cc_g = yes; then
802 CFLAGS="-g -O2"
803 else
804 CFLAGS="-O2"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805 fi
806else
807 GCC=
808 test "${CFLAGS+set}" = set || CFLAGS="-g"
809fi
810
811# Extract the first word of "ranlib", so it can be a program name with args.
812set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000813echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000814echo "configure:815: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000815if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
816 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817else
818 if test -n "$RANLIB"; then
819 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
820else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
822 for ac_dir in $PATH; do
823 test -z "$ac_dir" && ac_dir=.
824 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826 break
827 fi
828 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000831fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832fi
833RANLIB="$ac_cv_prog_RANLIB"
834if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000835 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000837 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000839
840
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841for ac_prog in ar aal
842do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843# Extract the first word of "$ac_prog", so it can be a program name with args.
844set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000845echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000846echo "configure:847: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000847if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849else
850 if test -n "$AR"; then
851 ac_cv_prog_AR="$AR" # Let the user override the test.
852else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
854 for ac_dir in $PATH; do
855 test -z "$ac_dir" && ac_dir=.
856 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858 break
859 fi
860 done
861 IFS="$ac_save_ifs"
862fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863fi
864AR="$ac_cv_prog_AR"
865if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000866 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000868 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871test -n "$AR" && break
872done
873test -n "$AR" || AR="ar"
874
875
Guido van Rossumda88dad1995-01-26 00:46:29 +0000876
877
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000878# Install just never works :-(
879if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000880then
881 INSTALL=cp
882 INSTALL_PROGRAM=cp
883 INSTALL_DATA=cp
884else
885 INSTALL_PROGRAM="$INSTALL"
886 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000887fi
888
889# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000890
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000891if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000892then
Guido van Rossumedca74a1997-07-18 23:29:40 +0000893 case $GCC in
894 yes)
895 case $ac_cv_prog_cc_g in
896 yes) OPT="-g -O2";;
897 *) OPT="-O2";;
898 esac
899 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000900 *) OPT="-O";;
901 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000902fi
903
Guido van Rossum563e7081996-09-10 18:20:48 +0000904if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000905then
906 OPT="$OPT $ac_arch_flags"
907fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000908# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000909echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000910echo "configure:911: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911# On Suns, sometimes $CPP names a directory.
912if test -n "$CPP" && test -d "$CPP"; then
913 CPP=
914fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000916if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
917 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918else
919 # This must be in double quotes, not single quotes, because CPP may get
920 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # On the NeXT, cc -E runs the code through the compiler's parser,
923 # not just through cpp.
924 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000925#line 926 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000926#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000928Syntax Error
929EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumb06df271997-08-05 21:50:20 +0000931{ (eval echo configure:932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933if test -z "$ac_err"; then
934 :
935else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000937 echo "configure: failed program was:" >&5
938 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939 rm -rf conftest*
940 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000942#line 943 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945Syntax Error
946EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumb06df271997-08-05 21:50:20 +0000948{ (eval echo configure:949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000951 :
952else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000954 echo "configure: failed program was:" >&5
955 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000956 rm -rf conftest*
957 CPP=/lib/cpp
958fi
959rm -f conftest*
960fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963fi
Guido van Rossume77438c1995-09-13 18:59:59 +0000964 CPP="$ac_cv_prog_CPP"
965else
966 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000968echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000969
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000970echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000971echo "configure:972: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000972cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000973#line 974 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000974#include "confdefs.h"
975#ifdef _AIX
976 yes
977#endif
978
979EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
981 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000982 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000983 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984#define _ALL_SOURCE 1
985EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000986
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987else
988 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000989 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000990fi
991rm -f conftest*
992
993
Guido van Rossumf78abae1997-01-21 22:02:36 +0000994ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000995echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000996echo "configure:997: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000997if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
998 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999else
1000 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001001#line 1002 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001002#include "confdefs.h"
1003#include <minix/config.h>
1004EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumb06df271997-08-05 21:50:20 +00001006{ (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001009 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001011else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001013 echo "configure: failed program was:" >&5
1014 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015 rm -rf conftest*
1016 eval "ac_cv_header_$ac_safe=no"
1017fi
1018rm -f conftest*
1019fi
1020if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001021 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 MINIX=yes
1023else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001024 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001026fi
1027
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001028if test "$MINIX" = yes; then
1029 cat >> confdefs.h <<\EOF
1030#define _POSIX_SOURCE 1
1031EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001032
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001033 cat >> confdefs.h <<\EOF
1034#define _POSIX_1_SOURCE 2
1035EOF
1036
1037 cat >> confdefs.h <<\EOF
1038#define _MINIX 1
1039EOF
1040
1041fi
1042
Guido van Rossumda88dad1995-01-26 00:46:29 +00001043
Guido van Rossum201afe51997-05-14 21:14:44 +00001044echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001045echo "configure:1046: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum201afe51997-05-14 21:14:44 +00001046if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1047 echo $ac_n "(cached) $ac_c" 1>&6
1048else
1049 ac_save_cc="$CC"
1050CC="$CC -Olimit 1500"
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001051if test "$cross_compiling" = yes; then
1052 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1053else
1054 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001055#line 1056 "configure"
Guido van Rossum201afe51997-05-14 21:14:44 +00001056#include "confdefs.h"
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001057int main() { return 0; }
Guido van Rossum201afe51997-05-14 21:14:44 +00001058EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001059if { (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001060then
Guido van Rossum201afe51997-05-14 21:14:44 +00001061 ac_cv_olimit_ok=yes
1062else
1063 echo "configure: failed program was:" >&5
1064 cat conftest.$ac_ext >&5
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001065 rm -fr conftest*
Guido van Rossum201afe51997-05-14 21:14:44 +00001066 ac_cv_olimit_ok=no
1067fi
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001068rm -fr conftest*
1069fi
1070
Guido van Rossum201afe51997-05-14 21:14:44 +00001071CC="$ac_save_cc"
1072fi
1073
1074echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1075if test $ac_cv_olimit_ok = yes; then
1076 OPT="$OPT -Olimit 1500"
1077fi
1078
Guido van Rossum84e7b241996-08-19 21:59:00 +00001079# check for ANSI or K&R ("traditional") preprocessor
1080echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001081echo "configure:1082: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001082cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001083#line 1084 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001084#include "confdefs.h"
1085
1086#define spam(name, doc) {#name, &name, #name "() -- " doc}
1087int foo;
1088struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1089
Guido van Rossumf78abae1997-01-21 22:02:36 +00001090int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001091;
1092; return 0; }
1093EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001094if { (eval echo configure:1095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001095 rm -rf conftest*
1096 cpp_type=ansi
1097else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001098 echo "configure: failed program was:" >&5
1099 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001100 rm -rf conftest*
1101 cat >> confdefs.h <<\EOF
1102#define HAVE_OLD_CPP 1
1103EOF
1104 cpp_type=traditional
1105fi
1106rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001107echo "$ac_t""$cpp_type" 1>&6
1108
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001109# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001110echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001111echo "configure:1112: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001112if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1113 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114else
1115 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001116#line 1117 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001117#include "confdefs.h"
1118#include <stdlib.h>
1119#include <stdarg.h>
1120#include <string.h>
1121#include <float.h>
1122EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumb06df271997-08-05 21:50:20 +00001124{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128 ac_cv_header_stdc=yes
1129else
1130 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001131 echo "configure: failed program was:" >&5
1132 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001133 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 ac_cv_header_stdc=no
1135fi
1136rm -f conftest*
1137
1138if test $ac_cv_header_stdc = yes; then
1139 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1140cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001141#line 1142 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142#include "confdefs.h"
1143#include <string.h>
1144EOF
1145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1146 egrep "memchr" >/dev/null 2>&1; then
1147 :
1148else
1149 rm -rf conftest*
1150 ac_cv_header_stdc=no
1151fi
1152rm -f conftest*
1153
1154fi
1155
1156if test $ac_cv_header_stdc = yes; then
1157 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1158cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001159#line 1160 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160#include "confdefs.h"
1161#include <stdlib.h>
1162EOF
1163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1164 egrep "free" >/dev/null 2>&1; then
1165 :
1166else
1167 rm -rf conftest*
1168 ac_cv_header_stdc=no
1169fi
1170rm -f conftest*
1171
1172fi
1173
1174if test $ac_cv_header_stdc = yes; then
1175 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1176if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001179 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001180#line 1181 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181#include "confdefs.h"
1182#include <ctype.h>
1183#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1184#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001186int main () { int i; for (i = 0; i < 256; i++)
1187if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1188exit (0); }
1189
1190EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001191if { (eval echo configure:1192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001192then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193 :
1194else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001195 echo "configure: failed program was:" >&5
1196 cat conftest.$ac_ext >&5
1197 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199fi
1200rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001202
1203fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001205
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001206echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207if test $ac_cv_header_stdc = yes; then
1208 cat >> confdefs.h <<\EOF
1209#define STDC_HEADERS 1
1210EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211
1212fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213
Guido van Rossum07397971997-04-29 21:49:50 +00001214for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001215signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001216sys/audioio.h sys/file.h sys/lock.h \
1217sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001218sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001220ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001221echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001222echo "configure:1223: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001223if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1224 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225else
1226 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001227#line 1228 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001231ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumb06df271997-08-05 21:50:20 +00001232{ (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 eval "ac_cv_header_$ac_safe=yes"
1237else
1238 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001239 echo "configure: failed program was:" >&5
1240 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241 rm -rf conftest*
1242 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001243fi
1244rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245fi
1246if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001247 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001248 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249 cat >> confdefs.h <<EOF
1250#define $ac_tr_hdr 1
1251EOF
1252
1253else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001254 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001255fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001256done
1257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001258ac_header_dirent=no
1259for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1260do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001261ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001262echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001263echo "configure:1264: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001264if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001268#line 1269 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269#include "confdefs.h"
1270#include <sys/types.h>
1271#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001272int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273DIR *dirp = 0;
1274; return 0; }
1275EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001276if { (eval echo configure:1277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001277 rm -rf conftest*
1278 eval "ac_cv_header_dirent_$ac_safe=yes"
1279else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001280 echo "configure: failed program was:" >&5
1281 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001282 rm -rf conftest*
1283 eval "ac_cv_header_dirent_$ac_safe=no"
1284fi
1285rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001288 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001289 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290 cat >> confdefs.h <<EOF
1291#define $ac_tr_hdr 1
1292EOF
1293 ac_header_dirent=$ac_hdr; break
1294else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001295 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296fi
1297done
1298# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1299if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001300echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001301echo "configure:1302: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001302ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001303if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001304 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305else
1306 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001307LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001309#line 1310 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001311/* Override any gcc2 internal prototype to avoid an error. */
1312/* We use char because int might match the return type of a gcc2
1313 builtin and then its argument prototype would still apply. */
1314char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315
Guido van Rossumf78abae1997-01-21 22:02:36 +00001316int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317opendir()
1318; return 0; }
1319EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001320if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001321 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001322 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001326 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001327 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328fi
1329rm -f conftest*
1330LIBS="$ac_save_LIBS"
1331
1332fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001333if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001334 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001335 LIBS="$LIBS -ldir"
1336else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001337 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338fi
1339
1340else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001341echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001342echo "configure:1343: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001343ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001344if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001345 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346else
1347 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001348LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001349cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001350#line 1351 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001352/* Override any gcc2 internal prototype to avoid an error. */
1353/* We use char because int might match the return type of a gcc2
1354 builtin and then its argument prototype would still apply. */
1355char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356
Guido van Rossumf78abae1997-01-21 22:02:36 +00001357int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001358opendir()
1359; return 0; }
1360EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001361if { (eval echo configure:1362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001363 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001365 echo "configure: failed program was:" >&5
1366 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001368 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369fi
1370rm -f conftest*
1371LIBS="$ac_save_LIBS"
1372
1373fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001374if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001375 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376 LIBS="$LIBS -lx"
1377else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001378 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001379fi
1380
1381fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001382
1383
1384# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001385was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001386echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001387echo "configure:1388: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001388cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001389#line 1390 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390#include "confdefs.h"
1391#include <time.h>
1392EOF
1393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1394 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001395 rm -rf conftest*
1396 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001397else
1398 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001399 cat >> confdefs.h <<\EOF
1400#define clock_t long
1401EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001402
1403fi
1404rm -f conftest*
1405
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001406echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001407
Guido van Rossum84e7b241996-08-19 21:59:00 +00001408# Add some code to confdefs.h so that the test for off_t works on SCO
1409cat >> confdefs.h <<\EOF
1410#if defined(SCO_DS)
1411#undef _OFF_T
1412#endif
1413EOF
1414
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001415echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001416echo "configure:1417: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001417if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1418 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001419else
1420 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001421#line 1422 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001422#include "confdefs.h"
1423#include <sys/types.h>
1424#if STDC_HEADERS
1425#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001426#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001427#endif
1428EOF
1429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001430 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001431 rm -rf conftest*
1432 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001433else
1434 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001435 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001436fi
1437rm -f conftest*
1438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001439fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001440echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001441if test $ac_cv_type_mode_t = no; then
1442 cat >> confdefs.h <<\EOF
1443#define mode_t int
1444EOF
1445
1446fi
1447
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001448echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001449echo "configure:1450: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001450if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1451 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001452else
1453 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001454#line 1455 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455#include "confdefs.h"
1456#include <sys/types.h>
1457#if STDC_HEADERS
1458#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001459#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460#endif
1461EOF
1462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001463 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001464 rm -rf conftest*
1465 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001466else
1467 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001468 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001469fi
1470rm -f conftest*
1471
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001472fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001473echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001474if test $ac_cv_type_off_t = no; then
1475 cat >> confdefs.h <<\EOF
1476#define off_t long
1477EOF
1478
1479fi
1480
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001481echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001482echo "configure:1483: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001483if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1484 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001485else
1486 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001487#line 1488 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488#include "confdefs.h"
1489#include <sys/types.h>
1490#if STDC_HEADERS
1491#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001492#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493#endif
1494EOF
1495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001496 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497 rm -rf conftest*
1498 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001499else
1500 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001501 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001502fi
1503rm -f conftest*
1504
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001505fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001506echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001507if test $ac_cv_type_pid_t = no; then
1508 cat >> confdefs.h <<\EOF
1509#define pid_t int
1510EOF
1511
1512fi
1513
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001514echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001515echo "configure:1516: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001516if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1517 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001518else
1519 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001520#line 1521 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001521#include "confdefs.h"
1522#include <sys/types.h>
1523#include <signal.h>
1524#ifdef signal
1525#undef signal
1526#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001527#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001528extern "C" void (*signal (int, void (*)(int)))(int);
1529#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001530void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001531#endif
1532
Guido van Rossumf78abae1997-01-21 22:02:36 +00001533int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001534int i;
1535; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001536EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001537if { (eval echo configure:1538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001538 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001540else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001541 echo "configure: failed program was:" >&5
1542 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001543 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001544 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001545fi
1546rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001548
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001549echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001550cat >> confdefs.h <<EOF
1551#define RETSIGTYPE $ac_cv_type_signal
1552EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001553
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001554
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001555echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001556echo "configure:1557: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001557if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001559else
1560 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001561#line 1562 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001562#include "confdefs.h"
1563#include <sys/types.h>
1564#if STDC_HEADERS
1565#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001566#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001567#endif
1568EOF
1569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001570 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001571 rm -rf conftest*
1572 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001573else
1574 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001575 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001576fi
1577rm -f conftest*
1578
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001579fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001580echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581if test $ac_cv_type_size_t = no; then
1582 cat >> confdefs.h <<\EOF
1583#define size_t unsigned
1584EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001585
1586fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001587
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001588echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001589echo "configure:1590: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1591 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001592else
1593 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001594#line 1595 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001595#include "confdefs.h"
1596#include <sys/types.h>
1597EOF
1598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1599 egrep "uid_t" >/dev/null 2>&1; then
1600 rm -rf conftest*
1601 ac_cv_type_uid_t=yes
1602else
1603 rm -rf conftest*
1604 ac_cv_type_uid_t=no
1605fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001606rm -f conftest*
1607
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001608fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001609
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001610echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001611if test $ac_cv_type_uid_t = no; then
1612 cat >> confdefs.h <<\EOF
1613#define uid_t int
1614EOF
1615
1616 cat >> confdefs.h <<\EOF
1617#define gid_t int
1618EOF
1619
1620fi
1621
Guido van Rossum627b2d71993-12-24 10:39:16 +00001622
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001623echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001624echo "configure:1625: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001625if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1627else
1628 if test "$cross_compiling" = yes; then
1629 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1630else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001631 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001632#line 1633 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001633#include "confdefs.h"
1634#include <stdio.h>
1635main()
1636{
1637 FILE *f=fopen("conftestval", "w");
1638 if (!f) exit(1);
1639 fprintf(f, "%d\n", sizeof(int));
1640 exit(0);
1641}
1642EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001643if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001644then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001645 ac_cv_sizeof_int=`cat conftestval`
1646else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001647 echo "configure: failed program was:" >&5
1648 cat conftest.$ac_ext >&5
1649 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001650 ac_cv_sizeof_int=0
1651fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001652rm -fr conftest*
1653fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001654
1655fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001656echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1657cat >> confdefs.h <<EOF
1658#define SIZEOF_INT $ac_cv_sizeof_int
1659EOF
1660
1661
1662echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001663echo "configure:1664: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001664if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1665 echo $ac_n "(cached) $ac_c" 1>&6
1666else
1667 if test "$cross_compiling" = yes; then
1668 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1669else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001670 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001671#line 1672 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001672#include "confdefs.h"
1673#include <stdio.h>
1674main()
1675{
1676 FILE *f=fopen("conftestval", "w");
1677 if (!f) exit(1);
1678 fprintf(f, "%d\n", sizeof(long));
1679 exit(0);
1680}
1681EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001682if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001683then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001684 ac_cv_sizeof_long=`cat conftestval`
1685else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001686 echo "configure: failed program was:" >&5
1687 cat conftest.$ac_ext >&5
1688 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001689 ac_cv_sizeof_long=0
1690fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001691rm -fr conftest*
1692fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001693
1694fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001695echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1696cat >> confdefs.h <<EOF
1697#define SIZEOF_LONG $ac_cv_sizeof_long
1698EOF
1699
1700
Guido van Rossum0a516c91994-09-12 10:58:40 +00001701
1702# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001703
1704
1705
1706
Guido van Rossum0a516c91994-09-12 10:58:40 +00001707# SO is the extension of shared libraries `(including the dot!)
1708# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001709echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001710echo "configure:1711: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001711if test -z "$SO"
1712then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001713 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001714 hp*|HP*) SO=.sl;;
1715 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001716 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001717fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001718echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001719# LDSHARED is the ld *command* used to create shared library
1720# -- "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 +00001721echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001722echo "configure:1723: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001723if test -z "$LDSHARED"
1724then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725 case $ac_sys_system/$ac_sys_release in
Guido van Rossum84e7b241996-08-19 21:59:00 +00001726 AIX*) LDSHARED="ld_so_aix \$(CC)";;
Guido van Rossum07397971997-04-29 21:49:50 +00001727 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001728 IRIX*/6*) LDSHARED="ld $SGI_ABI -shared -all"; OPT="$OPT $SGI_ABI";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001729 SunOS/4*) LDSHARED="ld";;
1730 SunOS/5*) LDSHARED="ld -G";;
1731 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001732 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1733 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001734 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001735 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001736 FreeBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001737 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001738 *) LDSHARED="ld";;
1739 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001740fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001741echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001742# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001743# library -- this is only needed for a few systems
1744echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001745echo "configure:1746: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001746if test -z "$CCSHARED"
1747then
Guido van Rossum07397971997-04-29 21:49:50 +00001748 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001749 hp*|HP*) if test "$GCC" = yes;
1750 then CCSHARED="-fpic";
1751 else CCSHARED="+z";
1752 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001753 Linux*) CCSHARED="-fpic";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001754 FreeBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001755 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001756 IRIX*/6*) CCSHARED="$SGI_ABI -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001757 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001758fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001759echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001760# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001761# the python executable -- this is only needed for a few systems
1762echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001763echo "configure:1764: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001764if test -z "$LINKFORSHARED"
1765then
Guido van Rossum07397971997-04-29 21:49:50 +00001766 case $ac_sys_system/$ac_sys_release in
Guido van Rossume4766f61997-05-13 21:04:26 +00001767 AIX*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001768 hp*|HP*)
1769 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/sharedmodules";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001770 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001771 next) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001772 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001773 IRIX*/6*) LINKFORSHARED="$SGI_ABI -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001774 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001775fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001776echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001777
Guido van Rossum627b2d71993-12-24 10:39:16 +00001778# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00001779echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001780echo "configure:1781: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001781ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001782if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001783 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001784else
1785 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001786LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001787cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001788#line 1789 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001789#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001790/* Override any gcc2 internal prototype to avoid an error. */
1791/* We use char because int might match the return type of a gcc2
1792 builtin and then its argument prototype would still apply. */
1793char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001794
Guido van Rossumf78abae1997-01-21 22:02:36 +00001795int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796dlopen()
1797; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001798EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001799if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001800 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001801 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001803 echo "configure: failed program was:" >&5
1804 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001806 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807fi
1808rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Guido van Rossum627b2d71993-12-24 10:39:16 +00001811fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001812if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001813 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001814 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1815 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816 cat >> confdefs.h <<EOF
1817#define $ac_tr_lib 1
1818EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001819
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001820 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001821
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001822else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001823 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824fi
1825 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00001826echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001827echo "configure:1828: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001828ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001829if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001830 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001831else
1832 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001833LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001834cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001835#line 1836 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001836#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001837/* Override any gcc2 internal prototype to avoid an error. */
1838/* We use char because int might match the return type of a gcc2
1839 builtin and then its argument prototype would still apply. */
1840char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001841
Guido van Rossumf78abae1997-01-21 22:02:36 +00001842int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001843shl_load()
1844; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001845EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001846if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001847 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001848 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001849else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001850 echo "configure: failed program was:" >&5
1851 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001853 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001854fi
1855rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001856LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001857
Guido van Rossum627b2d71993-12-24 10:39:16 +00001858fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001859if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001860 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001861 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1862 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001863 cat >> confdefs.h <<EOF
1864#define $ac_tr_lib 1
1865EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001866
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001867 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001868
1869else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001870 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871fi
1872 # Dynamic linking for HP-UX
Guido van Rossumf78abae1997-01-21 22:02:36 +00001873echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001874echo "configure:1875: checking for getpwnam in -lsun" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001875ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001876if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001877 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878else
1879 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001880LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001881cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001882#line 1883 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001883#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001884/* Override any gcc2 internal prototype to avoid an error. */
1885/* We use char because int might match the return type of a gcc2
1886 builtin and then its argument prototype would still apply. */
1887char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001888
Guido van Rossumf78abae1997-01-21 22:02:36 +00001889int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890getpwnam()
1891; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001892EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001893if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001894 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001895 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001896else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001899 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001900 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001901fi
1902rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001903LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001904
Guido van Rossum7f43da71994-08-01 12:15:30 +00001905fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001906if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001907 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001908 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1909 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001910 cat >> confdefs.h <<EOF
1911#define $ac_tr_lib 1
1912EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001913
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001914 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001915
1916else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001917 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918fi
1919 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001920# The following three (nsl,inet,socket) are needed on Sequent;
1921# the order of checking must be this. Most SVR4 platforms will
1922# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1923# broken. I see no elegant solution (probably CHECK_LIB should be
1924# fixed to only add the library if the given entry point is not
1925# satisfied without it).
Guido van Rossum2b3ac691996-08-30 15:18:41 +00001926if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00001927then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001928echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001929echo "configure:1930: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001930ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001931if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001932 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001933else
1934 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001935LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001936cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001937#line 1938 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001938#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001939/* Override any gcc2 internal prototype to avoid an error. */
1940/* We use char because int might match the return type of a gcc2
1941 builtin and then its argument prototype would still apply. */
1942char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001943
Guido van Rossumf78abae1997-01-21 22:02:36 +00001944int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001945t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001946; return 0; }
1947EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001948if { (eval echo configure:1949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001949 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001950 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001951else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001952 echo "configure: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001954 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001955 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001956fi
1957rm -f conftest*
1958LIBS="$ac_save_LIBS"
1959
1960fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001961if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001962 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001963 LIBS="-lnsl $LIBS"
1964else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001965 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001966fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001967 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00001968echo $ac_n "checking for gethostbyname in -linet""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00001969echo "configure:1970: checking for gethostbyname in -linet" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001970ac_lib_var=`echo inet'_'gethostbyname | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001971if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001972 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001973else
1974 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001975LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001976cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001977#line 1978 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001978#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001979/* Override any gcc2 internal prototype to avoid an error. */
1980/* We use char because int might match the return type of a gcc2
1981 builtin and then its argument prototype would still apply. */
1982char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001983
Guido van Rossumf78abae1997-01-21 22:02:36 +00001984int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001985gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001986; return 0; }
1987EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00001988if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001989 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001990 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001991else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001992 echo "configure: failed program was:" >&5
1993 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001994 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001995 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001996fi
1997rm -f conftest*
1998LIBS="$ac_save_LIBS"
1999
2000fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002001if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002002 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002003 LIBS="-linet $LIBS"
2004else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002005 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002006fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002007 # Sequent
Guido van Rossumf78abae1997-01-21 22:02:36 +00002008echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002009echo "configure:2010: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002010ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002011if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002012 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002013else
2014 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002015LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002016cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002017#line 2018 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002018#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002019/* Override any gcc2 internal prototype to avoid an error. */
2020/* We use char because int might match the return type of a gcc2
2021 builtin and then its argument prototype would still apply. */
2022char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002023
Guido van Rossumf78abae1997-01-21 22:02:36 +00002024int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002025socket()
2026; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002027EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002028if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002029 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002030 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002031else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002035 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002036fi
2037rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002038LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002040fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002041if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002042 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002043 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002044else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002045 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002046fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002047 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00002048fi
Guido van Rossuma68acba1996-07-31 17:36:39 +00002049echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002050echo "configure:2051: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002051# Check whether --with-libs or --without-libs was given.
2052if test "${with_libs+set}" = set; then
2053 withval="$with_libs"
2054
2055echo "$ac_t""$withval" 1>&6
2056LIBS="$withval $LIBS"
2057
2058else
2059 echo "$ac_t""no" 1>&6
2060fi
2061
Guido van Rossum7f43da71994-08-01 12:15:30 +00002062
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002063echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002064echo "configure:2065: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002065# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002066if test "${with_readline+set}" = set; then
2067 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002068 echo "$ac_t""$withval" 1>&6
2069{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002070else
Guido van Rossumb06df271997-08-05 21:50:20 +00002071 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002072fi
2073
Guido van Rossum7f43da71994-08-01 12:15:30 +00002074
Guido van Rossumec2f0731997-01-22 20:54:01 +00002075echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002076echo "configure:2077: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002077
2078# Check whether --with-dec-threads or --without-dec-threads was given.
2079if test "${with_dec_threads+set}" = set; then
2080 withval="$with_dec_threads"
2081 echo "$ac_t""$withval" 1>&6
2082LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002083if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002084 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002085fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002086else
2087 echo "$ac_t""no" 1>&6
2088fi
2089
2090
2091echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002092echo "configure:2093: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002093# Check whether --with-threads or --without-threads was given.
2094if test "${with_threads+set}" = set; then
2095 withval="$with_threads"
2096 echo "$ac_t""$withval" 1>&6
2097if test "${with_thread+set}" != set; then
2098 with_thread="$withval";
2099fi
2100else
2101 echo "$ac_t""no" 1>&6
2102fi
2103
2104
2105echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002106echo "configure:2107: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002107# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002108if test "${with_thread+set}" = set; then
2109 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002110
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002111echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002112if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002113then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002114fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002115cat >> confdefs.h <<\EOF
2116#define _REENTRANT 1
2117EOF
2118
Guido van Rossumf78abae1997-01-21 22:02:36 +00002119ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002120echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002121echo "configure:2122: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002122if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2123 echo $ac_n "(cached) $ac_c" 1>&6
2124else
2125 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002126#line 2127 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002127#include "confdefs.h"
2128#include <mach/cthreads.h>
2129EOF
2130ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumb06df271997-08-05 21:50:20 +00002131{ (eval echo configure:2132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002132ac_err=`grep -v '^ *+' conftest.out`
2133if test -z "$ac_err"; then
2134 rm -rf conftest*
2135 eval "ac_cv_header_$ac_safe=yes"
2136else
2137 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002138 echo "configure: failed program was:" >&5
2139 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002140 rm -rf conftest*
2141 eval "ac_cv_header_$ac_safe=no"
2142fi
2143rm -f conftest*
2144fi
2145if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2146 echo "$ac_t""yes" 1>&6
2147 cat >> confdefs.h <<\EOF
2148#define WITH_THREAD 1
2149EOF
2150
2151cat >> confdefs.h <<\EOF
2152#define C_THREADS 1
2153EOF
2154
2155LIBOBJS="$LIBOBJS thread.o"
2156else
2157 echo "$ac_t""no" 1>&6
2158
Guido van Rossumf78abae1997-01-21 22:02:36 +00002159echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002160echo "configure:2161: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002161ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002162if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002163 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002164else
2165 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002166LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002167cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002168#line 2169 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002169#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002170/* Override any gcc2 internal prototype to avoid an error. */
2171/* We use char because int might match the return type of a gcc2
2172 builtin and then its argument prototype would still apply. */
2173char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002174
Guido van Rossumf78abae1997-01-21 22:02:36 +00002175int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002176pthread_create()
2177; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002178EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002179if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002180 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002181 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002182else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002183 echo "configure: failed program was:" >&5
2184 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002185 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002186 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002187fi
2188rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002189LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002190
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002191fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002192if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002193 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002194 cat >> confdefs.h <<\EOF
2195#define WITH_THREAD 1
2196EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002198cat >> confdefs.h <<\EOF
2199#define _POSIX_THREADS 1
2200EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002201
2202LIBS="$LIBS -lpthreads"
2203LIBOBJS="$LIBOBJS thread.o"
2204else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002205 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002206
Guido van Rossumf78abae1997-01-21 22:02:36 +00002207echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002208echo "configure:2209: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002209ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002210if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2211 echo $ac_n "(cached) $ac_c" 1>&6
2212else
2213 ac_save_LIBS="$LIBS"
2214LIBS="-lpthread $LIBS"
2215cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002216#line 2217 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002217#include "confdefs.h"
2218/* Override any gcc2 internal prototype to avoid an error. */
2219/* We use char because int might match the return type of a gcc2
2220 builtin and then its argument prototype would still apply. */
2221char pthread_create();
2222
Guido van Rossumf78abae1997-01-21 22:02:36 +00002223int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002224pthread_create()
2225; return 0; }
2226EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002227if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002228 rm -rf conftest*
2229 eval "ac_cv_lib_$ac_lib_var=yes"
2230else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002231 echo "configure: failed program was:" >&5
2232 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002233 rm -rf conftest*
2234 eval "ac_cv_lib_$ac_lib_var=no"
2235fi
2236rm -f conftest*
2237LIBS="$ac_save_LIBS"
2238
2239fi
2240if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2241 echo "$ac_t""yes" 1>&6
2242 cat >> confdefs.h <<\EOF
2243#define WITH_THREAD 1
2244EOF
2245
2246cat >> confdefs.h <<\EOF
2247#define _POSIX_THREADS 1
2248EOF
2249
2250LIBS="$LIBS -lpthread"
2251LIBOBJS="$LIBOBJS thread.o"
2252else
2253 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002254
2255echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002256echo "configure:2257: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002257ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2258if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2259 echo $ac_n "(cached) $ac_c" 1>&6
2260else
2261 ac_save_LIBS="$LIBS"
2262LIBS="-lthread $LIBS"
2263cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002264#line 2265 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002265#include "confdefs.h"
2266/* Override any gcc2 internal prototype to avoid an error. */
2267/* We use char because int might match the return type of a gcc2
2268 builtin and then its argument prototype would still apply. */
2269char __d6_pthread_create();
2270
2271int main() {
2272__d6_pthread_create()
2273; return 0; }
2274EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002275if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002276 rm -rf conftest*
2277 eval "ac_cv_lib_$ac_lib_var=yes"
2278else
2279 echo "configure: failed program was:" >&5
2280 cat conftest.$ac_ext >&5
2281 rm -rf conftest*
2282 eval "ac_cv_lib_$ac_lib_var=no"
2283fi
2284rm -f conftest*
2285LIBS="$ac_save_LIBS"
2286
2287fi
2288if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2289 echo "$ac_t""yes" 1>&6
2290 cat >> confdefs.h <<\EOF
2291#define WITH_THREAD 1
2292EOF
2293
2294cat >> confdefs.h <<\EOF
2295#define _POSIX_THREADS 1
2296EOF
2297
2298LIBS="$LIBS -lthread"
2299LIBOBJS="$LIBOBJS thread.o"
2300else
2301 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002302fi
2303
2304
Guido van Rossum627b2d71993-12-24 10:39:16 +00002305fi
2306
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002307fi
2308
Guido van Rossum0be3e491997-05-22 20:33:33 +00002309fi
2310
2311
Guido van Rossumf78abae1997-01-21 22:02:36 +00002312echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002313echo "configure:2314: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002314ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002315if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002316 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317else
2318 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002319LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002320cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002321#line 2322 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002322#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002323/* Override any gcc2 internal prototype to avoid an error. */
2324/* We use char because int might match the return type of a gcc2
2325 builtin and then its argument prototype would still apply. */
2326char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002327
Guido van Rossumf78abae1997-01-21 22:02:36 +00002328int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002329usconfig()
2330; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002331EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002332if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002333 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002334 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002335else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002336 echo "configure: failed program was:" >&5
2337 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002339 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002340fi
2341rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342LIBS="$ac_save_LIBS"
2343
2344fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002345if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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 >> confdefs.h <<\EOF
2348#define WITH_THREAD 1
2349EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002350
Guido van Rossum7f43da71994-08-01 12:15:30 +00002351LIBS="$LIBS -lmpc"
2352LIBOBJS="$LIBOBJS thread.o"
2353else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002354 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002355fi
2356
Guido van Rossumf78abae1997-01-21 22:02:36 +00002357echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002358echo "configure:2359: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002359ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002360if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002361 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002362else
2363 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002364LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002365cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002366#line 2367 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002367#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002368/* Override any gcc2 internal prototype to avoid an error. */
2369/* We use char because int might match the return type of a gcc2
2370 builtin and then its argument prototype would still apply. */
2371char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002372
Guido van Rossumf78abae1997-01-21 22:02:36 +00002373int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374thr_create()
2375; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002376EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002377if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002378 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002379 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002380else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002381 echo "configure: failed program was:" >&5
2382 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002383 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002384 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002385fi
2386rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002387LIBS="$ac_save_LIBS"
2388
2389fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002390if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002391 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392 cat >> confdefs.h <<\EOF
2393#define WITH_THREAD 1
2394EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002395
Guido van Rossum7f43da71994-08-01 12:15:30 +00002396LIBS="$LIBS -lthread"
2397LIBOBJS="$LIBOBJS thread.o"
2398else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002399 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002400fi
2401
Guido van Rossum7f43da71994-08-01 12:15:30 +00002402
Guido van Rossumda88dad1995-01-26 00:46:29 +00002403else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002404 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002405fi
2406
Guido van Rossum7f43da71994-08-01 12:15:30 +00002407
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002409
2410DLINCLDIR=/
2411
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002412echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002413echo "configure:2414: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002414# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002415if test "${with_sgi_dl+set}" = set; then
2416 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002417
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002418echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002419cat >> confdefs.h <<\EOF
2420#define WITH_SGI_DL 1
2421EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002422
2423dldir=$withval
2424if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002425then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002426else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002427fi
2428DLINCLDIR=${dldir}
2429LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002430else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002431 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002432fi
2433
2434
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002435echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002436echo "configure:2437: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002437# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002438if test "${with_dl_dld+set}" = set; then
2439 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002441echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002442cat >> confdefs.h <<\EOF
2443#define WITH_DL_DLD 1
2444EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002445
2446dldir=`echo "$withval" | sed 's/,.*//'`
2447dlddir=`echo "$withval" | sed 's/.*,//'`
2448if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002449then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002450else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002451fi
2452DLINCLDIR=${dldir}
2453LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002454else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002455 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002456fi
2457
2458
Guido van Rossum627b2d71993-12-24 10:39:16 +00002459# checks for library functions
Guido van Rossum0be3e491997-05-22 20:33:33 +00002460for ac_func in chown clock dlopen execv flock fork ftime ftruncate \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002461 gethostname_r getpeername getpgrp getpid gettimeofday getwd \
Guido van Rossum0be3e491997-05-22 20:33:33 +00002462 kill link lstat mkfifo nice plock putenv readlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002463 select setgid setuid setsid setpgid setpgrp setvbuf \
2464 sigaction siginterrupt sigrelse strftime symlink \
2465 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002466do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002467echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002468echo "configure:2469: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002469if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2470 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002471else
2472 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002473#line 2474 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002474#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002475/* System header to define __stub macros and hopefully few prototypes,
2476 which can conflict with char $ac_func(); below. */
2477#include <assert.h>
2478/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002479/* We use char because int might match the return type of a gcc2
2480 builtin and then its argument prototype would still apply. */
2481char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002482
Guido van Rossumf78abae1997-01-21 22:02:36 +00002483int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002484
Guido van Rossum627b2d71993-12-24 10:39:16 +00002485/* The GNU C library defines this for functions which it implements
2486 to always fail with ENOSYS. Some functions are actually named
2487 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002488#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002489choke me
2490#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002491$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002492#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002493
Guido van Rossum7f43da71994-08-01 12:15:30 +00002494; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002495EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002496if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002497 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002498 eval "ac_cv_func_$ac_func=yes"
2499else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002500 echo "configure: failed program was:" >&5
2501 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002502 rm -rf conftest*
2503 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002504fi
2505rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002508if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002509 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002510 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002511 cat >> confdefs.h <<EOF
2512#define $ac_tr_func 1
2513EOF
2514
2515else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002516 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002517fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002518done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002519
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002520for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002521do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002522echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002523echo "configure:2524: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002524if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2525 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002526else
2527 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002528#line 2529 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002529#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002530/* System header to define __stub macros and hopefully few prototypes,
2531 which can conflict with char $ac_func(); below. */
2532#include <assert.h>
2533/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002534/* We use char because int might match the return type of a gcc2
2535 builtin and then its argument prototype would still apply. */
2536char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002537
Guido van Rossumf78abae1997-01-21 22:02:36 +00002538int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002539
Guido van Rossum627b2d71993-12-24 10:39:16 +00002540/* The GNU C library defines this for functions which it implements
2541 to always fail with ENOSYS. Some functions are actually named
2542 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002543#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002544choke me
2545#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002546$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002547#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002548
Guido van Rossum7f43da71994-08-01 12:15:30 +00002549; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002550EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002551if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002552 rm -rf conftest*
2553 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002554else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002555 echo "configure: failed program was:" >&5
2556 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002557 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002558 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002559fi
2560rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002561fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002562
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002563if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002564 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002565 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2566 cat >> confdefs.h <<EOF
2567#define $ac_tr_func 1
2568EOF
2569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002570else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002571 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002572LIBOBJS="$LIBOBJS ${ac_func}.o"
2573fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002574done
2575
Guido van Rossumf78abae1997-01-21 22:02:36 +00002576
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002577echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002578echo "configure:2579: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002579if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2580 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002581else
2582 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002583#line 2584 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002584#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002585/* System header to define __stub macros and hopefully few prototypes,
2586 which can conflict with char getpgrp(); below. */
2587#include <assert.h>
2588/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002589/* We use char because int might match the return type of a gcc2
2590 builtin and then its argument prototype would still apply. */
2591char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002592
Guido van Rossumf78abae1997-01-21 22:02:36 +00002593int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002594
Guido van Rossum627b2d71993-12-24 10:39:16 +00002595/* The GNU C library defines this for functions which it implements
2596 to always fail with ENOSYS. Some functions are actually named
2597 something starting with __ and the normal name is an alias. */
2598#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2599choke me
2600#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002601getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002602#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603
2604; return 0; }
2605EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002606if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607 rm -rf conftest*
2608 eval "ac_cv_func_getpgrp=yes"
2609else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002610 echo "configure: failed program was:" >&5
2611 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 rm -rf conftest*
2613 eval "ac_cv_func_getpgrp=no"
2614fi
2615rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002617
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002619 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002620 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002621#line 2622 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622#include "confdefs.h"
2623#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002624int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002625getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002626; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002627EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002628if { (eval echo configure:2629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002629 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630 cat >> confdefs.h <<\EOF
2631#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002632EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002633
Guido van Rossumf78abae1997-01-21 22:02:36 +00002634else
2635 echo "configure: failed program was:" >&5
2636 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002637fi
2638rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002639else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002640 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002641fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002642
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002643echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002644echo "configure:2645: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002645if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2646 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647else
2648 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002649#line 2650 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002650#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002651/* System header to define __stub macros and hopefully few prototypes,
2652 which can conflict with char setpgrp(); below. */
2653#include <assert.h>
2654/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002655/* We use char because int might match the return type of a gcc2
2656 builtin and then its argument prototype would still apply. */
2657char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002658
Guido van Rossumf78abae1997-01-21 22:02:36 +00002659int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002661/* The GNU C library defines this for functions which it implements
2662 to always fail with ENOSYS. Some functions are actually named
2663 something starting with __ and the normal name is an alias. */
2664#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2665choke me
2666#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002667setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002668#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669
2670; return 0; }
2671EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002672if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673 rm -rf conftest*
2674 eval "ac_cv_func_setpgrp=yes"
2675else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002676 echo "configure: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678 rm -rf conftest*
2679 eval "ac_cv_func_setpgrp=no"
2680fi
2681rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002683
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002685 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002687#line 2688 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688#include "confdefs.h"
2689#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002690int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002692; return 0; }
2693EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002694if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002695 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696 cat >> confdefs.h <<\EOF
2697#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002698EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002699
Guido van Rossumf78abae1997-01-21 22:02:36 +00002700else
2701 echo "configure: failed program was:" >&5
2702 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002703fi
2704rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002706 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002707fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002708
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002709echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002710echo "configure:2711: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002711if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2712 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713else
2714 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002715#line 2716 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002716#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002717/* System header to define __stub macros and hopefully few prototypes,
2718 which can conflict with char gettimeofday(); below. */
2719#include <assert.h>
2720/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002721/* We use char because int might match the return type of a gcc2
2722 builtin and then its argument prototype would still apply. */
2723char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002724
Guido van Rossumf78abae1997-01-21 22:02:36 +00002725int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726
2727/* The GNU C library defines this for functions which it implements
2728 to always fail with ENOSYS. Some functions are actually named
2729 something starting with __ and the normal name is an alias. */
2730#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2731choke me
2732#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002733gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002734#endif
2735
2736; return 0; }
2737EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002738if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739 rm -rf conftest*
2740 eval "ac_cv_func_gettimeofday=yes"
2741else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002742 echo "configure: failed program was:" >&5
2743 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002744 rm -rf conftest*
2745 eval "ac_cv_func_gettimeofday=no"
2746fi
2747rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002751 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002752 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002753#line 2754 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002754#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002755#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002756int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002757gettimeofday((struct timeval*)0,(struct timezone*)0);
2758; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002759EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002760if { (eval echo configure:2761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002761 :
2762else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002763 echo "configure: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002765 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002766 cat >> confdefs.h <<\EOF
2767#define GETTIMEOFDAY_NO_TZ 1
2768EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002769
2770fi
2771rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002773 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774fi
2775
2776
2777# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002778echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002779echo "configure:2780: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002780if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2781 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002782else
2783 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002784#line 2785 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002785#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786#include <sys/types.h>
2787#include <sys/time.h>
2788#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002789int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790struct tm *tp;
2791; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002792EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002793if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002794 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002795 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002796else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002797 echo "configure: failed program was:" >&5
2798 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002799 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002800 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002801fi
2802rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002803fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002804
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002805echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806if test $ac_cv_header_time = yes; then
2807 cat >> confdefs.h <<\EOF
2808#define TIME_WITH_SYS_TIME 1
2809EOF
2810
2811fi
2812
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002813echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002814echo "configure:2815: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002815if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2816 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002817else
2818 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002819#line 2820 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002820#include "confdefs.h"
2821#include <sys/types.h>
2822#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002823int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002824struct tm *tp; tp->tm_sec;
2825; return 0; }
2826EOF
Guido van Rossumb06df271997-08-05 21:50:20 +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 ac_cv_struct_tm=time.h
2830else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002831 echo "configure: failed program was:" >&5
2832 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002833 rm -rf conftest*
2834 ac_cv_struct_tm=sys/time.h
2835fi
2836rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002837fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002838
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002839echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840if test $ac_cv_struct_tm = sys/time.h; then
2841 cat >> confdefs.h <<\EOF
2842#define TM_IN_SYS_TIME 1
2843EOF
2844
2845fi
2846
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002847echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002848echo "configure:2849: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002849if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2850 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002851else
2852 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002853#line 2854 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002854#include "confdefs.h"
2855#include <sys/types.h>
2856#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002857int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002858struct tm tm; tm.tm_zone;
2859; return 0; }
2860EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002861if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862 rm -rf conftest*
2863 ac_cv_struct_tm_zone=yes
2864else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002865 echo "configure: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002867 rm -rf conftest*
2868 ac_cv_struct_tm_zone=no
2869fi
2870rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002871fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002872
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002873echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002874if test "$ac_cv_struct_tm_zone" = yes; then
2875 cat >> confdefs.h <<\EOF
2876#define HAVE_TM_ZONE 1
2877EOF
2878
2879else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002880 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002881echo "configure:2882: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002882if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2883 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002884else
2885 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002886#line 2887 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002887#include "confdefs.h"
2888#include <time.h>
2889#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002890extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002891#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00002892int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002893atoi(*tzname);
2894; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002895EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002896if { (eval echo configure:2897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002897 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002898 ac_cv_var_tzname=yes
2899else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002900 echo "configure: failed program was:" >&5
2901 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002902 rm -rf conftest*
2903 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002904fi
2905rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002906fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002907
2908echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002909 if test $ac_cv_var_tzname = yes; then
2910 cat >> confdefs.h <<\EOF
2911#define HAVE_TZNAME 1
2912EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002914 fi
2915fi
2916
2917
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002918echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002919echo "configure:2920: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002920if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2921 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002922else
2923 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002924#line 2925 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002925#include "confdefs.h"
2926#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002927int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002928return altzone;
2929; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002930EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002931if { (eval echo configure:2932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002932 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002933 ac_cv_header_time_altzone=yes
2934else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002935 echo "configure: failed program was:" >&5
2936 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002937 rm -rf conftest*
2938 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002939fi
2940rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002941fi
2942
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002943echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002944if test $ac_cv_header_time_altzone = yes; then
2945 cat >> confdefs.h <<\EOF
2946#define HAVE_ALTZONE 1
2947EOF
2948
2949fi
2950
Guido van Rossumda88dad1995-01-26 00:46:29 +00002951was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002952echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002953echo "configure:2954: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002955#line 2956 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002956#include "confdefs.h"
2957
2958#include <sys/types.h>
2959#include <sys/select.h>
2960#include <sys/time.h>
2961
Guido van Rossumf78abae1997-01-21 22:02:36 +00002962int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002963;
2964; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002965EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002966if { (eval echo configure:2967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002967 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002968 cat >> confdefs.h <<\EOF
2969#define SYS_SELECT_WITH_SYS_TIME 1
2970EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002971 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00002972else
2973 echo "configure: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00002975fi
2976rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002977echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002978
2979# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00002980
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002981echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00002982echo "configure:2983: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002983if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2984 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002985else
2986 if test "$GCC" = yes; then
2987 # GCC predefines this symbol on systems where it applies.
2988cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00002989#line 2990 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002990#include "confdefs.h"
2991#ifdef __CHAR_UNSIGNED__
2992 yes
2993#endif
2994
2995EOF
2996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2997 egrep "yes" >/dev/null 2>&1; then
2998 rm -rf conftest*
2999 ac_cv_c_char_unsigned=yes
3000else
3001 rm -rf conftest*
3002 ac_cv_c_char_unsigned=no
3003fi
3004rm -f conftest*
3005
3006else
3007if test "$cross_compiling" = yes; then
3008 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3009else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003010 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003011#line 3012 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003012#include "confdefs.h"
3013/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003014#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003015#define volatile
3016#endif
3017main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003018 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003019}
3020EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003021if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00003022then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003023 ac_cv_c_char_unsigned=yes
3024else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003025 echo "configure: failed program was:" >&5
3026 cat conftest.$ac_ext >&5
3027 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003028 ac_cv_c_char_unsigned=no
3029fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003030rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003031fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003032
3033fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003034fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003035
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003036echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003037if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3038 cat >> confdefs.h <<\EOF
3039#define __CHAR_UNSIGNED__ 1
3040EOF
3041
3042fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003043
3044
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003045echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003046echo "configure:3047: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003047if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3048 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003049else
3050 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003051#line 3052 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003052#include "confdefs.h"
3053
Guido van Rossumf78abae1997-01-21 22:02:36 +00003054int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003055
3056/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003057typedef int charset[2]; const charset x;
3058/* SunOS 4.1.1 cc rejects this. */
3059char const *const *ccp;
3060char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003061/* NEC SVR4.0.2 mips cc rejects this. */
3062struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003063static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003064/* AIX XL C 1.02.0.0 rejects this.
3065 It does not let you subtract one const X* pointer from another in an arm
3066 of an if-expression whose if-part is not a constant expression */
3067const char *g = "string";
3068ccp = &g + (g ? g-g : 0);
3069/* HPUX 7.0 cc rejects these. */
3070++ccp;
3071p = (char**) ccp;
3072ccp = (char const *const *) p;
3073{ /* SCO 3.2v4 cc rejects this. */
3074 char *t;
3075 char const *s = 0 ? (char *) 0 : (char const *) 0;
3076
3077 *t++ = 0;
3078}
3079{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003080 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003081 const int *foo = &x[0];
3082 ++foo;
3083}
3084{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3085 typedef const int *iptr;
3086 iptr p = 0;
3087 ++p;
3088}
3089{ /* AIX XL C 1.02.0.0 rejects this saying
3090 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3091 struct s { int j; const int *ap[3]; };
3092 struct s *b; b->j = 5;
3093}
3094{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3095 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096}
3097
3098; return 0; }
3099EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003100if { (eval echo configure:3101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003101 rm -rf conftest*
3102 ac_cv_c_const=yes
3103else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003104 echo "configure: failed program was:" >&5
3105 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003106 rm -rf conftest*
3107 ac_cv_c_const=no
3108fi
3109rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003110fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003111
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003112echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003113if test $ac_cv_c_const = no; then
3114 cat >> confdefs.h <<\EOF
3115#define const
3116EOF
3117
3118fi
3119
3120
Guido van Rossumda88dad1995-01-26 00:46:29 +00003121works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003122echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003123echo "configure:3124: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003124cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003125#line 3126 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003126#include "confdefs.h"
3127
Guido van Rossumf78abae1997-01-21 22:02:36 +00003128int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003129volatile int x; x = 0;
3130; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003131EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003132if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003133 rm -rf conftest*
3134 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003135else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003136 echo "configure: failed program was:" >&5
3137 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003138 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003139 cat >> confdefs.h <<\EOF
3140#define volatile
3141EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003142
3143fi
3144rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003145echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003146
Guido van Rossumda88dad1995-01-26 00:46:29 +00003147works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003148echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003149echo "configure:3150: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003150cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003151#line 3152 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003152#include "confdefs.h"
3153
Guido van Rossumf78abae1997-01-21 22:02:36 +00003154int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003155signed char c;
3156; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003157EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003158if { (eval echo configure:3159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003159 rm -rf conftest*
3160 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003161else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003162 echo "configure: failed program was:" >&5
3163 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003164 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003165 cat >> confdefs.h <<\EOF
3166#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003167EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003168
3169fi
3170rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003171echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003172
Guido van Rossumda88dad1995-01-26 00:46:29 +00003173have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003174echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003175echo "configure:3176: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003176cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003177#line 3178 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003178#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003179int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003180int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181return foo(10);
3182; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003183EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003184if { (eval echo configure:3185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003185 rm -rf conftest*
3186 cat >> confdefs.h <<\EOF
3187#define HAVE_PROTOTYPES 1
3188EOF
3189 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003190else
3191 echo "configure: failed program was:" >&5
3192 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003193fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003195echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003196
Guido van Rossumda88dad1995-01-26 00:46:29 +00003197works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003198echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003199echo "configure:3200: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003200cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003201#line 3202 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003202#include "confdefs.h"
3203
3204#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003205int foo(int x, ...) {
3206 va_list va;
3207 va_start(va, x);
3208 va_arg(va, int);
3209 va_arg(va, char *);
3210 va_arg(va, double);
3211 return 0;
3212}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003213
Guido van Rossumf78abae1997-01-21 22:02:36 +00003214int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003215return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003216; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003217EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003218if { (eval echo configure:3219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003219 rm -rf conftest*
3220 cat >> confdefs.h <<\EOF
3221#define HAVE_STDARG_PROTOTYPES 1
3222EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003223 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003224else
3225 echo "configure: failed program was:" >&5
3226 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003227fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003228rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003229echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230
Guido van Rossumda88dad1995-01-26 00:46:29 +00003231if test "$have_prototypes" = yes; then
3232bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003233echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003234echo "configure:3235: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003236#line 3237 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003237#include "confdefs.h"
3238#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003239int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240char **t;execve("@",t,t);
3241; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003242EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003243if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003244 :
3245else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003246 echo "configure: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003248 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249 cat >> confdefs.h <<\EOF
3250#define BAD_EXEC_PROTOTYPES 1
3251EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003252 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253fi
3254rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003255echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003256fi
3257
Guido van Rossumda88dad1995-01-26 00:46:29 +00003258bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003259echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003260echo "configure:3261: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261if test "$cross_compiling" = yes; then
3262 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3263else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003264 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003265#line 3266 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003266#include "confdefs.h"
3267
3268struct s { int a; int b; };
3269static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003270int foobar() {
3271 static int random;
3272 random = (int) &foo;
3273 return random;
3274}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003275static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276main() {
3277 exit(!((int)&foo == foobar()));
3278}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003279
3280EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003281if { (eval echo configure:3282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00003282then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003283 :
3284else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003285 echo "configure: failed program was:" >&5
3286 cat conftest.$ac_ext >&5
3287 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003288 cat >> confdefs.h <<\EOF
3289#define BAD_STATIC_FORWARD 1
3290EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003291 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003292fi
3293rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003294fi
3295
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003296echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003297
Guido van Rossumda88dad1995-01-26 00:46:29 +00003298va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003299echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003300echo "configure:3301: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003301cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003302#line 3303 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003303#include "confdefs.h"
3304
3305#ifdef HAVE_STDARG_PROTOTYPES
3306#include <stdarg.h>
3307#else
3308#include <varargs.h>
3309#endif
3310
Guido van Rossumf78abae1997-01-21 22:02:36 +00003311int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003312va_list list1, list2; list1 = list2;
3313; return 0; }
3314EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003315if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316 :
3317else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003318 echo "configure: failed program was:" >&5
3319 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003320 rm -rf conftest*
3321 cat >> confdefs.h <<\EOF
3322#define VA_LIST_IS_ARRAY 1
3323EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003324 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003325fi
3326rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003327echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329# checks for system services
3330# (none yet)
3331
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003332# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003333echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003334echo "configure:3335: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003335ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003336if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003337 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003338else
3339 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003340LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003342#line 3343 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003343#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003344/* Override any gcc2 internal prototype to avoid an error. */
3345/* We use char because int might match the return type of a gcc2
3346 builtin and then its argument prototype would still apply. */
3347char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003348
Guido van Rossumf78abae1997-01-21 22:02:36 +00003349int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350__fpu_control()
3351; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003352EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003353if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003354 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003356else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003357 echo "configure: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003359 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003360 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003361fi
3362rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003364
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003367 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003368 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3369 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003370 cat >> confdefs.h <<EOF
3371#define $ac_tr_lib 1
3372EOF
3373
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003374 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003375
3376else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003377 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003378fi
3379
3380
Guido van Rossum7f253911997-05-09 02:42:48 +00003381# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00003382echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003383echo "configure:3384: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00003384# Check whether --with-fpectl or --without-fpectl was given.
3385if test "${with_fpectl+set}" = set; then
3386 withval="$with_fpectl"
3387
3388if test "$withval" != no
3389then cat >> confdefs.h <<\EOF
3390#define WANT_SIGFPE_HANDLER 1
3391EOF
3392 echo "$ac_t""yes" 1>&6
3393else echo "$ac_t""no" 1>&6
3394fi
3395fi
3396
3397
Guido van Rossum7f43da71994-08-01 12:15:30 +00003398# check for --with-libm=...
3399
Guido van Rossum563e7081996-09-10 18:20:48 +00003400case $ac_sys_system in
3401next) ;;
3402*) LIBM=-lm
3403esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003404echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003405echo "configure:3406: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003406# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003407if test "${with_libm+set}" = set; then
3408 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003409
Guido van Rossum7f253911997-05-09 02:42:48 +00003410if test "$withval" = no
3411then LIBM=
3412 echo "$ac_t""force LIBM empty" 1>&6
3413elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003414then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003415 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003416else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003417fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003418else
3419 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003420fi
3421
3422
3423# check for --with-libc=...
3424
Guido van Rossum7f253911997-05-09 02:42:48 +00003425echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003426echo "configure:3427: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003427# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003428if test "${with_libc+set}" = set; then
3429 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003430
Guido van Rossum7f253911997-05-09 02:42:48 +00003431if test "$withval" = no
3432then LIBC=
3433 echo "$ac_t""force LIBC empty" 1>&6
3434elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003435then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003436 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003437else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003438fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003439else
3440 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003441fi
3442
3443
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003444# check for hypot() in math library
3445LIBS_SAVE=$LIBS
3446LIBS="$LIBS $LIBM"
3447for ac_func in hypot
3448do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003449echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003450echo "configure:3451: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003451if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3452 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003453else
3454 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003455#line 3456 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003456#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003457/* System header to define __stub macros and hopefully few prototypes,
3458 which can conflict with char $ac_func(); below. */
3459#include <assert.h>
3460/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003461/* We use char because int might match the return type of a gcc2
3462 builtin and then its argument prototype would still apply. */
3463char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003464
Guido van Rossumf78abae1997-01-21 22:02:36 +00003465int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003466
3467/* The GNU C library defines this for functions which it implements
3468 to always fail with ENOSYS. Some functions are actually named
3469 something starting with __ and the normal name is an alias. */
3470#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3471choke me
3472#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003473$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003474#endif
3475
3476; return 0; }
3477EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003478if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003479 rm -rf conftest*
3480 eval "ac_cv_func_$ac_func=yes"
3481else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003482 echo "configure: failed program was:" >&5
3483 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003484 rm -rf conftest*
3485 eval "ac_cv_func_$ac_func=no"
3486fi
3487rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003488fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003489
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003490if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003491 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003492 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003493 cat >> confdefs.h <<EOF
3494#define $ac_tr_func 1
3495EOF
3496
3497else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003498 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003499fi
3500done
3501
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003502for ac_func in hypot
3503do
3504echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003505echo "configure:3506: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003506if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3507 echo $ac_n "(cached) $ac_c" 1>&6
3508else
3509 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003510#line 3511 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003511#include "confdefs.h"
3512/* System header to define __stub macros and hopefully few prototypes,
3513 which can conflict with char $ac_func(); below. */
3514#include <assert.h>
3515/* Override any gcc2 internal prototype to avoid an error. */
3516/* We use char because int might match the return type of a gcc2
3517 builtin and then its argument prototype would still apply. */
3518char $ac_func();
3519
Guido van Rossumf78abae1997-01-21 22:02:36 +00003520int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003521
3522/* The GNU C library defines this for functions which it implements
3523 to always fail with ENOSYS. Some functions are actually named
3524 something starting with __ and the normal name is an alias. */
3525#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3526choke me
3527#else
3528$ac_func();
3529#endif
3530
3531; return 0; }
3532EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003533if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003534 rm -rf conftest*
3535 eval "ac_cv_func_$ac_func=yes"
3536else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003537 echo "configure: failed program was:" >&5
3538 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003539 rm -rf conftest*
3540 eval "ac_cv_func_$ac_func=no"
3541fi
3542rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003543fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003544
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003545if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3546 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003547 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3548 cat >> confdefs.h <<EOF
3549#define $ac_tr_func 1
3550EOF
3551
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003552else
3553 echo "$ac_t""no" 1>&6
3554LIBOBJS="$LIBOBJS ${ac_func}.o"
3555fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003556done
3557
Guido van Rossumf78abae1997-01-21 22:02:36 +00003558
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003559LIBS=$LIBS_SAVE
3560
Guido van Rossumda88dad1995-01-26 00:46:29 +00003561# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003562echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003563echo "configure:3564: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003564if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3565 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003566else
3567 if test "$cross_compiling" = yes; then
3568 ac_cv_func_getopt=no
3569else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003570 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003571#line 3572 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003572#include "confdefs.h"
3573#include <stdio.h>
3574extern int optind, opterr, getopt();
3575extern char* optarg;
3576int main() {
3577 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3578 opterr = 0;
3579 if (getopt(3, av, "f:") == 'f') { exit(1); }
3580 exit(0);
3581}
3582EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003583if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00003584then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003585 ac_cv_func_getopt=yes
3586else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003587 echo "configure: failed program was:" >&5
3588 cat conftest.$ac_ext >&5
3589 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00003590 ac_cv_func_getopt=no
3591fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003592rm -fr conftest*
3593fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003594
3595fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003596echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003597test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3598
Guido van Rossumad713701997-07-10 22:42:38 +00003599# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00003600echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +00003601echo "configure:3602: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00003602if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
3603 echo $ac_n "(cached) $ac_c" 1>&6
3604else
3605 if test "$cross_compiling" = yes; then
3606 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3607else
3608 cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003609#line 3610 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00003610#include "confdefs.h"
3611#include <stdio.h>
3612#ifdef HAVE_STDLIB
3613#include <stdlib.h>
3614#else
3615char *malloc(), *realloc();
3616int *free();
3617#endif
3618main() {
3619 char *p;
3620 p = malloc(0);
3621 if (p == NULL) exit(1);
3622 p = realloc(p, 0);
3623 if (p == NULL) exit(1);
3624 free(p);
3625 exit(0);
3626}
3627EOF
Guido van Rossumb06df271997-08-05 21:50:20 +00003628if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumad713701997-07-10 22:42:38 +00003629then
3630 ac_cv_malloc_zero=nonnull
3631else
3632 echo "configure: failed program was:" >&5
3633 cat conftest.$ac_ext >&5
3634 rm -fr conftest*
3635 ac_cv_malloc_zero=null
3636fi
3637rm -fr conftest*
3638fi
3639
3640fi
3641
3642echo "$ac_t""$ac_cv_malloc_zero" 1>&6
3643if test "$ac_cv_malloc_zero" = null
3644then
3645 cat >> confdefs.h <<\EOF
3646#define MALLOC_ZERO_RETURNS_NULL 1
3647EOF
3648
3649fi
3650
Guido van Rossum627b2d71993-12-24 10:39:16 +00003651# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003652trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003653cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003654# This file is a shell script that caches the results of configure
3655# tests run on this system so they can be shared between configure
3656# scripts and configure runs. It is not useful on other systems.
3657# If it contains results you don't want to keep, you may remove or edit it.
3658#
3659# By default, configure uses ./config.cache as the cache file,
3660# creating it if it does not exist already. You can give configure
3661# the --cache-file=FILE option to use a different cache file; that is
3662# what configure does when it calls configure scripts in
3663# subdirectories, so they share the cache.
3664# Giving --cache-file=/dev/null disables caching, for debugging configure.
3665# config.status only pays attention to the cache file if you give it the
3666# --recheck option to rerun configure.
3667#
3668EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003669# The following way of writing the cache mishandles newlines in values,
3670# but we know of no workaround that is simple, portable, and efficient.
3671# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003672# Ultrix sh set writes to stderr and can't be redirected directly,
3673# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003674(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00003675 case `(ac_space=' '; set) 2>&1` in
3676 *ac_space=\ *)
3677 # `set' does not quote correctly, so add quotes (double-quote substitution
3678 # turns \\\\ into \\, and sed turns \\ into \).
3679 sed -n \
3680 -e "s/'/'\\\\''/g" \
3681 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3682 ;;
3683 *)
3684 # `set' quotes correctly as required by POSIX, so do not add quotes.
3685 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3686 ;;
3687 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003688if cmp -s $cache_file confcache; then
3689 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003690else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003691 if test -w $cache_file; then
3692 echo "updating cache $cache_file"
3693 cat confcache > $cache_file
3694 else
3695 echo "not updating unwritable cache $cache_file"
3696 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003697fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003698rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003699
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003700trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003701
3702test "x$prefix" = xNONE && prefix=$ac_default_prefix
3703# Let make expand exec_prefix.
3704test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003705
Guido van Rossum7f43da71994-08-01 12:15:30 +00003706# Any assignment to VPATH causes Sun make to only execute
3707# the first set of double-colon rules, so remove it if not needed.
3708# If there is a colon in the path, we need to keep it.
3709if test "x$srcdir" = x.; then
3710 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3711fi
3712
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003713trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003714
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003715DEFS=-DHAVE_CONFIG_H
3716
3717# Without the "./", some shells look in PATH for config.status.
3718: ${CONFIG_STATUS=./config.status}
3719
3720echo creating $CONFIG_STATUS
3721rm -f $CONFIG_STATUS
3722cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003723#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003724# Generated automatically by configure.
3725# Run this file to recreate the current configuration.
3726# This directory was configured as follows,
3727# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3728#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003729# $0 $ac_configure_args
3730#
3731# Compiler output produced by configure, useful for debugging
3732# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003733
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003734ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003735for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003736do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003737 case "\$ac_option" in
3738 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003739 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3740 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003741 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003742 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003743 exit 0 ;;
3744 -help | --help | --hel | --he | --h)
3745 echo "\$ac_cs_usage"; exit 0 ;;
3746 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003747 esac
3748done
3749
Guido van Rossum7f43da71994-08-01 12:15:30 +00003750ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003751
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003752trap 'rm -fr `echo "Makefile \
3753 Objects/Makefile \
3754 Parser/Makefile \
3755 Python/Makefile \
3756 Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757EOF
3758cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003759
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760# Protect against being on the right side of a sed subst in config.status.
3761sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3762 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003763$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003764$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003765s%@CFLAGS@%$CFLAGS%g
3766s%@CPPFLAGS@%$CPPFLAGS%g
3767s%@CXXFLAGS@%$CXXFLAGS%g
3768s%@DEFS@%$DEFS%g
3769s%@LDFLAGS@%$LDFLAGS%g
3770s%@LIBS@%$LIBS%g
3771s%@exec_prefix@%$exec_prefix%g
3772s%@prefix@%$prefix%g
3773s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774s%@bindir@%$bindir%g
3775s%@sbindir@%$sbindir%g
3776s%@libexecdir@%$libexecdir%g
3777s%@datadir@%$datadir%g
3778s%@sysconfdir@%$sysconfdir%g
3779s%@sharedstatedir@%$sharedstatedir%g
3780s%@localstatedir@%$localstatedir%g
3781s%@libdir@%$libdir%g
3782s%@includedir@%$includedir%g
3783s%@oldincludedir@%$oldincludedir%g
3784s%@infodir@%$infodir%g
3785s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003786s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003787s%@MACHDEP@%$MACHDEP%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003788s%@CC@%$CC%g
3789s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003790s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003791s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003792s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3793s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003794s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003795s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003796s%@SO@%$SO%g
3797s%@LDSHARED@%$LDSHARED%g
3798s%@CCSHARED@%$CCSHARED%g
3799s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00003800s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003801s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003802s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003803s%@LIBM@%$LIBM%g
3804s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003805
3806CEOF
3807EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808
3809cat >> $CONFIG_STATUS <<\EOF
3810
3811# Split the substitutions into bite-sized pieces for seds with
3812# small command number limits, like on Digital OSF/1 and HP-UX.
3813ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3814ac_file=1 # Number of current file.
3815ac_beg=1 # First line for current file.
3816ac_end=$ac_max_sed_cmds # Line after last line for current file.
3817ac_more_lines=:
3818ac_sed_cmds=""
3819while $ac_more_lines; do
3820 if test $ac_beg -gt 1; then
3821 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3822 else
3823 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3824 fi
3825 if test ! -s conftest.s$ac_file; then
3826 ac_more_lines=false
3827 rm -f conftest.s$ac_file
3828 else
3829 if test -z "$ac_sed_cmds"; then
3830 ac_sed_cmds="sed -f conftest.s$ac_file"
3831 else
3832 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3833 fi
3834 ac_file=`expr $ac_file + 1`
3835 ac_beg=$ac_end
3836 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3837 fi
3838done
3839if test -z "$ac_sed_cmds"; then
3840 ac_sed_cmds=cat
3841fi
3842EOF
3843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003844cat >> $CONFIG_STATUS <<EOF
3845
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003846CONFIG_FILES=\${CONFIG_FILES-"Makefile \
3847 Objects/Makefile \
3848 Parser/Makefile \
3849 Python/Makefile \
3850 Modules/Makefile.pre"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851EOF
3852cat >> $CONFIG_STATUS <<\EOF
3853for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003854 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003856 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003857 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3858 *) ac_file_in="${ac_file}.in" ;;
3859 esac
3860
Guido van Rossumf78abae1997-01-21 22:02:36 +00003861 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862
3863 # Remove last slash and all that follows it. Not all systems have dirname.
3864 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3865 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3866 # The file is in a subdirectory.
3867 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003868 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869 # A "../" for each directory in $ac_dir_suffix.
3870 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3871 else
3872 ac_dir_suffix= ac_dots=
3873 fi
3874
3875 case "$ac_given_srcdir" in
3876 .) srcdir=.
3877 if test -z "$ac_dots"; then top_srcdir=.
3878 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3879 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3880 *) # Relative path.
3881 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3882 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3883 esac
3884
Guido van Rossumf78abae1997-01-21 22:02:36 +00003885
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003886 echo creating "$ac_file"
3887 rm -f "$ac_file"
3888 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3889 case "$ac_file" in
3890 *Makefile*) ac_comsub="1i\\
3891# $configure_input" ;;
3892 *) ac_comsub= ;;
3893 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00003894
3895 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003896 sed -e "$ac_comsub
3897s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003898s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003899s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00003900" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00003901fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00003902rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003904# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3905# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00003906#
3907# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003908ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3909ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003910ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003911ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003912# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003913ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3914ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003915ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003916ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003917# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003918ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3919ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003920ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003922
Guido van Rossumf78abae1997-01-21 22:02:36 +00003923if test "${CONFIG_HEADERS+set}" != set; then
3924EOF
3925cat >> $CONFIG_STATUS <<EOF
3926 CONFIG_HEADERS="config.h"
3927EOF
3928cat >> $CONFIG_STATUS <<\EOF
3929fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003930for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003931 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003932 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003933 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3935 *) ac_file_in="${ac_file}.in" ;;
3936 esac
3937
Guido van Rossum7f43da71994-08-01 12:15:30 +00003938 echo creating $ac_file
3939
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00003941 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3942 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003943
3944EOF
3945
3946# Transform confdefs.h into a sed script conftest.vals that substitutes
3947# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003948# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949# Protect against being in an unquoted here document in config.status.
3950rm -f conftest.vals
3951cat > conftest.hdr <<\EOF
3952s/[\\&%]/\\&/g
3953s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003954s%#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 +00003955s%ac_d%ac_u%gp
3956s%ac_u%ac_e%gp
3957EOF
3958sed -n -f conftest.hdr confdefs.h > conftest.vals
3959rm -f conftest.hdr
3960
3961# This sed command replaces #undef with comments. This is necessary, for
3962# example, in the case of _POSIX_SOURCE, which is predefined and required
3963# on some systems where configure will not decide to define it.
3964cat >> conftest.vals <<\EOF
3965s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3966EOF
3967
3968# Break up conftest.vals because some shells have a limit on
3969# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970
3971rm -f conftest.tail
3972while :
3973do
3974 ac_lines=`grep -c . conftest.vals`
3975 # grep -c gives empty output for an empty file on some AIX systems.
3976 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3977 # Write a limited-size here document to conftest.frag.
3978 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3979 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3980 echo 'CEOF
3981 sed -f conftest.frag conftest.in > conftest.out
3982 rm -f conftest.in
3983 mv conftest.out conftest.in
3984' >> $CONFIG_STATUS
3985 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3986 rm -f conftest.vals
3987 mv conftest.tail conftest.vals
3988done
3989rm -f conftest.vals
3990
3991cat >> $CONFIG_STATUS <<\EOF
3992 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00003993 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994 cat conftest.in >> conftest.h
3995 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00003996 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003997 echo "$ac_file is unchanged"
3998 rm -f conftest.h
3999 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004000 # Remove last slash and all that follows it. Not all systems have dirname.
4001 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4002 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4003 # The file is in a subdirectory.
4004 test ! -d "$ac_dir" && mkdir "$ac_dir"
4005 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004006 rm -f $ac_file
4007 mv conftest.h $ac_file
4008 fi
4009fi; done
4010
Guido van Rossumf78abae1997-01-21 22:02:36 +00004011EOF
4012cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004013
Guido van Rossumf78abae1997-01-21 22:02:36 +00004014EOF
4015cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004016
4017exit 0
4018EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004019chmod +x $CONFIG_STATUS
4020rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004021test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004022