blob: 7037a6ffc3970de39c6e095a5ceb3204b35c2d45 [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 Rossum35742851998-02-19 21:32:40 +00003# From configure.in Revision: 1.77
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
Guido van Rossumb97ef171997-09-28 05:44:03 +0000580 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 fi
582fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000583
Guido van Rossum91922671997-10-09 20:24:13 +0000584
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585# Set name for machine-dependent library files
586
587echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000588echo "configure:589: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000589if test -z "$MACHDEP"
590then
Guido van Rossum563e7081996-09-10 18:20:48 +0000591 ac_sys_system=`uname -s`
592 if test "$ac_sys_system" = "AIX" ; then
593 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000594 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000595 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000596 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000597 ac_md_system=`echo $ac_sys_system |
598 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
599 ac_md_release=`echo $ac_sys_release |
600 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000601 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000602
Guido van Rossum07397971997-04-29 21:49:50 +0000603 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000604 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000605 esac
606fi
Guido van Rossum91922671997-10-09 20:24:13 +0000607
608#
609# SGI compilers allow the specification of the both the ABI and the
610# ISA on the command line. Depending on the values of these switches,
611# different and often incompatable code will be generated.
612#
613# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
614# thus supply support for various ABI/ISA combinations. The MACHDEP
615# variable is also adjusted.
616#
617
618if test ! -z "$SGI_ABI"
619then
620 CC="cc $SGI_ABI"
621 LDFLAGS="$SGI_ABI $LDFLAGS"
622 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
623fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000624echo "$ac_t""$MACHDEP" 1>&6
625
Guido van Rossum91922671997-10-09 20:24:13 +0000626#
627# CCC is the command that compiles C++ programs
628#
629# Not all make programs have this predefined.
630#
631
632echo $ac_n "checking CCC""... $ac_c" 1>&6
633echo "configure:634: checking CCC" >&5
634if test -z "$CCC"
635then
636 case $ac_sys_system in
637 IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
638 *) SET_CCC=""
639 esac
640else
641 SET_CCC="CCC= ${CCC}"
642fi
643echo "$ac_t""$SET_CCC" 1>&6
644
645
Guido van Rossum627b2d71993-12-24 10:39:16 +0000646# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000647echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000648echo "configure:649: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000649# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000650if test "${with_gcc+set}" = set; then
651 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652
653 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000654 no) CC=cc
655 without_gcc=yes;;
656 yes) CC=gcc
657 without_gcc=no;;
658 *) CC=$withval
659 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000660 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000661else
Guido van Rossume77438c1995-09-13 18:59:59 +0000662
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000663 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000664 OSF1) CC=cc
665 without_gcc=;;
666 *) without_gcc=no;;
667 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000668fi
669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000670echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000671
Guido van Rossum8b131c51995-03-09 14:10:13 +0000672# If the user switches compilers, we can't believe the cache
673if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
674then
675 { echo "configure: error: cached CC is different -- throw away $cache_file
676(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
677fi
678
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000679# Extract the first word of "gcc", so it can be a program name with args.
680set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000682echo "configure:683: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000683if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
684 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000685else
686 if test -n "$CC"; then
687 ac_cv_prog_CC="$CC" # Let the user override the test.
688else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
690 for ac_dir in $PATH; do
691 test -z "$ac_dir" && ac_dir=.
692 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000693 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000694 break
695 fi
696 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000697 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000698fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000699fi
700CC="$ac_cv_prog_CC"
701if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000702 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000703else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000704 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000705fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000706
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000707if test -z "$CC"; then
708 # Extract the first word of "cc", so it can be a program name with args.
709set dummy cc; ac_word=$2
710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000711echo "configure:712: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000712if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
713 echo $ac_n "(cached) $ac_c" 1>&6
714else
715 if test -n "$CC"; then
716 ac_cv_prog_CC="$CC" # Let the user override the test.
717else
718 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
719 ac_prog_rejected=no
720 for ac_dir in $PATH; do
721 test -z "$ac_dir" && ac_dir=.
722 if test -f $ac_dir/$ac_word; then
723 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
724 ac_prog_rejected=yes
725 continue
726 fi
727 ac_cv_prog_CC="cc"
728 break
729 fi
730 done
731 IFS="$ac_save_ifs"
732if test $ac_prog_rejected = yes; then
733 # We found a bogon in the path, so make sure we never use it.
734 set dummy $ac_cv_prog_CC
735 shift
736 if test $# -gt 0; then
737 # We chose a different compiler from the bogus one.
738 # However, it has the same basename, so the bogon will be chosen
739 # first if we set CC to just the basename; use the full file name.
740 shift
741 set dummy "$ac_dir/$ac_word" "$@"
742 shift
743 ac_cv_prog_CC="$@"
744 fi
745fi
746fi
747fi
748CC="$ac_cv_prog_CC"
749if test -n "$CC"; then
750 echo "$ac_t""$CC" 1>&6
751else
752 echo "$ac_t""no" 1>&6
753fi
754
755 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
756fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757
Guido van Rossumf78abae1997-01-21 22:02:36 +0000758echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000759echo "configure:760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000760
761ac_ext=c
762# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
763ac_cpp='$CPP $CPPFLAGS'
764ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
765ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
766cross_compiling=$ac_cv_prog_cc_cross
767
768cat > conftest.$ac_ext <<EOF
Guido van Rossum91922671997-10-09 20:24:13 +0000769#line 770 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000770#include "confdefs.h"
771main(){return(0);}
772EOF
Guido van Rossum91922671997-10-09 20:24:13 +0000773if { (eval echo configure:774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000774 ac_cv_prog_cc_works=yes
775 # If we can't run a trivial program, we are probably using a cross compiler.
776 if (./conftest; exit) 2>/dev/null; then
777 ac_cv_prog_cc_cross=no
778 else
779 ac_cv_prog_cc_cross=yes
780 fi
781else
782 echo "configure: failed program was:" >&5
783 cat conftest.$ac_ext >&5
784 ac_cv_prog_cc_works=no
785fi
786rm -fr conftest*
787
788echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
789if test $ac_cv_prog_cc_works = no; then
790 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
791fi
792echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000793echo "configure:794: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000794echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
795cross_compiling=$ac_cv_prog_cc_cross
796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000797echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000798echo "configure:799: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000799if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801else
802 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000803#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000804 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805#endif
806EOF
Guido van Rossum91922671997-10-09 20:24:13 +0000807if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808 ac_cv_prog_gcc=yes
809else
810 ac_cv_prog_gcc=no
811fi
812fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000814echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000815
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000816if test $ac_cv_prog_gcc = yes; then
817 GCC=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +0000818 ac_test_CFLAGS="${CFLAGS+set}"
819 ac_save_CFLAGS="$CFLAGS"
820 CFLAGS=
821 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000822echo "configure:823: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000823if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000824 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825else
826 echo 'void f(){}' > conftest.c
827if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000828 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000830 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000831fi
832rm -f conftest*
833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000835
Guido van Rossumf78abae1997-01-21 22:02:36 +0000836echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
837 if test "$ac_test_CFLAGS" = set; then
838 CFLAGS="$ac_save_CFLAGS"
839 elif test $ac_cv_prog_cc_g = yes; then
840 CFLAGS="-g -O2"
841 else
842 CFLAGS="-O2"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843 fi
844else
845 GCC=
846 test "${CFLAGS+set}" = set || CFLAGS="-g"
847fi
848
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000849
Guido van Rossum24b1e751997-08-21 02:29:16 +0000850case $ac_sys_system in
851hp*|HP*)
852 case $CC in
853 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
854 esac;;
855esac
856
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000857# LINKCC is the command that links the python executable -- default is $(CC).
858# This is altered for AIX in order to build the export list before linking.
859
860echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000861echo "configure:862: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000862if test -z "$LINKCC"
863then
864 case $ac_sys_system in
865 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +0000866 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000867 dgux*)
868 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +0000869 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000870 esac
871fi
872echo "$ac_t""$LINKCC" 1>&6
873
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874# Extract the first word of "ranlib", so it can be a program name with args.
875set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000876echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000877echo "configure:878: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000878if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
879 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880else
881 if test -n "$RANLIB"; then
882 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
883else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
885 for ac_dir in $PATH; do
886 test -z "$ac_dir" && ac_dir=.
887 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000889 break
890 fi
891 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895fi
896RANLIB="$ac_cv_prog_RANLIB"
897if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000898 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000900 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000902
903
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_prog in ar aal
905do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906# Extract the first word of "$ac_prog", so it can be a program name with args.
907set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000908echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000909echo "configure:910: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000910if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
911 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912else
913 if test -n "$AR"; then
914 ac_cv_prog_AR="$AR" # Let the user override the test.
915else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
917 for ac_dir in $PATH; do
918 test -z "$ac_dir" && ac_dir=.
919 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 break
922 fi
923 done
924 IFS="$ac_save_ifs"
925fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926fi
927AR="$ac_cv_prog_AR"
928if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000929 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000931 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
934test -n "$AR" && break
935done
936test -n "$AR" || AR="ar"
937
938
Guido van Rossumda88dad1995-01-26 00:46:29 +0000939
940
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000941
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000942# Install just never works :-(
943if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000944then
945 INSTALL=cp
946 INSTALL_PROGRAM=cp
947 INSTALL_DATA=cp
948else
949 INSTALL_PROGRAM="$INSTALL"
950 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000951fi
952
953# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000954
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000955if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000956then
Guido van Rossumedca74a1997-07-18 23:29:40 +0000957 case $GCC in
958 yes)
959 case $ac_cv_prog_cc_g in
960 yes) OPT="-g -O2";;
961 *) OPT="-O2";;
962 esac
963 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000964 *) OPT="-O";;
965 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000966fi
967
Guido van Rossum563e7081996-09-10 18:20:48 +0000968if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000969then
970 OPT="$OPT $ac_arch_flags"
971fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000972# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000973echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000974echo "configure:975: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975# On Suns, sometimes $CPP names a directory.
976if test -n "$CPP" && test -d "$CPP"; then
977 CPP=
978fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000979if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000980if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
981 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000982else
983 # This must be in double quotes, not single quotes, because CPP may get
984 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000985 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # On the NeXT, cc -E runs the code through the compiler's parser,
987 # not just through cpp.
988 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000989#line 990 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000990#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000992Syntax Error
993EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000995{ (eval echo configure:996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997if test -z "$ac_err"; then
998 :
999else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001001 echo "configure: failed program was:" >&5
1002 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 rm -rf conftest*
1004 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001006#line 1007 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009Syntax Error
1010EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001012{ (eval echo configure:1013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001015 :
1016else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001018 echo "configure: failed program was:" >&5
1019 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001020 rm -rf conftest*
1021 CPP=/lib/cpp
1022fi
1023rm -f conftest*
1024fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001026 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001028 CPP="$ac_cv_prog_CPP"
1029else
1030 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001032echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001033
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001034echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001035echo "configure:1036: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001037#line 1038 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001038#include "confdefs.h"
1039#ifdef _AIX
1040 yes
1041#endif
1042
1043EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1045 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001046 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001047 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048#define _ALL_SOURCE 1
1049EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001051else
1052 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001053 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001054fi
1055rm -f conftest*
1056
1057
Guido van Rossumf78abae1997-01-21 22:02:36 +00001058ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001059echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001060echo "configure:1061: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001061if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1062 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001063else
1064 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001065#line 1066 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001066#include "confdefs.h"
1067#include <minix/config.h>
1068EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001070{ (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001073 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001075else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001077 echo "configure: failed program was:" >&5
1078 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 rm -rf conftest*
1080 eval "ac_cv_header_$ac_safe=no"
1081fi
1082rm -f conftest*
1083fi
1084if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001085 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 MINIX=yes
1087else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001088 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001090fi
1091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092if test "$MINIX" = yes; then
1093 cat >> confdefs.h <<\EOF
1094#define _POSIX_SOURCE 1
1095EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097 cat >> confdefs.h <<\EOF
1098#define _POSIX_1_SOURCE 2
1099EOF
1100
1101 cat >> confdefs.h <<\EOF
1102#define _MINIX 1
1103EOF
1104
1105fi
1106
Guido van Rossumda88dad1995-01-26 00:46:29 +00001107
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001108if test "$MACHDEP" != "dguxR4"
1109then
Guido van Rossum201afe51997-05-14 21:14:44 +00001110echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001111echo "configure:1112: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum201afe51997-05-14 21:14:44 +00001112if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1113 echo $ac_n "(cached) $ac_c" 1>&6
1114else
1115 ac_save_cc="$CC"
1116CC="$CC -Olimit 1500"
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001117if test "$cross_compiling" = yes; then
1118 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1119else
1120 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001121#line 1122 "configure"
Guido van Rossum201afe51997-05-14 21:14:44 +00001122#include "confdefs.h"
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001123int main() { return 0; }
Guido van Rossum201afe51997-05-14 21:14:44 +00001124EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001125if { (eval echo configure:1126: \"$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 +00001126then
Guido van Rossum201afe51997-05-14 21:14:44 +00001127 ac_cv_olimit_ok=yes
1128else
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001131 rm -fr conftest*
Guido van Rossum201afe51997-05-14 21:14:44 +00001132 ac_cv_olimit_ok=no
1133fi
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001134rm -fr conftest*
1135fi
1136
Guido van Rossum201afe51997-05-14 21:14:44 +00001137CC="$ac_save_cc"
1138fi
1139
1140echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1141if test $ac_cv_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001142 OPT="$OPT -Olimit 1500"
Guido van Rossum91922671997-10-09 20:24:13 +00001143fi
1144
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001145
Guido van Rossum91922671997-10-09 20:24:13 +00001146echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001147echo "configure:1148: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum91922671997-10-09 20:24:13 +00001148if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1149 echo $ac_n "(cached) $ac_c" 1>&6
1150else
1151 ac_save_cc="$CC"
1152CC="$CC -OPT:Olimit=0"
1153if test "$cross_compiling" = yes; then
1154 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1155else
1156 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001157#line 1158 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001158#include "confdefs.h"
1159int main() { return 0; }
1160EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001161if { (eval echo configure:1162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001162then
1163 ac_cv_opt_olimit_ok=yes
1164else
1165 echo "configure: failed program was:" >&5
1166 cat conftest.$ac_ext >&5
1167 rm -fr conftest*
1168 ac_cv_opt_olimit_ok=no
1169fi
1170rm -fr conftest*
1171fi
1172
1173CC="$ac_save_cc"
1174fi
1175
1176echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001177if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001178 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum201afe51997-05-14 21:14:44 +00001179fi
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001180 REALLIBRARY='libpython$(VERSION).a'
Guido van Rossum35742851998-02-19 21:32:40 +00001181 DGUX_IS_BROKEN="true"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001182else
1183 REALLIBRARY='libpython$(VERSION).so'
1184 OPT="$OPT -pic"
Guido van Rossum35742851998-02-19 21:32:40 +00001185 DGUX_IS_BROKEN="make $REALLIBRARY"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001186fi
Guido van Rossum201afe51997-05-14 21:14:44 +00001187
Guido van Rossum84e7b241996-08-19 21:59:00 +00001188# check for ANSI or K&R ("traditional") preprocessor
1189echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001190echo "configure:1191: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001191cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001192#line 1193 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001193#include "confdefs.h"
1194
1195#define spam(name, doc) {#name, &name, #name "() -- " doc}
1196int foo;
1197struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1198
Guido van Rossumf78abae1997-01-21 22:02:36 +00001199int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001200;
1201; return 0; }
1202EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001203if { (eval echo configure:1204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001204 rm -rf conftest*
1205 cpp_type=ansi
1206else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001207 echo "configure: failed program was:" >&5
1208 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001209 rm -rf conftest*
1210 cat >> confdefs.h <<\EOF
1211#define HAVE_OLD_CPP 1
1212EOF
1213 cpp_type=traditional
1214fi
1215rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001216echo "$ac_t""$cpp_type" 1>&6
1217
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001218# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001219echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001220echo "configure:1221: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001221if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1222 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223else
1224 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001225#line 1226 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226#include "confdefs.h"
1227#include <stdlib.h>
1228#include <stdarg.h>
1229#include <string.h>
1230#include <float.h>
1231EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001233{ (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 ac_cv_header_stdc=yes
1238else
1239 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243 ac_cv_header_stdc=no
1244fi
1245rm -f conftest*
1246
1247if test $ac_cv_header_stdc = yes; then
1248 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1249cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001250#line 1251 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001251#include "confdefs.h"
1252#include <string.h>
1253EOF
1254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1255 egrep "memchr" >/dev/null 2>&1; then
1256 :
1257else
1258 rm -rf conftest*
1259 ac_cv_header_stdc=no
1260fi
1261rm -f conftest*
1262
1263fi
1264
1265if test $ac_cv_header_stdc = yes; then
1266 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1267cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001268#line 1269 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269#include "confdefs.h"
1270#include <stdlib.h>
1271EOF
1272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1273 egrep "free" >/dev/null 2>&1; then
1274 :
1275else
1276 rm -rf conftest*
1277 ac_cv_header_stdc=no
1278fi
1279rm -f conftest*
1280
1281fi
1282
1283if test $ac_cv_header_stdc = yes; then
1284 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1285if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001286 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001288 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001289#line 1290 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290#include "confdefs.h"
1291#include <ctype.h>
1292#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1293#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295int main () { int i; for (i = 0; i < 256; i++)
1296if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1297exit (0); }
1298
1299EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001300if { (eval echo configure:1301: \"$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 +00001301then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302 :
1303else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001304 echo "configure: failed program was:" >&5
1305 cat conftest.$ac_ext >&5
1306 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308fi
1309rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001311
1312fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001314
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001315echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316if test $ac_cv_header_stdc = yes; then
1317 cat >> confdefs.h <<\EOF
1318#define STDC_HEADERS 1
1319EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
1321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Guido van Rossum96013151997-10-08 22:47:52 +00001323for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001324signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001325sys/audioio.h sys/file.h sys/lock.h \
1326sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001327sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001329ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001330echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001331echo "configure:1332: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001332if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334else
1335 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001336#line 1337 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001340ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001341{ (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001342ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001343if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345 eval "ac_cv_header_$ac_safe=yes"
1346else
1347 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001348 echo "configure: failed program was:" >&5
1349 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350 rm -rf conftest*
1351 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352fi
1353rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354fi
1355if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001356 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001357 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001358 cat >> confdefs.h <<EOF
1359#define $ac_tr_hdr 1
1360EOF
1361
1362else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001363 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365done
1366
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367ac_header_dirent=no
1368for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1369do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001370ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001371echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001372echo "configure:1373: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001373if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1374 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001377#line 1378 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378#include "confdefs.h"
1379#include <sys/types.h>
1380#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001381int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001382DIR *dirp = 0;
1383; return 0; }
1384EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001385if { (eval echo configure:1386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001386 rm -rf conftest*
1387 eval "ac_cv_header_dirent_$ac_safe=yes"
1388else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001389 echo "configure: failed program was:" >&5
1390 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391 rm -rf conftest*
1392 eval "ac_cv_header_dirent_$ac_safe=no"
1393fi
1394rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001395fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001397 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001398 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001399 cat >> confdefs.h <<EOF
1400#define $ac_tr_hdr 1
1401EOF
1402 ac_header_dirent=$ac_hdr; break
1403else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001404 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001405fi
1406done
1407# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1408if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001409echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001410echo "configure:1411: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001411ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001412if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001413 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001414else
1415 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001416LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001417cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001418#line 1419 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001419#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001420/* Override any gcc2 internal prototype to avoid an error. */
1421/* We use char because int might match the return type of a gcc2
1422 builtin and then its argument prototype would still apply. */
1423char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001424
Guido van Rossumf78abae1997-01-21 22:02:36 +00001425int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001426opendir()
1427; return 0; }
1428EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001429if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001430 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001431 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001432else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001433 echo "configure: failed program was:" >&5
1434 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001435 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001436 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001437fi
1438rm -f conftest*
1439LIBS="$ac_save_LIBS"
1440
1441fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001442if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001443 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001444 LIBS="$LIBS -ldir"
1445else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001446 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001447fi
1448
1449else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001450echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001451echo "configure:1452: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001452ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001453if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001454 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455else
1456 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001457LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001458cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001459#line 1460 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001461/* Override any gcc2 internal prototype to avoid an error. */
1462/* We use char because int might match the return type of a gcc2
1463 builtin and then its argument prototype would still apply. */
1464char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001465
Guido van Rossumf78abae1997-01-21 22:02:36 +00001466int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001467opendir()
1468; return 0; }
1469EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001470if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001472 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001473else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001474 echo "configure: failed program was:" >&5
1475 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001476 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001477 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001478fi
1479rm -f conftest*
1480LIBS="$ac_save_LIBS"
1481
1482fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001483if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001484 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001485 LIBS="$LIBS -lx"
1486else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001487 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488fi
1489
1490fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001491
1492
1493# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001494was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001495echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001496echo "configure:1497: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001498#line 1499 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001499#include "confdefs.h"
1500#include <time.h>
1501EOF
1502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1503 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001504 rm -rf conftest*
1505 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001506else
1507 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001508 cat >> confdefs.h <<\EOF
1509#define clock_t long
1510EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001511
1512fi
1513rm -f conftest*
1514
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001515echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001516
Guido van Rossum84e7b241996-08-19 21:59:00 +00001517# Add some code to confdefs.h so that the test for off_t works on SCO
1518cat >> confdefs.h <<\EOF
1519#if defined(SCO_DS)
1520#undef _OFF_T
1521#endif
1522EOF
1523
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001524echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001525echo "configure:1526: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001526if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1527 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528else
1529 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001530#line 1531 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531#include "confdefs.h"
1532#include <sys/types.h>
1533#if STDC_HEADERS
1534#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001535#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536#endif
1537EOF
1538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001539 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001540 rm -rf conftest*
1541 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001542else
1543 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001544 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001545fi
1546rm -f conftest*
1547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001548fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001549echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001550if test $ac_cv_type_mode_t = no; then
1551 cat >> confdefs.h <<\EOF
1552#define mode_t int
1553EOF
1554
1555fi
1556
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001557echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001558echo "configure:1559: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001559if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1560 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001561else
1562 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001563#line 1564 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564#include "confdefs.h"
1565#include <sys/types.h>
1566#if STDC_HEADERS
1567#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001568#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569#endif
1570EOF
1571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001572 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001573 rm -rf conftest*
1574 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001575else
1576 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001578fi
1579rm -f conftest*
1580
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001582echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583if test $ac_cv_type_off_t = no; then
1584 cat >> confdefs.h <<\EOF
1585#define off_t long
1586EOF
1587
1588fi
1589
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001591echo "configure:1592: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594else
1595 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001596#line 1597 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001597#include "confdefs.h"
1598#include <sys/types.h>
1599#if STDC_HEADERS
1600#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001601#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001602#endif
1603EOF
1604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001605 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001606 rm -rf conftest*
1607 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001608else
1609 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001610 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001611fi
1612rm -f conftest*
1613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001615echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616if test $ac_cv_type_pid_t = no; then
1617 cat >> confdefs.h <<\EOF
1618#define pid_t int
1619EOF
1620
1621fi
1622
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001623echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001624echo "configure:1625: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001625if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001627else
1628 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001629#line 1630 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001630#include "confdefs.h"
1631#include <sys/types.h>
1632#include <signal.h>
1633#ifdef signal
1634#undef signal
1635#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001636#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001637extern "C" void (*signal (int, void (*)(int)))(int);
1638#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001639void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001640#endif
1641
Guido van Rossumf78abae1997-01-21 22:02:36 +00001642int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001643int i;
1644; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001645EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001646if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001647 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001649else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001652 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001654fi
1655rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001656fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001657
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001658echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001659cat >> confdefs.h <<EOF
1660#define RETSIGTYPE $ac_cv_type_signal
1661EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001662
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001663
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001665echo "configure:1666: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001666if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1667 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668else
1669 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001670#line 1671 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671#include "confdefs.h"
1672#include <sys/types.h>
1673#if STDC_HEADERS
1674#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001675#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676#endif
1677EOF
1678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001679 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001680 rm -rf conftest*
1681 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001682else
1683 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001684 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001685fi
1686rm -f conftest*
1687
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001689echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690if test $ac_cv_type_size_t = no; then
1691 cat >> confdefs.h <<\EOF
1692#define size_t unsigned
1693EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001694
1695fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001697echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001698echo "configure:1699: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001699if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1700 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701else
1702 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001703#line 1704 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704#include "confdefs.h"
1705#include <sys/types.h>
1706EOF
1707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1708 egrep "uid_t" >/dev/null 2>&1; then
1709 rm -rf conftest*
1710 ac_cv_type_uid_t=yes
1711else
1712 rm -rf conftest*
1713 ac_cv_type_uid_t=no
1714fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001715rm -f conftest*
1716
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001718
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001719echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001720if test $ac_cv_type_uid_t = no; then
1721 cat >> confdefs.h <<\EOF
1722#define uid_t int
1723EOF
1724
1725 cat >> confdefs.h <<\EOF
1726#define gid_t int
1727EOF
1728
1729fi
1730
Guido van Rossum627b2d71993-12-24 10:39:16 +00001731
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001732echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001733echo "configure:1734: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001734if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1735 echo $ac_n "(cached) $ac_c" 1>&6
1736else
1737 if test "$cross_compiling" = yes; then
1738 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1739else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001740 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001741#line 1742 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001742#include "confdefs.h"
1743#include <stdio.h>
1744main()
1745{
1746 FILE *f=fopen("conftestval", "w");
1747 if (!f) exit(1);
1748 fprintf(f, "%d\n", sizeof(int));
1749 exit(0);
1750}
1751EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001752if { (eval echo configure:1753: \"$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 +00001753then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001754 ac_cv_sizeof_int=`cat conftestval`
1755else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001756 echo "configure: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001759 ac_cv_sizeof_int=0
1760fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001761rm -fr conftest*
1762fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001763
1764fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001765echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1766cat >> confdefs.h <<EOF
1767#define SIZEOF_INT $ac_cv_sizeof_int
1768EOF
1769
1770
1771echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001772echo "configure:1773: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001773if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775else
1776 if test "$cross_compiling" = yes; then
1777 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1778else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001779 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001780#line 1781 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001781#include "confdefs.h"
1782#include <stdio.h>
1783main()
1784{
1785 FILE *f=fopen("conftestval", "w");
1786 if (!f) exit(1);
1787 fprintf(f, "%d\n", sizeof(long));
1788 exit(0);
1789}
1790EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001791if { (eval echo configure:1792: \"$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 +00001792then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001793 ac_cv_sizeof_long=`cat conftestval`
1794else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001795 echo "configure: failed program was:" >&5
1796 cat conftest.$ac_ext >&5
1797 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001798 ac_cv_sizeof_long=0
1799fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001800rm -fr conftest*
1801fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001802
1803fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001804echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1805cat >> confdefs.h <<EOF
1806#define SIZEOF_LONG $ac_cv_sizeof_long
1807EOF
1808
1809
Guido van Rossum0a516c91994-09-12 10:58:40 +00001810
1811# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001812
1813
1814
1815
Guido van Rossum0a516c91994-09-12 10:58:40 +00001816# SO is the extension of shared libraries `(including the dot!)
1817# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001818echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001819echo "configure:1820: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001820if test -z "$SO"
1821then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001822 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001823 hp*|HP*) SO=.sl;;
1824 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001825 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001826fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001827echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001828# LDSHARED is the ld *command* used to create shared library
1829# -- "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 +00001830echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001831echo "configure:1832: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001832if test -z "$LDSHARED"
1833then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001834 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00001835 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossum07397971997-04-29 21:49:50 +00001836 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00001837 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001838 SunOS/4*) LDSHARED="ld";;
1839 SunOS/5*) LDSHARED="ld -G";;
1840 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001841 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1842 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001843 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001844 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001845 dgux*) LDSHARED="ld -G";;
Guido van Rossum49545951997-12-02 19:28:29 +00001846 FreeBSD*|NetBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001847 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001848 *) LDSHARED="ld";;
1849 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001850fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001851echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001852# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001853# library -- this is only needed for a few systems
1854echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001855echo "configure:1856: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001856if test -z "$CCSHARED"
1857then
Guido van Rossum07397971997-04-29 21:49:50 +00001858 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001859 hp*|HP*) if test "$GCC" = yes;
1860 then CCSHARED="-fpic";
1861 else CCSHARED="+z";
1862 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001863 Linux*) CCSHARED="-fpic";;
Guido van Rossum49545951997-12-02 19:28:29 +00001864 FreeBSD*|NetBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001865 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum91922671997-10-09 20:24:13 +00001866 IRIX*/6*) CCSHARED="-all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001867 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001868fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001869echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001870# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001871# the python executable -- this is only needed for a few systems
1872echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001873echo "configure:1874: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001874if test -z "$LINKFORSHARED"
1875then
Guido van Rossum07397971997-04-29 21:49:50 +00001876 case $ac_sys_system/$ac_sys_release in
Guido van Rossume4766f61997-05-13 21:04:26 +00001877 AIX*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001878 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001879 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00001880 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum749af7c1997-08-16 14:35:52 +00001881 next/*) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001882 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum91922671997-10-09 20:24:13 +00001883 IRIX*/6*) LINKFORSHARED="-all";;
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00001884 SunOS/5*) if test "$CC" = "gcc"
1885 then
1886 if gcc -Xlinker -V 2>/dev/null | grep BFD >/dev/null
1887 then
1888 LINKFORSHARED="-Xlinker --export-dynamic"
1889 fi
1890 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001891 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001892fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001893echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001894
Guido van Rossum627b2d71993-12-24 10:39:16 +00001895# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00001896echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001897echo "configure:1898: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001898ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001899if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001900 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901else
1902 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001905#line 1906 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001906#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001907/* Override any gcc2 internal prototype to avoid an error. */
1908/* We use char because int might match the return type of a gcc2
1909 builtin and then its argument prototype would still apply. */
1910char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001911
Guido van Rossumf78abae1997-01-21 22:02:36 +00001912int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913dlopen()
1914; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001915EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001916if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001917 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001918 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001920 echo "configure: failed program was:" >&5
1921 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001922 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001923 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001924fi
1925rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001927
Guido van Rossum627b2d71993-12-24 10:39:16 +00001928fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001929if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001930 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001931 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1932 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001933 cat >> confdefs.h <<EOF
1934#define $ac_tr_lib 1
1935EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001936
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001937 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001938
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001940 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001941fi
1942 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00001943echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001944echo "configure:1945: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001945ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001946if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948else
1949 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001950LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001952#line 1953 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001953#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954/* Override any gcc2 internal prototype to avoid an error. */
1955/* We use char because int might match the return type of a gcc2
1956 builtin and then its argument prototype would still apply. */
1957char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001958
Guido van Rossumf78abae1997-01-21 22:02:36 +00001959int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001960shl_load()
1961; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001963if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001964 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001965 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001966else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001967 echo "configure: failed program was:" >&5
1968 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001969 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001970 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001971fi
1972rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001973LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001974
Guido van Rossum627b2d71993-12-24 10:39:16 +00001975fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001976if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001977 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001978 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1979 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001980 cat >> confdefs.h <<EOF
1981#define $ac_tr_lib 1
1982EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001983
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001984 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001985
1986else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001987 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001988fi
1989 # Dynamic linking for HP-UX
Guido van Rossumf78abae1997-01-21 22:02:36 +00001990echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001991echo "configure:1992: checking for getpwnam in -lsun" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001992ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001993if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001994 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001995else
1996 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001997LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001998cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001999#line 2000 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002000#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002001/* Override any gcc2 internal prototype to avoid an error. */
2002/* We use char because int might match the return type of a gcc2
2003 builtin and then its argument prototype would still apply. */
2004char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002005
Guido van Rossumf78abae1997-01-21 22:02:36 +00002006int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002007getpwnam()
2008; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002009EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002010if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002011 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002012 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002013else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002014 echo "configure: failed program was:" >&5
2015 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002016 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002017 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002018fi
2019rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002020LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002021
Guido van Rossum7f43da71994-08-01 12:15:30 +00002022fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002023if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002024 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002025 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2026 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027 cat >> confdefs.h <<EOF
2028#define $ac_tr_lib 1
2029EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002030
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002031 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002032
2033else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002034 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002035fi
2036 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00002037# The following three (nsl,inet,socket) are needed on Sequent;
2038# the order of checking must be this. Most SVR4 platforms will
2039# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
2040# broken. I see no elegant solution (probably CHECK_LIB should be
2041# fixed to only add the library if the given entry point is not
2042# satisfied without it).
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002043if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00002044then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002045echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002046echo "configure:2047: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002047ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002048if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002049 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002050else
2051 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002052LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002053cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002054#line 2055 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002055#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002056/* Override any gcc2 internal prototype to avoid an error. */
2057/* We use char because int might match the return type of a gcc2
2058 builtin and then its argument prototype would still apply. */
2059char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002060
Guido van Rossumf78abae1997-01-21 22:02:36 +00002061int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002062t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002063; return 0; }
2064EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002065if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002066 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002067 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002068else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002069 echo "configure: failed program was:" >&5
2070 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002071 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002072 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002073fi
2074rm -f conftest*
2075LIBS="$ac_save_LIBS"
2076
2077fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002078if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002079 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002080 LIBS="-lnsl $LIBS"
2081else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002082 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002083fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002084 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002085echo $ac_n "checking for gethostbyname in -linet""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002086echo "configure:2087: checking for gethostbyname in -linet" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002087ac_lib_var=`echo inet'_'gethostbyname | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002088if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002089 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002090else
2091 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002092LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002093cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002094#line 2095 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002095#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002096/* Override any gcc2 internal prototype to avoid an error. */
2097/* We use char because int might match the return type of a gcc2
2098 builtin and then its argument prototype would still apply. */
2099char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002100
Guido van Rossumf78abae1997-01-21 22:02:36 +00002101int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002102gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002103; return 0; }
2104EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002105if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002106 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002107 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002108else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002109 echo "configure: failed program was:" >&5
2110 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002111 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002112 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002113fi
2114rm -f conftest*
2115LIBS="$ac_save_LIBS"
2116
2117fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002118if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002119 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002120 LIBS="-linet $LIBS"
2121else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002122 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002123fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002124 # Sequent
Guido van Rossumf78abae1997-01-21 22:02:36 +00002125echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002126echo "configure:2127: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002127ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002128if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002129 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002130else
2131 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002132LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002133cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002134#line 2135 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002135#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002136/* Override any gcc2 internal prototype to avoid an error. */
2137/* We use char because int might match the return type of a gcc2
2138 builtin and then its argument prototype would still apply. */
2139char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002140
Guido van Rossumf78abae1997-01-21 22:02:36 +00002141int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002142socket()
2143; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002144EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002145if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002146 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002147 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002149 echo "configure: failed program was:" >&5
2150 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002151 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002152 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002153fi
2154rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002155LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002158if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002159 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002160 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002161else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002162 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002163fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002164 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00002165fi
Guido van Rossuma68acba1996-07-31 17:36:39 +00002166echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002167echo "configure:2168: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002168# Check whether --with-libs or --without-libs was given.
2169if test "${with_libs+set}" = set; then
2170 withval="$with_libs"
2171
2172echo "$ac_t""$withval" 1>&6
2173LIBS="$withval $LIBS"
2174
2175else
2176 echo "$ac_t""no" 1>&6
2177fi
2178
Guido van Rossum7f43da71994-08-01 12:15:30 +00002179
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002180echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002181echo "configure:2182: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002182# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002183if test "${with_readline+set}" = set; then
2184 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002185 echo "$ac_t""$withval" 1>&6
2186{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002187else
Guido van Rossumb06df271997-08-05 21:50:20 +00002188 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002189fi
2190
Guido van Rossum7f43da71994-08-01 12:15:30 +00002191
Guido van Rossum009f7871997-12-04 00:51:42 +00002192
2193USE_THREAD_MODULE="#"
2194
Guido van Rossumec2f0731997-01-22 20:54:01 +00002195echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002196echo "configure:2197: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002197
2198# Check whether --with-dec-threads or --without-dec-threads was given.
2199if test "${with_dec_threads+set}" = set; then
2200 withval="$with_dec_threads"
2201 echo "$ac_t""$withval" 1>&6
2202LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002203if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002204 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002205fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002206else
2207 echo "$ac_t""no" 1>&6
2208fi
2209
2210
2211echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002212echo "configure:2213: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002213# Check whether --with-threads or --without-threads was given.
2214if test "${with_threads+set}" = set; then
2215 withval="$with_threads"
2216 echo "$ac_t""$withval" 1>&6
2217if test "${with_thread+set}" != set; then
2218 with_thread="$withval";
2219fi
2220else
2221 echo "$ac_t""no" 1>&6
2222fi
2223
2224
2225echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002226echo "configure:2227: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002227# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002228if test "${with_thread+set}" = set; then
2229 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002230
Guido van Rossum009f7871997-12-04 00:51:42 +00002231USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002232echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002233if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002234then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002235fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002236cat >> confdefs.h <<\EOF
2237#define _REENTRANT 1
2238EOF
2239
Guido van Rossumf78abae1997-01-21 22:02:36 +00002240ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002241echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002242echo "configure:2243: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002243if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245else
2246 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002247#line 2248 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002248#include "confdefs.h"
2249#include <mach/cthreads.h>
2250EOF
2251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002252{ (eval echo configure:2253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002253ac_err=`grep -v '^ *+' conftest.out`
2254if test -z "$ac_err"; then
2255 rm -rf conftest*
2256 eval "ac_cv_header_$ac_safe=yes"
2257else
2258 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002259 echo "configure: failed program was:" >&5
2260 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002261 rm -rf conftest*
2262 eval "ac_cv_header_$ac_safe=no"
2263fi
2264rm -f conftest*
2265fi
2266if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2267 echo "$ac_t""yes" 1>&6
2268 cat >> confdefs.h <<\EOF
2269#define WITH_THREAD 1
2270EOF
2271
2272cat >> confdefs.h <<\EOF
2273#define C_THREADS 1
2274EOF
2275
2276LIBOBJS="$LIBOBJS thread.o"
2277else
2278 echo "$ac_t""no" 1>&6
2279
Guido van Rossumf78abae1997-01-21 22:02:36 +00002280echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002281echo "configure:2282: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002282ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002283if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002284 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002285else
2286 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002287LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002288cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002289#line 2290 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002290#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002291/* Override any gcc2 internal prototype to avoid an error. */
2292/* We use char because int might match the return type of a gcc2
2293 builtin and then its argument prototype would still apply. */
2294char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002295
Guido van Rossumf78abae1997-01-21 22:02:36 +00002296int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002297pthread_create()
2298; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002299EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002300if { (eval echo configure:2301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002301 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002302 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002303else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002304 echo "configure: failed program was:" >&5
2305 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002306 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002307 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002308fi
2309rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002310LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002311
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002312fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002313if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002314 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002315 cat >> confdefs.h <<\EOF
2316#define WITH_THREAD 1
2317EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002318
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002319cat >> confdefs.h <<\EOF
2320#define _POSIX_THREADS 1
2321EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002322
2323LIBS="$LIBS -lpthreads"
2324LIBOBJS="$LIBOBJS thread.o"
2325else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002326 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002327
Guido van Rossumf78abae1997-01-21 22:02:36 +00002328echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002329echo "configure:2330: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002330ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002331if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
2333else
2334 ac_save_LIBS="$LIBS"
2335LIBS="-lpthread $LIBS"
2336cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002337#line 2338 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002338#include "confdefs.h"
2339/* Override any gcc2 internal prototype to avoid an error. */
2340/* We use char because int might match the return type of a gcc2
2341 builtin and then its argument prototype would still apply. */
2342char pthread_create();
2343
Guido van Rossumf78abae1997-01-21 22:02:36 +00002344int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002345pthread_create()
2346; return 0; }
2347EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002348if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002349 rm -rf conftest*
2350 eval "ac_cv_lib_$ac_lib_var=yes"
2351else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002352 echo "configure: failed program was:" >&5
2353 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002354 rm -rf conftest*
2355 eval "ac_cv_lib_$ac_lib_var=no"
2356fi
2357rm -f conftest*
2358LIBS="$ac_save_LIBS"
2359
2360fi
2361if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2362 echo "$ac_t""yes" 1>&6
2363 cat >> confdefs.h <<\EOF
2364#define WITH_THREAD 1
2365EOF
2366
2367cat >> confdefs.h <<\EOF
2368#define _POSIX_THREADS 1
2369EOF
2370
2371LIBS="$LIBS -lpthread"
2372LIBOBJS="$LIBOBJS thread.o"
2373else
2374 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002375
Guido van Rossum49545951997-12-02 19:28:29 +00002376echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002377echo "configure:2378: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00002378ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2379if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2380 echo $ac_n "(cached) $ac_c" 1>&6
2381else
2382 ac_save_LIBS="$LIBS"
2383LIBS="-lc_r $LIBS"
2384cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002385#line 2386 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00002386#include "confdefs.h"
2387/* Override any gcc2 internal prototype to avoid an error. */
2388/* We use char because int might match the return type of a gcc2
2389 builtin and then its argument prototype would still apply. */
2390char pthread_create();
2391
2392int main() {
2393pthread_create()
2394; return 0; }
2395EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002396if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum49545951997-12-02 19:28:29 +00002397 rm -rf conftest*
2398 eval "ac_cv_lib_$ac_lib_var=yes"
2399else
2400 echo "configure: failed program was:" >&5
2401 cat conftest.$ac_ext >&5
2402 rm -rf conftest*
2403 eval "ac_cv_lib_$ac_lib_var=no"
2404fi
2405rm -f conftest*
2406LIBS="$ac_save_LIBS"
2407
2408fi
2409if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2410 echo "$ac_t""yes" 1>&6
2411 cat >> confdefs.h <<\EOF
2412#define WITH_THREAD 1
2413EOF
2414
2415cat >> confdefs.h <<\EOF
2416#define _POSIX_THREADS 1
2417EOF
2418
2419LIBS="$LIBS -lc_r"
2420LIBOBJS="$LIBOBJS thread.o"
2421else
2422 echo "$ac_t""no" 1>&6
2423
Guido van Rossum0be3e491997-05-22 20:33:33 +00002424echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002425echo "configure:2426: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002426ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2427if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2428 echo $ac_n "(cached) $ac_c" 1>&6
2429else
2430 ac_save_LIBS="$LIBS"
2431LIBS="-lthread $LIBS"
2432cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002433#line 2434 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002434#include "confdefs.h"
2435/* Override any gcc2 internal prototype to avoid an error. */
2436/* We use char because int might match the return type of a gcc2
2437 builtin and then its argument prototype would still apply. */
2438char __d6_pthread_create();
2439
2440int main() {
2441__d6_pthread_create()
2442; return 0; }
2443EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002444if { (eval echo configure:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002445 rm -rf conftest*
2446 eval "ac_cv_lib_$ac_lib_var=yes"
2447else
2448 echo "configure: failed program was:" >&5
2449 cat conftest.$ac_ext >&5
2450 rm -rf conftest*
2451 eval "ac_cv_lib_$ac_lib_var=no"
2452fi
2453rm -f conftest*
2454LIBS="$ac_save_LIBS"
2455
2456fi
2457if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2458 echo "$ac_t""yes" 1>&6
2459 cat >> confdefs.h <<\EOF
2460#define WITH_THREAD 1
2461EOF
2462
2463cat >> confdefs.h <<\EOF
2464#define _POSIX_THREADS 1
2465EOF
2466
2467LIBS="$LIBS -lthread"
2468LIBOBJS="$LIBOBJS thread.o"
2469else
2470 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002471fi
2472
2473
Guido van Rossum627b2d71993-12-24 10:39:16 +00002474fi
2475
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002476fi
2477
Guido van Rossum0be3e491997-05-22 20:33:33 +00002478fi
2479
Guido van Rossum49545951997-12-02 19:28:29 +00002480fi
2481
Guido van Rossum0be3e491997-05-22 20:33:33 +00002482
Guido van Rossumf78abae1997-01-21 22:02:36 +00002483echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002484echo "configure:2485: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002485ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002486if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002487 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002488else
2489 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002490LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002491cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002492#line 2493 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002493#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002494/* Override any gcc2 internal prototype to avoid an error. */
2495/* We use char because int might match the return type of a gcc2
2496 builtin and then its argument prototype would still apply. */
2497char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002498
Guido van Rossumf78abae1997-01-21 22:02:36 +00002499int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002500usconfig()
2501; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002502EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002503if { (eval echo configure:2504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002504 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002507 echo "configure: failed program was:" >&5
2508 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002509 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002510 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002511fi
2512rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002513LIBS="$ac_save_LIBS"
2514
2515fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002516if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002517 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002518 cat >> confdefs.h <<\EOF
2519#define WITH_THREAD 1
2520EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002521
Guido van Rossum7f43da71994-08-01 12:15:30 +00002522LIBS="$LIBS -lmpc"
2523LIBOBJS="$LIBOBJS thread.o"
2524else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002525 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002526fi
2527
Guido van Rossumf78abae1997-01-21 22:02:36 +00002528echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002529echo "configure:2530: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002530ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002531if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002532 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002533else
2534 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002535LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002536cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002537#line 2538 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002538#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002539/* Override any gcc2 internal prototype to avoid an error. */
2540/* We use char because int might match the return type of a gcc2
2541 builtin and then its argument prototype would still apply. */
2542char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002543
Guido van Rossumf78abae1997-01-21 22:02:36 +00002544int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002545thr_create()
2546; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002547EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002548if { (eval echo configure:2549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002549 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002550 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002551else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002552 echo "configure: failed program was:" >&5
2553 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002554 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002555 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002556fi
2557rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002558LIBS="$ac_save_LIBS"
2559
2560fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002561if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002562 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002563 cat >> confdefs.h <<\EOF
2564#define WITH_THREAD 1
2565EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002566
Guido van Rossum7f43da71994-08-01 12:15:30 +00002567LIBS="$LIBS -lthread"
2568LIBOBJS="$LIBOBJS thread.o"
2569else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002570 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002571fi
2572
Guido van Rossum7f43da71994-08-01 12:15:30 +00002573
Guido van Rossumda88dad1995-01-26 00:46:29 +00002574else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002575 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002576fi
2577
Guido van Rossum7f43da71994-08-01 12:15:30 +00002578
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002579# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002580
2581DLINCLDIR=/
2582
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002583echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002584echo "configure:2585: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002586if test "${with_sgi_dl+set}" = set; then
2587 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002588
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002589echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590cat >> confdefs.h <<\EOF
2591#define WITH_SGI_DL 1
2592EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002593
2594dldir=$withval
2595if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002596then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002598fi
2599DLINCLDIR=${dldir}
2600LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002601else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002602 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002603fi
2604
2605
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002606echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002607echo "configure:2608: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002608# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002609if test "${with_dl_dld+set}" = set; then
2610 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002611
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002612echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613cat >> confdefs.h <<\EOF
2614#define WITH_DL_DLD 1
2615EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002616
2617dldir=`echo "$withval" | sed 's/,.*//'`
2618dlddir=`echo "$withval" | sed 's/.*,//'`
2619if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002620then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002622fi
2623DLINCLDIR=${dldir}
2624LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002625else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002626 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002627fi
2628
2629
Guido van Rossum627b2d71993-12-24 10:39:16 +00002630# checks for library functions
Guido van Rossum1171ee61997-08-22 20:42:00 +00002631for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \
2632 gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
2633 kill link lstat mkfifo nice pause plock putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00002634 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002635 sigaction siginterrupt sigrelse strftime strptime symlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002636 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002637do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002638echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002639echo "configure:2640: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002640if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2641 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002642else
2643 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002644#line 2645 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002645#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002646/* System header to define __stub macros and hopefully few prototypes,
2647 which can conflict with char $ac_func(); below. */
2648#include <assert.h>
2649/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002650/* We use char because int might match the return type of a gcc2
2651 builtin and then its argument prototype would still apply. */
2652char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002653
Guido van Rossumf78abae1997-01-21 22:02:36 +00002654int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002655
Guido van Rossum627b2d71993-12-24 10:39:16 +00002656/* The GNU C library defines this for functions which it implements
2657 to always fail with ENOSYS. Some functions are actually named
2658 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002660choke me
2661#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002662$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002663#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002664
Guido van Rossum7f43da71994-08-01 12:15:30 +00002665; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002666EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002667if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002668 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669 eval "ac_cv_func_$ac_func=yes"
2670else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002671 echo "configure: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673 rm -rf conftest*
2674 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002675fi
2676rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002678
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002680 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002681 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682 cat >> confdefs.h <<EOF
2683#define $ac_tr_func 1
2684EOF
2685
2686else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002687 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002689done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002690
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002691for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002692do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002693echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002694echo "configure:2695: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002695if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2696 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697else
2698 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002699#line 2700 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002701/* System header to define __stub macros and hopefully few prototypes,
2702 which can conflict with char $ac_func(); below. */
2703#include <assert.h>
2704/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002705/* We use char because int might match the return type of a gcc2
2706 builtin and then its argument prototype would still apply. */
2707char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002708
Guido van Rossumf78abae1997-01-21 22:02:36 +00002709int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710
Guido van Rossum627b2d71993-12-24 10:39:16 +00002711/* The GNU C library defines this for functions which it implements
2712 to always fail with ENOSYS. Some functions are actually named
2713 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002714#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002715choke me
2716#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002717$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002718#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002719
Guido van Rossum7f43da71994-08-01 12:15:30 +00002720; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002721EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002722if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723 rm -rf conftest*
2724 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002725else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002726 echo "configure: failed program was:" >&5
2727 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002728 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002730fi
2731rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002732fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002733
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002734if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002735 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002736 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2737 cat >> confdefs.h <<EOF
2738#define $ac_tr_func 1
2739EOF
2740
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002742 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743LIBOBJS="$LIBOBJS ${ac_func}.o"
2744fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002745done
2746
Guido van Rossumf78abae1997-01-21 22:02:36 +00002747
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002748echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002749echo "configure:2750: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002750if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2751 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002752else
2753 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002754#line 2755 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002755#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002756/* System header to define __stub macros and hopefully few prototypes,
2757 which can conflict with char getpgrp(); below. */
2758#include <assert.h>
2759/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002760/* We use char because int might match the return type of a gcc2
2761 builtin and then its argument prototype would still apply. */
2762char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002763
Guido van Rossumf78abae1997-01-21 22:02:36 +00002764int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765
Guido van Rossum627b2d71993-12-24 10:39:16 +00002766/* The GNU C library defines this for functions which it implements
2767 to always fail with ENOSYS. Some functions are actually named
2768 something starting with __ and the normal name is an alias. */
2769#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2770choke me
2771#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002772getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774
2775; return 0; }
2776EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002777if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002778 rm -rf conftest*
2779 eval "ac_cv_func_getpgrp=yes"
2780else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002781 echo "configure: failed program was:" >&5
2782 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783 rm -rf conftest*
2784 eval "ac_cv_func_getpgrp=no"
2785fi
2786rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002788
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002790 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002791 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002792#line 2793 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793#include "confdefs.h"
2794#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002795int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002797; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002798EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002799if { (eval echo configure:2800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002800 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801 cat >> confdefs.h <<\EOF
2802#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002803EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002804
Guido van Rossumf78abae1997-01-21 22:02:36 +00002805else
2806 echo "configure: failed program was:" >&5
2807 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002808fi
2809rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002810else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002811 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002812fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002814echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002815echo "configure:2816: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002816if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2817 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002818else
2819 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002820#line 2821 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002821#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002822/* System header to define __stub macros and hopefully few prototypes,
2823 which can conflict with char setpgrp(); below. */
2824#include <assert.h>
2825/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002826/* We use char because int might match the return type of a gcc2
2827 builtin and then its argument prototype would still apply. */
2828char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002829
Guido van Rossumf78abae1997-01-21 22:02:36 +00002830int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002831
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002832/* The GNU C library defines this for functions which it implements
2833 to always fail with ENOSYS. Some functions are actually named
2834 something starting with __ and the normal name is an alias. */
2835#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2836choke me
2837#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002838setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002839#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840
2841; return 0; }
2842EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002843if { (eval echo configure:2844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002844 rm -rf conftest*
2845 eval "ac_cv_func_setpgrp=yes"
2846else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002847 echo "configure: failed program was:" >&5
2848 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002849 rm -rf conftest*
2850 eval "ac_cv_func_setpgrp=no"
2851fi
2852rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002853fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002854
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002855if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002856 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002857 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002858#line 2859 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002859#include "confdefs.h"
2860#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002861int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002863; return 0; }
2864EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002865if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002866 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002867 cat >> confdefs.h <<\EOF
2868#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002869EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002870
Guido van Rossumf78abae1997-01-21 22:02:36 +00002871else
2872 echo "configure: failed program was:" >&5
2873 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002874fi
2875rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002876else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002877 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002878fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002879
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002880echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002881echo "configure:2882: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002882if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+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 Rossum3c4bb801997-12-18 23:55:32 +00002886#line 2887 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002887#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002888/* System header to define __stub macros and hopefully few prototypes,
2889 which can conflict with char gettimeofday(); below. */
2890#include <assert.h>
2891/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002892/* We use char because int might match the return type of a gcc2
2893 builtin and then its argument prototype would still apply. */
2894char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002895
Guido van Rossumf78abae1997-01-21 22:02:36 +00002896int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002897
2898/* The GNU C library defines this for functions which it implements
2899 to always fail with ENOSYS. Some functions are actually named
2900 something starting with __ and the normal name is an alias. */
2901#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2902choke me
2903#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002904gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002905#endif
2906
2907; return 0; }
2908EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002909if { (eval echo configure:2910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002910 rm -rf conftest*
2911 eval "ac_cv_func_gettimeofday=yes"
2912else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002913 echo "configure: failed program was:" >&5
2914 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002915 rm -rf conftest*
2916 eval "ac_cv_func_gettimeofday=no"
2917fi
2918rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002919fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002921if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002922 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002923 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002924#line 2925 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002925#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002926#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002927int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002928gettimeofday((struct timeval*)0,(struct timezone*)0);
2929; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002930EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002931if { (eval echo configure:2932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002932 :
2933else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002934 echo "configure: failed program was:" >&5
2935 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002936 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002937 cat >> confdefs.h <<\EOF
2938#define GETTIMEOFDAY_NO_TZ 1
2939EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002940
2941fi
2942rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002943else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002944 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002945fi
2946
2947
2948# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002949echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002950echo "configure:2951: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002951if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2952 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002953else
2954 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002955#line 2956 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002956#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002957#include <sys/types.h>
2958#include <sys/time.h>
2959#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002960int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002961struct tm *tp;
2962; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002963EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002964if { (eval echo configure:2965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002965 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002966 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002967else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002968 echo "configure: failed program was:" >&5
2969 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002970 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002971 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002972fi
2973rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002974fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002975
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002976echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002977if test $ac_cv_header_time = yes; then
2978 cat >> confdefs.h <<\EOF
2979#define TIME_WITH_SYS_TIME 1
2980EOF
2981
2982fi
2983
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002984echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002985echo "configure:2986: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002986if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2987 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002988else
2989 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002990#line 2991 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002991#include "confdefs.h"
2992#include <sys/types.h>
2993#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002994int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002995struct tm *tp; tp->tm_sec;
2996; return 0; }
2997EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002998if { (eval echo configure:2999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002999 rm -rf conftest*
3000 ac_cv_struct_tm=time.h
3001else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003002 echo "configure: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003004 rm -rf conftest*
3005 ac_cv_struct_tm=sys/time.h
3006fi
3007rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003008fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003009
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003010echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003011if test $ac_cv_struct_tm = sys/time.h; then
3012 cat >> confdefs.h <<\EOF
3013#define TM_IN_SYS_TIME 1
3014EOF
3015
3016fi
3017
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003018echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003019echo "configure:3020: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003020if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003022else
3023 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003024#line 3025 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003025#include "confdefs.h"
3026#include <sys/types.h>
3027#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003028int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003029struct tm tm; tm.tm_zone;
3030; return 0; }
3031EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003032if { (eval echo configure:3033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003033 rm -rf conftest*
3034 ac_cv_struct_tm_zone=yes
3035else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003036 echo "configure: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003038 rm -rf conftest*
3039 ac_cv_struct_tm_zone=no
3040fi
3041rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003042fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003043
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003044echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003045if test "$ac_cv_struct_tm_zone" = yes; then
3046 cat >> confdefs.h <<\EOF
3047#define HAVE_TM_ZONE 1
3048EOF
3049
3050else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003051 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003052echo "configure:3053: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003053if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3054 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003055else
3056 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003057#line 3058 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003058#include "confdefs.h"
3059#include <time.h>
3060#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003061extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003062#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003063int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064atoi(*tzname);
3065; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003066EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003067if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003068 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003069 ac_cv_var_tzname=yes
3070else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003071 echo "configure: failed program was:" >&5
3072 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003073 rm -rf conftest*
3074 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003075fi
3076rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003077fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003078
3079echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003080 if test $ac_cv_var_tzname = yes; then
3081 cat >> confdefs.h <<\EOF
3082#define HAVE_TZNAME 1
3083EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003085 fi
3086fi
3087
3088
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003089echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003090echo "configure:3091: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003091if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3092 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003093else
3094 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003095#line 3096 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003096#include "confdefs.h"
3097#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003098int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003099return altzone;
3100; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003101EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003102if { (eval echo configure:3103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003103 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104 ac_cv_header_time_altzone=yes
3105else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003106 echo "configure: failed program was:" >&5
3107 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003108 rm -rf conftest*
3109 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003110fi
3111rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112fi
3113
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003114echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115if test $ac_cv_header_time_altzone = yes; then
3116 cat >> confdefs.h <<\EOF
3117#define HAVE_ALTZONE 1
3118EOF
3119
3120fi
3121
Guido van Rossumda88dad1995-01-26 00:46:29 +00003122was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003123echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003124echo "configure:3125: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003125cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003126#line 3127 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003127#include "confdefs.h"
3128
3129#include <sys/types.h>
3130#include <sys/select.h>
3131#include <sys/time.h>
3132
Guido van Rossumf78abae1997-01-21 22:02:36 +00003133int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003134;
3135; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003136EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003137if { (eval echo configure:3138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003138 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003139 cat >> confdefs.h <<\EOF
3140#define SYS_SELECT_WITH_SYS_TIME 1
3141EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003142 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003143else
3144 echo "configure: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003146fi
3147rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003148echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003149
3150# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003151
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003152echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003153echo "configure:3154: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003154if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003156else
3157 if test "$GCC" = yes; then
3158 # GCC predefines this symbol on systems where it applies.
3159cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003160#line 3161 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003161#include "confdefs.h"
3162#ifdef __CHAR_UNSIGNED__
3163 yes
3164#endif
3165
3166EOF
3167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3168 egrep "yes" >/dev/null 2>&1; then
3169 rm -rf conftest*
3170 ac_cv_c_char_unsigned=yes
3171else
3172 rm -rf conftest*
3173 ac_cv_c_char_unsigned=no
3174fi
3175rm -f conftest*
3176
3177else
3178if test "$cross_compiling" = yes; then
3179 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3180else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003181 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003182#line 3183 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003183#include "confdefs.h"
3184/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003185#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003186#define volatile
3187#endif
3188main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003189 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003190}
3191EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003192if { (eval echo configure:3193: \"$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 +00003193then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194 ac_cv_c_char_unsigned=yes
3195else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003196 echo "configure: failed program was:" >&5
3197 cat conftest.$ac_ext >&5
3198 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003199 ac_cv_c_char_unsigned=no
3200fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003201rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003202fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003203
3204fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003206
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003207echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3209 cat >> confdefs.h <<\EOF
3210#define __CHAR_UNSIGNED__ 1
3211EOF
3212
3213fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003214
3215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003216echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003217echo "configure:3218: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003218if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3219 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003220else
3221 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003222#line 3223 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003223#include "confdefs.h"
3224
Guido van Rossumf78abae1997-01-21 22:02:36 +00003225int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003226
3227/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003228typedef int charset[2]; const charset x;
3229/* SunOS 4.1.1 cc rejects this. */
3230char const *const *ccp;
3231char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003232/* NEC SVR4.0.2 mips cc rejects this. */
3233struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003234static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003235/* AIX XL C 1.02.0.0 rejects this.
3236 It does not let you subtract one const X* pointer from another in an arm
3237 of an if-expression whose if-part is not a constant expression */
3238const char *g = "string";
3239ccp = &g + (g ? g-g : 0);
3240/* HPUX 7.0 cc rejects these. */
3241++ccp;
3242p = (char**) ccp;
3243ccp = (char const *const *) p;
3244{ /* SCO 3.2v4 cc rejects this. */
3245 char *t;
3246 char const *s = 0 ? (char *) 0 : (char const *) 0;
3247
3248 *t++ = 0;
3249}
3250{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003252 const int *foo = &x[0];
3253 ++foo;
3254}
3255{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3256 typedef const int *iptr;
3257 iptr p = 0;
3258 ++p;
3259}
3260{ /* AIX XL C 1.02.0.0 rejects this saying
3261 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3262 struct s { int j; const int *ap[3]; };
3263 struct s *b; b->j = 5;
3264}
3265{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3266 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003267}
3268
3269; return 0; }
3270EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003271if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003272 rm -rf conftest*
3273 ac_cv_c_const=yes
3274else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003275 echo "configure: failed program was:" >&5
3276 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003277 rm -rf conftest*
3278 ac_cv_c_const=no
3279fi
3280rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003281fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003282
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003283echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284if test $ac_cv_c_const = no; then
3285 cat >> confdefs.h <<\EOF
3286#define const
3287EOF
3288
3289fi
3290
3291
Guido van Rossumda88dad1995-01-26 00:46:29 +00003292works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003293echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003294echo "configure:3295: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003296#line 3297 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003297#include "confdefs.h"
3298
Guido van Rossumf78abae1997-01-21 22:02:36 +00003299int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003300volatile int x; x = 0;
3301; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003302EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003303if { (eval echo configure:3304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003304 rm -rf conftest*
3305 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003306else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003307 echo "configure: failed program was:" >&5
3308 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003309 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003310 cat >> confdefs.h <<\EOF
3311#define volatile
3312EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003313
3314fi
3315rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003316echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003317
Guido van Rossumda88dad1995-01-26 00:46:29 +00003318works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003319echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003320echo "configure:3321: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003321cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003322#line 3323 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003323#include "confdefs.h"
3324
Guido van Rossumf78abae1997-01-21 22:02:36 +00003325int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326signed char c;
3327; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003328EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003329if { (eval echo configure:3330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003330 rm -rf conftest*
3331 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003332else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003333 echo "configure: failed program was:" >&5
3334 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003335 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336 cat >> confdefs.h <<\EOF
3337#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003338EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003339
3340fi
3341rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003342echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003343
Guido van Rossumda88dad1995-01-26 00:46:29 +00003344have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003345echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003346echo "configure:3347: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003347cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003348#line 3349 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003349#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003350int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003351int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003352return foo(10);
3353; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003354EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003355if { (eval echo configure:3356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003356 rm -rf conftest*
3357 cat >> confdefs.h <<\EOF
3358#define HAVE_PROTOTYPES 1
3359EOF
3360 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003361else
3362 echo "configure: failed program was:" >&5
3363 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003364fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003366echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003367
Guido van Rossumda88dad1995-01-26 00:46:29 +00003368works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003369echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003370echo "configure:3371: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003372#line 3373 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003373#include "confdefs.h"
3374
3375#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003376int foo(int x, ...) {
3377 va_list va;
3378 va_start(va, x);
3379 va_arg(va, int);
3380 va_arg(va, char *);
3381 va_arg(va, double);
3382 return 0;
3383}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003384
Guido van Rossumf78abae1997-01-21 22:02:36 +00003385int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003386return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003387; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003388EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003389if { (eval echo configure:3390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003390 rm -rf conftest*
3391 cat >> confdefs.h <<\EOF
3392#define HAVE_STDARG_PROTOTYPES 1
3393EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003394 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003395else
3396 echo "configure: failed program was:" >&5
3397 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003398fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003399rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003400echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003401
Guido van Rossumda88dad1995-01-26 00:46:29 +00003402if test "$have_prototypes" = yes; then
3403bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003404echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003405echo "configure:3406: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003406cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003407#line 3408 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003408#include "confdefs.h"
3409#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003410int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003411char **t;execve("@",t,t);
3412; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003413EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003414if { (eval echo configure:3415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003415 :
3416else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003417 echo "configure: failed program was:" >&5
3418 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003419 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003420 cat >> confdefs.h <<\EOF
3421#define BAD_EXEC_PROTOTYPES 1
3422EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003423 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003424fi
3425rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003426echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003427fi
3428
Guido van Rossumda88dad1995-01-26 00:46:29 +00003429bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003430echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003431echo "configure:3432: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003432if test "$cross_compiling" = yes; then
3433 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3434else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003435 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003436#line 3437 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003437#include "confdefs.h"
3438
3439struct s { int a; int b; };
3440static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003441int foobar() {
3442 static int random;
3443 random = (int) &foo;
3444 return random;
3445}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003446static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003447main() {
3448 exit(!((int)&foo == foobar()));
3449}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003450
3451EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003452if { (eval echo configure:3453: \"$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 +00003453then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003454 :
3455else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003456 echo "configure: failed program was:" >&5
3457 cat conftest.$ac_ext >&5
3458 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003459 cat >> confdefs.h <<\EOF
3460#define BAD_STATIC_FORWARD 1
3461EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003462 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003463fi
3464rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003465fi
3466
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003467echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003468
Guido van Rossumda88dad1995-01-26 00:46:29 +00003469va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003470echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003471echo "configure:3472: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003472cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003473#line 3474 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003474#include "confdefs.h"
3475
3476#ifdef HAVE_STDARG_PROTOTYPES
3477#include <stdarg.h>
3478#else
3479#include <varargs.h>
3480#endif
3481
Guido van Rossumf78abae1997-01-21 22:02:36 +00003482int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003483va_list list1, list2; list1 = list2;
3484; return 0; }
3485EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003486if { (eval echo configure:3487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003487 :
3488else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003489 echo "configure: failed program was:" >&5
3490 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003491 rm -rf conftest*
3492 cat >> confdefs.h <<\EOF
3493#define VA_LIST_IS_ARRAY 1
3494EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003495 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003496fi
3497rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003498echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003499
Guido van Rossum627b2d71993-12-24 10:39:16 +00003500# checks for system services
3501# (none yet)
3502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003503# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003504echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003505echo "configure:3506: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003506ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003507if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003508 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003509else
3510 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003511LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003512cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003513#line 3514 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003514#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003515/* 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 __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003519
Guido van Rossumf78abae1997-01-21 22:02:36 +00003520int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003521__fpu_control()
3522; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003523EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003524if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003525 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003526 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003527else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003528 echo "configure: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003530 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003531 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003532fi
3533rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003534LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003536fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003537if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003538 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003539 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3540 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003541 cat >> confdefs.h <<EOF
3542#define $ac_tr_lib 1
3543EOF
3544
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003545 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003546
3547else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003548 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003549fi
3550
3551
Guido van Rossum7f253911997-05-09 02:42:48 +00003552# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00003553echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003554echo "configure:3555: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00003555# Check whether --with-fpectl or --without-fpectl was given.
3556if test "${with_fpectl+set}" = set; then
3557 withval="$with_fpectl"
3558
3559if test "$withval" != no
3560then cat >> confdefs.h <<\EOF
3561#define WANT_SIGFPE_HANDLER 1
3562EOF
3563 echo "$ac_t""yes" 1>&6
3564else echo "$ac_t""no" 1>&6
3565fi
3566fi
3567
3568
Guido van Rossum7f43da71994-08-01 12:15:30 +00003569# check for --with-libm=...
3570
Guido van Rossum563e7081996-09-10 18:20:48 +00003571case $ac_sys_system in
3572next) ;;
3573*) LIBM=-lm
3574esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003575echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003576echo "configure:3577: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003577# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003578if test "${with_libm+set}" = set; then
3579 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003580
Guido van Rossum7f253911997-05-09 02:42:48 +00003581if test "$withval" = no
3582then LIBM=
3583 echo "$ac_t""force LIBM empty" 1>&6
3584elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003585then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003586 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003587else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003588fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003589else
3590 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003591fi
3592
3593
3594# check for --with-libc=...
3595
Guido van Rossum7f253911997-05-09 02:42:48 +00003596echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003597echo "configure:3598: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003598# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003599if test "${with_libc+set}" = set; then
3600 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003601
Guido van Rossum7f253911997-05-09 02:42:48 +00003602if test "$withval" = no
3603then LIBC=
3604 echo "$ac_t""force LIBC empty" 1>&6
3605elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003606then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003607 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003608else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003609fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003610else
3611 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003612fi
3613
3614
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003615# check for hypot() in math library
3616LIBS_SAVE=$LIBS
3617LIBS="$LIBS $LIBM"
3618for ac_func in hypot
3619do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003620echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003621echo "configure:3622: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003622if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3623 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003624else
3625 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003626#line 3627 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003627#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003628/* System header to define __stub macros and hopefully few prototypes,
3629 which can conflict with char $ac_func(); below. */
3630#include <assert.h>
3631/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003632/* We use char because int might match the return type of a gcc2
3633 builtin and then its argument prototype would still apply. */
3634char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003635
Guido van Rossumf78abae1997-01-21 22:02:36 +00003636int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003637
3638/* The GNU C library defines this for functions which it implements
3639 to always fail with ENOSYS. Some functions are actually named
3640 something starting with __ and the normal name is an alias. */
3641#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3642choke me
3643#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003644$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003645#endif
3646
3647; return 0; }
3648EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003649if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003650 rm -rf conftest*
3651 eval "ac_cv_func_$ac_func=yes"
3652else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003653 echo "configure: failed program was:" >&5
3654 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003655 rm -rf conftest*
3656 eval "ac_cv_func_$ac_func=no"
3657fi
3658rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003659fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003660
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003661if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003662 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003663 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003664 cat >> confdefs.h <<EOF
3665#define $ac_tr_func 1
3666EOF
3667
3668else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003669 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003670fi
3671done
3672
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003673for ac_func in hypot
3674do
3675echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003676echo "configure:3677: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003677if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3678 echo $ac_n "(cached) $ac_c" 1>&6
3679else
3680 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003681#line 3682 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003682#include "confdefs.h"
3683/* System header to define __stub macros and hopefully few prototypes,
3684 which can conflict with char $ac_func(); below. */
3685#include <assert.h>
3686/* Override any gcc2 internal prototype to avoid an error. */
3687/* We use char because int might match the return type of a gcc2
3688 builtin and then its argument prototype would still apply. */
3689char $ac_func();
3690
Guido van Rossumf78abae1997-01-21 22:02:36 +00003691int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003692
3693/* The GNU C library defines this for functions which it implements
3694 to always fail with ENOSYS. Some functions are actually named
3695 something starting with __ and the normal name is an alias. */
3696#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3697choke me
3698#else
3699$ac_func();
3700#endif
3701
3702; return 0; }
3703EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003704if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003705 rm -rf conftest*
3706 eval "ac_cv_func_$ac_func=yes"
3707else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003708 echo "configure: failed program was:" >&5
3709 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003710 rm -rf conftest*
3711 eval "ac_cv_func_$ac_func=no"
3712fi
3713rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003714fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003715
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003716if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3717 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003718 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3719 cat >> confdefs.h <<EOF
3720#define $ac_tr_func 1
3721EOF
3722
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003723else
3724 echo "$ac_t""no" 1>&6
3725LIBOBJS="$LIBOBJS ${ac_func}.o"
3726fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003727done
3728
Guido van Rossumf78abae1997-01-21 22:02:36 +00003729
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003730LIBS=$LIBS_SAVE
3731
Guido van Rossumda88dad1995-01-26 00:46:29 +00003732# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003733echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003734echo "configure:3735: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003735if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3736 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003737else
3738 if test "$cross_compiling" = yes; then
3739 ac_cv_func_getopt=no
3740else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003741 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003742#line 3743 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003743#include "confdefs.h"
3744#include <stdio.h>
3745extern int optind, opterr, getopt();
3746extern char* optarg;
3747int main() {
3748 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3749 opterr = 0;
3750 if (getopt(3, av, "f:") == 'f') { exit(1); }
3751 exit(0);
3752}
3753EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003754if { (eval echo configure:3755: \"$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 +00003755then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003756 ac_cv_func_getopt=yes
3757else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003758 echo "configure: failed program was:" >&5
3759 cat conftest.$ac_ext >&5
3760 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00003761 ac_cv_func_getopt=no
3762fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003763rm -fr conftest*
3764fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003765
3766fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003767echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003768test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3769
Guido van Rossumad713701997-07-10 22:42:38 +00003770# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00003771echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003772echo "configure:3773: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00003773if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
3774 echo $ac_n "(cached) $ac_c" 1>&6
3775else
3776 if test "$cross_compiling" = yes; then
3777 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3778else
3779 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003780#line 3781 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00003781#include "confdefs.h"
3782#include <stdio.h>
3783#ifdef HAVE_STDLIB
3784#include <stdlib.h>
3785#else
3786char *malloc(), *realloc();
3787int *free();
3788#endif
3789main() {
3790 char *p;
3791 p = malloc(0);
3792 if (p == NULL) exit(1);
3793 p = realloc(p, 0);
3794 if (p == NULL) exit(1);
3795 free(p);
3796 exit(0);
3797}
3798EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003799if { (eval echo configure:3800: \"$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 +00003800then
3801 ac_cv_malloc_zero=nonnull
3802else
3803 echo "configure: failed program was:" >&5
3804 cat conftest.$ac_ext >&5
3805 rm -fr conftest*
3806 ac_cv_malloc_zero=null
3807fi
3808rm -fr conftest*
3809fi
3810
3811fi
3812
3813echo "$ac_t""$ac_cv_malloc_zero" 1>&6
3814if test "$ac_cv_malloc_zero" = null
3815then
3816 cat >> confdefs.h <<\EOF
3817#define MALLOC_ZERO_RETURNS_NULL 1
3818EOF
3819
3820fi
3821
Guido van Rossum627b2d71993-12-24 10:39:16 +00003822# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003823trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003824cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003825# This file is a shell script that caches the results of configure
3826# tests run on this system so they can be shared between configure
3827# scripts and configure runs. It is not useful on other systems.
3828# If it contains results you don't want to keep, you may remove or edit it.
3829#
3830# By default, configure uses ./config.cache as the cache file,
3831# creating it if it does not exist already. You can give configure
3832# the --cache-file=FILE option to use a different cache file; that is
3833# what configure does when it calls configure scripts in
3834# subdirectories, so they share the cache.
3835# Giving --cache-file=/dev/null disables caching, for debugging configure.
3836# config.status only pays attention to the cache file if you give it the
3837# --recheck option to rerun configure.
3838#
3839EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003840# The following way of writing the cache mishandles newlines in values,
3841# but we know of no workaround that is simple, portable, and efficient.
3842# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003843# Ultrix sh set writes to stderr and can't be redirected directly,
3844# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003845(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00003846 case `(ac_space=' '; set) 2>&1` in
3847 *ac_space=\ *)
3848 # `set' does not quote correctly, so add quotes (double-quote substitution
3849 # turns \\\\ into \\, and sed turns \\ into \).
3850 sed -n \
3851 -e "s/'/'\\\\''/g" \
3852 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3853 ;;
3854 *)
3855 # `set' quotes correctly as required by POSIX, so do not add quotes.
3856 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3857 ;;
3858 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003859if cmp -s $cache_file confcache; then
3860 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003862 if test -w $cache_file; then
3863 echo "updating cache $cache_file"
3864 cat confcache > $cache_file
3865 else
3866 echo "not updating unwritable cache $cache_file"
3867 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003869rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003870
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003871trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003872
3873test "x$prefix" = xNONE && prefix=$ac_default_prefix
3874# Let make expand exec_prefix.
3875test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003876
Guido van Rossum7f43da71994-08-01 12:15:30 +00003877# Any assignment to VPATH causes Sun make to only execute
3878# the first set of double-colon rules, so remove it if not needed.
3879# If there is a colon in the path, we need to keep it.
3880if test "x$srcdir" = x.; then
3881 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3882fi
3883
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003885
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003886DEFS=-DHAVE_CONFIG_H
3887
3888# Without the "./", some shells look in PATH for config.status.
3889: ${CONFIG_STATUS=./config.status}
3890
3891echo creating $CONFIG_STATUS
3892rm -f $CONFIG_STATUS
3893cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003894#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003895# Generated automatically by configure.
3896# Run this file to recreate the current configuration.
3897# This directory was configured as follows,
3898# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3899#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003900# $0 $ac_configure_args
3901#
3902# Compiler output produced by configure, useful for debugging
3903# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003904
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003905ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003906for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003907do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003908 case "\$ac_option" in
3909 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3911 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003912 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003913 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003914 exit 0 ;;
3915 -help | --help | --hel | --he | --h)
3916 echo "\$ac_cs_usage"; exit 0 ;;
3917 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003918 esac
3919done
3920
Guido van Rossum7f43da71994-08-01 12:15:30 +00003921ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003922
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003923trap 'rm -fr `echo "Makefile \
3924 Objects/Makefile \
3925 Parser/Makefile \
3926 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00003927 Modules/Makefile.pre \
3928 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003929EOF
3930cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003932# Protect against being on the right side of a sed subst in config.status.
3933sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3934 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003935$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003936$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003937s%@CFLAGS@%$CFLAGS%g
3938s%@CPPFLAGS@%$CPPFLAGS%g
3939s%@CXXFLAGS@%$CXXFLAGS%g
3940s%@DEFS@%$DEFS%g
3941s%@LDFLAGS@%$LDFLAGS%g
3942s%@LIBS@%$LIBS%g
3943s%@exec_prefix@%$exec_prefix%g
3944s%@prefix@%$prefix%g
3945s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003946s%@bindir@%$bindir%g
3947s%@sbindir@%$sbindir%g
3948s%@libexecdir@%$libexecdir%g
3949s%@datadir@%$datadir%g
3950s%@sysconfdir@%$sysconfdir%g
3951s%@sharedstatedir@%$sharedstatedir%g
3952s%@localstatedir@%$localstatedir%g
3953s%@libdir@%$libdir%g
3954s%@includedir@%$includedir%g
3955s%@oldincludedir@%$oldincludedir%g
3956s%@infodir@%$infodir%g
3957s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003958s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003959s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00003960s%@SGI_ABI@%$SGI_ABI%g
3961s%@SET_CCC@%$SET_CCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003962s%@CC@%$CC%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003963s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003964s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003965s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003966s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003967s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3968s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003969s%@REALLIBRARY@%$REALLIBRARY%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003970s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003971s%@CPP@%$CPP%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003972s%@DGUX_IS_BROKEN@%$DGUX_IS_BROKEN%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003973s%@SO@%$SO%g
3974s%@LDSHARED@%$LDSHARED%g
3975s%@CCSHARED@%$CCSHARED%g
3976s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00003977s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00003978s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003979s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003980s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003981s%@LIBM@%$LIBM%g
3982s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983
3984CEOF
3985EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003986
3987cat >> $CONFIG_STATUS <<\EOF
3988
3989# Split the substitutions into bite-sized pieces for seds with
3990# small command number limits, like on Digital OSF/1 and HP-UX.
3991ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3992ac_file=1 # Number of current file.
3993ac_beg=1 # First line for current file.
3994ac_end=$ac_max_sed_cmds # Line after last line for current file.
3995ac_more_lines=:
3996ac_sed_cmds=""
3997while $ac_more_lines; do
3998 if test $ac_beg -gt 1; then
3999 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4000 else
4001 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4002 fi
4003 if test ! -s conftest.s$ac_file; then
4004 ac_more_lines=false
4005 rm -f conftest.s$ac_file
4006 else
4007 if test -z "$ac_sed_cmds"; then
4008 ac_sed_cmds="sed -f conftest.s$ac_file"
4009 else
4010 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4011 fi
4012 ac_file=`expr $ac_file + 1`
4013 ac_beg=$ac_end
4014 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4015 fi
4016done
4017if test -z "$ac_sed_cmds"; then
4018 ac_sed_cmds=cat
4019fi
4020EOF
4021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004022cat >> $CONFIG_STATUS <<EOF
4023
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004024CONFIG_FILES=\${CONFIG_FILES-"Makefile \
4025 Objects/Makefile \
4026 Parser/Makefile \
4027 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004028 Modules/Makefile.pre \
4029 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030EOF
4031cat >> $CONFIG_STATUS <<\EOF
4032for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004033 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004034 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004035 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004036 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4037 *) ac_file_in="${ac_file}.in" ;;
4038 esac
4039
Guido van Rossumf78abae1997-01-21 22:02:36 +00004040 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004041
4042 # Remove last slash and all that follows it. Not all systems have dirname.
4043 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4044 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4045 # The file is in a subdirectory.
4046 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004047 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048 # A "../" for each directory in $ac_dir_suffix.
4049 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4050 else
4051 ac_dir_suffix= ac_dots=
4052 fi
4053
4054 case "$ac_given_srcdir" in
4055 .) srcdir=.
4056 if test -z "$ac_dots"; then top_srcdir=.
4057 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4058 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4059 *) # Relative path.
4060 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4061 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4062 esac
4063
Guido van Rossumf78abae1997-01-21 22:02:36 +00004064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065 echo creating "$ac_file"
4066 rm -f "$ac_file"
4067 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4068 case "$ac_file" in
4069 *Makefile*) ac_comsub="1i\\
4070# $configure_input" ;;
4071 *) ac_comsub= ;;
4072 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00004073
4074 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 +00004075 sed -e "$ac_comsub
4076s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004077s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004078s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00004079" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00004080fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00004081rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4084# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004085#
4086# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4088ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004089ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004091# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004092ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4093ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004094ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004095ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004096# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004097ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4098ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004099ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004101
Guido van Rossumf78abae1997-01-21 22:02:36 +00004102if test "${CONFIG_HEADERS+set}" != set; then
4103EOF
4104cat >> $CONFIG_STATUS <<EOF
4105 CONFIG_HEADERS="config.h"
4106EOF
4107cat >> $CONFIG_STATUS <<\EOF
4108fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004109for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004110 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004111 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004112 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004113 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4114 *) ac_file_in="${ac_file}.in" ;;
4115 esac
4116
Guido van Rossum7f43da71994-08-01 12:15:30 +00004117 echo creating $ac_file
4118
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004119 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00004120 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4121 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122
4123EOF
4124
4125# Transform confdefs.h into a sed script conftest.vals that substitutes
4126# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004127# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004128# Protect against being in an unquoted here document in config.status.
4129rm -f conftest.vals
4130cat > conftest.hdr <<\EOF
4131s/[\\&%]/\\&/g
4132s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004133s%#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 +00004134s%ac_d%ac_u%gp
4135s%ac_u%ac_e%gp
4136EOF
4137sed -n -f conftest.hdr confdefs.h > conftest.vals
4138rm -f conftest.hdr
4139
4140# This sed command replaces #undef with comments. This is necessary, for
4141# example, in the case of _POSIX_SOURCE, which is predefined and required
4142# on some systems where configure will not decide to define it.
4143cat >> conftest.vals <<\EOF
4144s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4145EOF
4146
4147# Break up conftest.vals because some shells have a limit on
4148# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149
4150rm -f conftest.tail
4151while :
4152do
4153 ac_lines=`grep -c . conftest.vals`
4154 # grep -c gives empty output for an empty file on some AIX systems.
4155 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4156 # Write a limited-size here document to conftest.frag.
4157 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4158 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4159 echo 'CEOF
4160 sed -f conftest.frag conftest.in > conftest.out
4161 rm -f conftest.in
4162 mv conftest.out conftest.in
4163' >> $CONFIG_STATUS
4164 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4165 rm -f conftest.vals
4166 mv conftest.tail conftest.vals
4167done
4168rm -f conftest.vals
4169
4170cat >> $CONFIG_STATUS <<\EOF
4171 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00004172 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004173 cat conftest.in >> conftest.h
4174 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00004175 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004176 echo "$ac_file is unchanged"
4177 rm -f conftest.h
4178 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004179 # Remove last slash and all that follows it. Not all systems have dirname.
4180 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4181 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4182 # The file is in a subdirectory.
4183 test ! -d "$ac_dir" && mkdir "$ac_dir"
4184 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004185 rm -f $ac_file
4186 mv conftest.h $ac_file
4187 fi
4188fi; done
4189
Guido van Rossumf78abae1997-01-21 22:02:36 +00004190EOF
4191cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004192
Guido van Rossumf78abae1997-01-21 22:02:36 +00004193EOF
4194cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004195
4196exit 0
4197EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198chmod +x $CONFIG_STATUS
4199rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004200test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201