blob: 08f3d67a8ec737c89266783b2d63f895e628cc81 [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 Rossum08d6be41998-06-11 15:19:05 +00003# From configure.in Revision: 1.87
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 Rossum1f740161998-04-13 15:27:21 +00001846 FreeBSD*|NetBSD*|OpenBSD*) 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 Rossum1f740161998-04-13 15:27:21 +00001864 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001865 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001866 IRIX*/6*) case $CC in
1867 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00001868 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001869 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001870 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001871fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001872echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001873# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001874# the python executable -- this is only needed for a few systems
1875echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001876echo "configure:1877: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001877if test -z "$LINKFORSHARED"
1878then
Guido van Rossum07397971997-04-29 21:49:50 +00001879 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00001880 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001881 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001882 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00001883 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum749af7c1997-08-16 14:35:52 +00001884 next/*) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001885 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001886 SunOS/5*) case $CC in
1887 *gcc*)
1888 if $CC -Xlinker -V 2>/dev/null | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00001889 then
1890 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001891 fi;;
1892 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001893 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001894fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001895echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001896
Guido van Rossum627b2d71993-12-24 10:39:16 +00001897# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00001898echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum56896dd1998-03-05 16:59:36 +00001899echo "configure:1900: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001900ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001901if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001902 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001903else
1904 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001905LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001906cat > conftest.$ac_ext <<EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00001907#line 1908 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001908#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001909/* Override any gcc2 internal prototype to avoid an error. */
1910/* We use char because int might match the return type of a gcc2
1911 builtin and then its argument prototype would still apply. */
1912char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001913
Guido van Rossumf78abae1997-01-21 22:02:36 +00001914int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001915dlopen()
1916; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001917EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00001918if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001919 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001920 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001921else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001922 echo "configure: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001925 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001926fi
1927rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001929
Guido van Rossum627b2d71993-12-24 10:39:16 +00001930fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001931if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001932 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001933 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1934 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001935 cat >> confdefs.h <<EOF
1936#define $ac_tr_lib 1
1937EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001938
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001939 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001940
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001941else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001942 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001943fi
1944 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00001945echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum56896dd1998-03-05 16:59:36 +00001946echo "configure:1947: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001947ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001948if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001949 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001950else
1951 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001952LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001953cat > conftest.$ac_ext <<EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00001954#line 1955 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001955#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001956/* Override any gcc2 internal prototype to avoid an error. */
1957/* We use char because int might match the return type of a gcc2
1958 builtin and then its argument prototype would still apply. */
1959char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001960
Guido van Rossumf78abae1997-01-21 22:02:36 +00001961int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001962shl_load()
1963; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001964EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00001965if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001966 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001967 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001968else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001969 echo "configure: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001972 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001973fi
1974rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001975LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001976
Guido van Rossum627b2d71993-12-24 10:39:16 +00001977fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001978if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001979 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001980 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1981 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001982 cat >> confdefs.h <<EOF
1983#define $ac_tr_lib 1
1984EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001985
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001986 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001987
1988else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001989 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001990fi
1991 # Dynamic linking for HP-UX
Guido van Rossumb93a8621998-05-07 13:27:32 +00001992echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
1993echo "configure:1994: checking for pow in -lm" >&5
1994ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001995if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001996 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997else
1998 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00001999LIBS="-lm $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000cat > conftest.$ac_ext <<EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00002001#line 2002 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002002#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002003/* Override any gcc2 internal prototype to avoid an error. */
2004/* We use char because int might match the return type of a gcc2
2005 builtin and then its argument prototype would still apply. */
Guido van Rossumb93a8621998-05-07 13:27:32 +00002006char pow();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002007
Guido van Rossumf78abae1997-01-21 22:02:36 +00002008int main() {
Guido van Rossumb93a8621998-05-07 13:27:32 +00002009pow()
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002010; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002011EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00002012if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002013 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002014 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002015else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002016 echo "configure: failed program was:" >&5
2017 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002018 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002019 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002020fi
2021rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002022LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002023
Guido van Rossum7f43da71994-08-01 12:15:30 +00002024fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002025if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002026 echo "$ac_t""yes" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002027 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
Guido van Rossumf78abae1997-01-21 22:02:36 +00002028 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002029 cat >> confdefs.h <<EOF
2030#define $ac_tr_lib 1
2031EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002032
Guido van Rossumb93a8621998-05-07 13:27:32 +00002033 LIBS="-lm $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034
2035else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002036 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002037fi
Guido van Rossumb93a8621998-05-07 13:27:32 +00002038 # Std math lib -- assume needed if it exists
Guido van Rossum70c7f481998-03-26 18:44:10 +00002039# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2040# However on SGI IRIX, these exist but are broken.
Guido van Rossumb93a8621998-05-07 13:27:32 +00002041case "$ac_sys_system" in IRIX*) ;;
2042*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002043echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002044echo "configure:2045: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002045ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002046if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002047 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002048else
2049 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002050LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002051cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002052#line 2053 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002053#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002054/* Override any gcc2 internal prototype to avoid an error. */
2055/* We use char because int might match the return type of a gcc2
2056 builtin and then its argument prototype would still apply. */
2057char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002058
Guido van Rossumf78abae1997-01-21 22:02:36 +00002059int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002060t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002061; return 0; }
2062EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002063if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002064 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002065 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002066else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002067 echo "configure: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002069 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002071fi
2072rm -f conftest*
2073LIBS="$ac_save_LIBS"
2074
2075fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002076if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002077 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002078 LIBS="-lnsl $LIBS"
2079else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002080 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002081fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002082 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002083echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002084echo "configure:2085: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002085ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002086if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002087 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002088else
2089 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002090LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002092#line 2093 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002093#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002094/* Override any gcc2 internal prototype to avoid an error. */
2095/* We use char because int might match the return type of a gcc2
2096 builtin and then its argument prototype would still apply. */
2097char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002098
Guido van Rossumf78abae1997-01-21 22:02:36 +00002099int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002100socket()
2101; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002102EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002103if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002104 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002105 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002106else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002107 echo "configure: failed program was:" >&5
2108 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002109 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002110 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002111fi
2112rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002113LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002114
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002115fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002116if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002117 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002118 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002119else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002120 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002121fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002122 # SVR4 sockets
Guido van Rossumb93a8621998-05-07 13:27:32 +00002123;; esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002124
Guido van Rossuma68acba1996-07-31 17:36:39 +00002125echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002126echo "configure:2127: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002127# Check whether --with-libs or --without-libs was given.
2128if test "${with_libs+set}" = set; then
2129 withval="$with_libs"
2130
2131echo "$ac_t""$withval" 1>&6
2132LIBS="$withval $LIBS"
2133
2134else
2135 echo "$ac_t""no" 1>&6
2136fi
2137
Guido van Rossum7f43da71994-08-01 12:15:30 +00002138
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002139echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002140echo "configure:2141: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002141# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002142if test "${with_readline+set}" = set; then
2143 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002144 echo "$ac_t""$withval" 1>&6
2145{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002146else
Guido van Rossumb06df271997-08-05 21:50:20 +00002147 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002148fi
2149
Guido van Rossum7f43da71994-08-01 12:15:30 +00002150
Guido van Rossum009f7871997-12-04 00:51:42 +00002151
2152USE_THREAD_MODULE="#"
2153
Guido van Rossumec2f0731997-01-22 20:54:01 +00002154echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002155echo "configure:2156: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002156
2157# Check whether --with-dec-threads or --without-dec-threads was given.
2158if test "${with_dec_threads+set}" = set; then
2159 withval="$with_dec_threads"
2160 echo "$ac_t""$withval" 1>&6
2161LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002162if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002163 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002164fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002165else
2166 echo "$ac_t""no" 1>&6
2167fi
2168
2169
2170echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002171echo "configure:2172: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002172# Check whether --with-threads or --without-threads was given.
2173if test "${with_threads+set}" = set; then
2174 withval="$with_threads"
2175 echo "$ac_t""$withval" 1>&6
2176if test "${with_thread+set}" != set; then
2177 with_thread="$withval";
2178fi
2179else
2180 echo "$ac_t""no" 1>&6
2181fi
2182
2183
2184echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002185echo "configure:2186: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002186# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002187if test "${with_thread+set}" = set; then
2188 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002189
Guido van Rossum009f7871997-12-04 00:51:42 +00002190USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002191echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002192if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002193then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002194fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002195cat >> confdefs.h <<\EOF
2196#define _REENTRANT 1
2197EOF
2198
Guido van Rossumf78abae1997-01-21 22:02:36 +00002199ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002200echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002201echo "configure:2202: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002202if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2203 echo $ac_n "(cached) $ac_c" 1>&6
2204else
2205 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002206#line 2207 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002207#include "confdefs.h"
2208#include <mach/cthreads.h>
2209EOF
2210ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum70c7f481998-03-26 18:44:10 +00002211{ (eval echo configure:2212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002212ac_err=`grep -v '^ *+' conftest.out`
2213if test -z "$ac_err"; then
2214 rm -rf conftest*
2215 eval "ac_cv_header_$ac_safe=yes"
2216else
2217 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002218 echo "configure: failed program was:" >&5
2219 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002220 rm -rf conftest*
2221 eval "ac_cv_header_$ac_safe=no"
2222fi
2223rm -f conftest*
2224fi
2225if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2226 echo "$ac_t""yes" 1>&6
2227 cat >> confdefs.h <<\EOF
2228#define WITH_THREAD 1
2229EOF
2230
2231cat >> confdefs.h <<\EOF
2232#define C_THREADS 1
2233EOF
2234
2235LIBOBJS="$LIBOBJS thread.o"
2236else
2237 echo "$ac_t""no" 1>&6
2238
Guido van Rossumf78abae1997-01-21 22:02:36 +00002239echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002240echo "configure:2241: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002241ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002243 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002244else
2245 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002246LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002248#line 2249 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002249#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002250/* Override any gcc2 internal prototype to avoid an error. */
2251/* We use char because int might match the return type of a gcc2
2252 builtin and then its argument prototype would still apply. */
2253char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002254
Guido van Rossumf78abae1997-01-21 22:02:36 +00002255int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002256pthread_create()
2257; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002258EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002259if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002260 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002261 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002262else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002265 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002266 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267fi
2268rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002269LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002271fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002272if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002273 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002274 cat >> confdefs.h <<\EOF
2275#define WITH_THREAD 1
2276EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002277
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002278cat >> confdefs.h <<\EOF
2279#define _POSIX_THREADS 1
2280EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002281
2282LIBS="$LIBS -lpthreads"
2283LIBOBJS="$LIBOBJS thread.o"
2284else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002285 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002286
Guido van Rossumf78abae1997-01-21 22:02:36 +00002287echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002288echo "configure:2289: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002289ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002290if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2291 echo $ac_n "(cached) $ac_c" 1>&6
2292else
2293 ac_save_LIBS="$LIBS"
2294LIBS="-lpthread $LIBS"
2295cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002296#line 2297 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002297#include "confdefs.h"
2298/* Override any gcc2 internal prototype to avoid an error. */
2299/* We use char because int might match the return type of a gcc2
2300 builtin and then its argument prototype would still apply. */
2301char pthread_create();
2302
Guido van Rossumf78abae1997-01-21 22:02:36 +00002303int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002304pthread_create()
2305; return 0; }
2306EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002307if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002308 rm -rf conftest*
2309 eval "ac_cv_lib_$ac_lib_var=yes"
2310else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002311 echo "configure: failed program was:" >&5
2312 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002313 rm -rf conftest*
2314 eval "ac_cv_lib_$ac_lib_var=no"
2315fi
2316rm -f conftest*
2317LIBS="$ac_save_LIBS"
2318
2319fi
2320if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2321 echo "$ac_t""yes" 1>&6
2322 cat >> confdefs.h <<\EOF
2323#define WITH_THREAD 1
2324EOF
2325
2326cat >> confdefs.h <<\EOF
2327#define _POSIX_THREADS 1
2328EOF
2329
2330LIBS="$LIBS -lpthread"
2331LIBOBJS="$LIBOBJS thread.o"
2332else
2333 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002334
Guido van Rossum49545951997-12-02 19:28:29 +00002335echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002336echo "configure:2337: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00002337ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2338if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2339 echo $ac_n "(cached) $ac_c" 1>&6
2340else
2341 ac_save_LIBS="$LIBS"
2342LIBS="-lc_r $LIBS"
2343cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002344#line 2345 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00002345#include "confdefs.h"
2346/* Override any gcc2 internal prototype to avoid an error. */
2347/* We use char because int might match the return type of a gcc2
2348 builtin and then its argument prototype would still apply. */
2349char pthread_create();
2350
2351int main() {
2352pthread_create()
2353; return 0; }
2354EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum49545951997-12-02 19:28:29 +00002356 rm -rf conftest*
2357 eval "ac_cv_lib_$ac_lib_var=yes"
2358else
2359 echo "configure: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 rm -rf conftest*
2362 eval "ac_cv_lib_$ac_lib_var=no"
2363fi
2364rm -f conftest*
2365LIBS="$ac_save_LIBS"
2366
2367fi
2368if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2369 echo "$ac_t""yes" 1>&6
2370 cat >> confdefs.h <<\EOF
2371#define WITH_THREAD 1
2372EOF
2373
2374cat >> confdefs.h <<\EOF
2375#define _POSIX_THREADS 1
2376EOF
2377
2378LIBS="$LIBS -lc_r"
2379LIBOBJS="$LIBOBJS thread.o"
2380else
2381 echo "$ac_t""no" 1>&6
2382
Guido van Rossum0be3e491997-05-22 20:33:33 +00002383echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002384echo "configure:2385: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002385ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2386if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2387 echo $ac_n "(cached) $ac_c" 1>&6
2388else
2389 ac_save_LIBS="$LIBS"
2390LIBS="-lthread $LIBS"
2391cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002392#line 2393 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002393#include "confdefs.h"
2394/* Override any gcc2 internal prototype to avoid an error. */
2395/* We use char because int might match the return type of a gcc2
2396 builtin and then its argument prototype would still apply. */
2397char __d6_pthread_create();
2398
2399int main() {
2400__d6_pthread_create()
2401; return 0; }
2402EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002403if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002404 rm -rf conftest*
2405 eval "ac_cv_lib_$ac_lib_var=yes"
2406else
2407 echo "configure: failed program was:" >&5
2408 cat conftest.$ac_ext >&5
2409 rm -rf conftest*
2410 eval "ac_cv_lib_$ac_lib_var=no"
2411fi
2412rm -f conftest*
2413LIBS="$ac_save_LIBS"
2414
2415fi
2416if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2417 echo "$ac_t""yes" 1>&6
2418 cat >> confdefs.h <<\EOF
2419#define WITH_THREAD 1
2420EOF
2421
2422cat >> confdefs.h <<\EOF
2423#define _POSIX_THREADS 1
2424EOF
2425
2426LIBS="$LIBS -lthread"
2427LIBOBJS="$LIBOBJS thread.o"
2428else
2429 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002430
2431echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
2432echo "configure:2433: checking for pthread_create in -lcma" >&5
2433ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
2434if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2435 echo $ac_n "(cached) $ac_c" 1>&6
2436else
2437 ac_save_LIBS="$LIBS"
2438LIBS="-lcma $LIBS"
2439cat > conftest.$ac_ext <<EOF
2440#line 2441 "configure"
2441#include "confdefs.h"
2442/* Override any gcc2 internal prototype to avoid an error. */
2443/* We use char because int might match the return type of a gcc2
2444 builtin and then its argument prototype would still apply. */
2445char pthread_create();
2446
2447int main() {
2448pthread_create()
2449; return 0; }
2450EOF
2451if { (eval echo configure:2452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2452 rm -rf conftest*
2453 eval "ac_cv_lib_$ac_lib_var=yes"
2454else
2455 echo "configure: failed program was:" >&5
2456 cat conftest.$ac_ext >&5
2457 rm -rf conftest*
2458 eval "ac_cv_lib_$ac_lib_var=no"
2459fi
2460rm -f conftest*
2461LIBS="$ac_save_LIBS"
2462
2463fi
2464if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2465 echo "$ac_t""yes" 1>&6
2466 cat >> confdefs.h <<\EOF
2467#define WITH_THREAD 1
2468EOF
2469
2470cat >> confdefs.h <<\EOF
2471#define _POSIX_THREADS 1
2472EOF
2473
2474LIBS="$LIBS -lcma"
2475LIBOBJS="$LIBOBJS thread.o"
2476else
2477 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002478fi
2479
2480
Guido van Rossum627b2d71993-12-24 10:39:16 +00002481fi
2482
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002483fi
2484
Guido van Rossum0be3e491997-05-22 20:33:33 +00002485fi
2486
Guido van Rossum49545951997-12-02 19:28:29 +00002487fi
2488
Guido van Rossumb93a8621998-05-07 13:27:32 +00002489fi
2490
Guido van Rossum0be3e491997-05-22 20:33:33 +00002491
Guido van Rossumf78abae1997-01-21 22:02:36 +00002492echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002493echo "configure:2494: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002494ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002495if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002496 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002497else
2498 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002499LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002500cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002501#line 2502 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002502#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002503/* Override any gcc2 internal prototype to avoid an error. */
2504/* We use char because int might match the return type of a gcc2
2505 builtin and then its argument prototype would still apply. */
2506char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002507
Guido van Rossumf78abae1997-01-21 22:02:36 +00002508int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002509usconfig()
2510; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002511EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002512if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002513 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002514 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002515else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002516 echo "configure: failed program was:" >&5
2517 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002518 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002519 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002520fi
2521rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002522LIBS="$ac_save_LIBS"
2523
2524fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002525if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002526 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002527 cat >> confdefs.h <<\EOF
2528#define WITH_THREAD 1
2529EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002530
Guido van Rossum7f43da71994-08-01 12:15:30 +00002531LIBS="$LIBS -lmpc"
2532LIBOBJS="$LIBOBJS thread.o"
2533else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002534 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002535fi
2536
Guido van Rossumf78abae1997-01-21 22:02:36 +00002537echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002538echo "configure:2539: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002539ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002540if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002541 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002542else
2543 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002544LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002545cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002546#line 2547 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002547#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002548/* Override any gcc2 internal prototype to avoid an error. */
2549/* We use char because int might match the return type of a gcc2
2550 builtin and then its argument prototype would still apply. */
2551char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002552
Guido van Rossumf78abae1997-01-21 22:02:36 +00002553int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002554thr_create()
2555; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002556EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002557if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002558 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002559 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002560else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002561 echo "configure: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002563 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002564 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002565fi
2566rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002567LIBS="$ac_save_LIBS"
2568
2569fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002570if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002571 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002572 cat >> confdefs.h <<\EOF
2573#define WITH_THREAD 1
2574EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002575
Guido van Rossum7f43da71994-08-01 12:15:30 +00002576LIBS="$LIBS -lthread"
2577LIBOBJS="$LIBOBJS thread.o"
2578else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002579 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002580fi
2581
Guido van Rossum7f43da71994-08-01 12:15:30 +00002582
Guido van Rossumda88dad1995-01-26 00:46:29 +00002583else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002584 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002585fi
2586
Guido van Rossum7f43da71994-08-01 12:15:30 +00002587
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002588# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002589
2590DLINCLDIR=/
2591
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002592echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002593echo "configure:2594: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002594# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002595if test "${with_sgi_dl+set}" = set; then
2596 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002597
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002598echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599cat >> confdefs.h <<\EOF
2600#define WITH_SGI_DL 1
2601EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002602
2603dldir=$withval
2604if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002605then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002607fi
2608DLINCLDIR=${dldir}
2609LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002610else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002611 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002612fi
2613
2614
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002615echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002616echo "configure:2617: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002618if test "${with_dl_dld+set}" = set; then
2619 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002620
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002621echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622cat >> confdefs.h <<\EOF
2623#define WITH_DL_DLD 1
2624EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002625
2626dldir=`echo "$withval" | sed 's/,.*//'`
2627dlddir=`echo "$withval" | sed 's/.*,//'`
2628if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002629then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002631fi
2632DLINCLDIR=${dldir}
2633LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002634else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002635 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002636fi
2637
2638
Guido van Rossum627b2d71993-12-24 10:39:16 +00002639# checks for library functions
Guido van Rossum1171ee61997-08-22 20:42:00 +00002640for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \
2641 gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
Guido van Rossum18099751998-03-06 17:14:34 +00002642 kill link lstat mkfifo mktime nice pause plock putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00002643 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002644 sigaction siginterrupt sigrelse strftime strptime symlink \
Guido van Rossum08d6be41998-06-11 15:19:05 +00002645 tcgetpgrp tcsetpgrp timegm times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002646do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002647echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002648echo "configure:2649: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002649if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2650 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651else
2652 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002653#line 2654 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002654#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002655/* System header to define __stub macros and hopefully few prototypes,
2656 which can conflict with char $ac_func(); below. */
2657#include <assert.h>
2658/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002659/* We use char because int might match the return type of a gcc2
2660 builtin and then its argument prototype would still apply. */
2661char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002662
Guido van Rossumf78abae1997-01-21 22:02:36 +00002663int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002664
Guido van Rossum627b2d71993-12-24 10:39:16 +00002665/* The GNU C library defines this for functions which it implements
2666 to always fail with ENOSYS. Some functions are actually named
2667 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002669choke me
2670#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002671$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002672#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002675EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002676if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002677 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678 eval "ac_cv_func_$ac_func=yes"
2679else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002680 echo "configure: failed program was:" >&5
2681 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682 rm -rf conftest*
2683 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002684fi
2685rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002687
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002689 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002690 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691 cat >> confdefs.h <<EOF
2692#define $ac_tr_func 1
2693EOF
2694
2695else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002696 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002698done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002699
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002700for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002702echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002703echo "configure:2704: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002704if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2705 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002706else
2707 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002708#line 2709 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002709#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002710/* System header to define __stub macros and hopefully few prototypes,
2711 which can conflict with char $ac_func(); below. */
2712#include <assert.h>
2713/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002714/* We use char because int might match the return type of a gcc2
2715 builtin and then its argument prototype would still apply. */
2716char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002717
Guido van Rossumf78abae1997-01-21 22:02:36 +00002718int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002719
Guido van Rossum627b2d71993-12-24 10:39:16 +00002720/* The GNU C library defines this for functions which it implements
2721 to always fail with ENOSYS. Some functions are actually named
2722 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002724choke me
2725#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002726$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002727#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002728
Guido van Rossum7f43da71994-08-01 12:15:30 +00002729; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002730EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002731if { (eval echo configure:2732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002732 rm -rf conftest*
2733 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002734else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002735 echo "configure: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002737 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002738 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002739fi
2740rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002742
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002744 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002745 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2746 cat >> confdefs.h <<EOF
2747#define $ac_tr_func 1
2748EOF
2749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002751 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002752LIBOBJS="$LIBOBJS ${ac_func}.o"
2753fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002754done
2755
Guido van Rossumf78abae1997-01-21 22:02:36 +00002756
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002757echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002758echo "configure:2759: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002759if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2760 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002761else
2762 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002763#line 2764 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002764#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002765/* System header to define __stub macros and hopefully few prototypes,
2766 which can conflict with char getpgrp(); below. */
2767#include <assert.h>
2768/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002769/* We use char because int might match the return type of a gcc2
2770 builtin and then its argument prototype would still apply. */
2771char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002772
Guido van Rossumf78abae1997-01-21 22:02:36 +00002773int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774
Guido van Rossum627b2d71993-12-24 10:39:16 +00002775/* The GNU C library defines this for functions which it implements
2776 to always fail with ENOSYS. Some functions are actually named
2777 something starting with __ and the normal name is an alias. */
2778#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2779choke me
2780#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002781getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783
2784; return 0; }
2785EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002786if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787 rm -rf conftest*
2788 eval "ac_cv_func_getpgrp=yes"
2789else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002790 echo "configure: failed program was:" >&5
2791 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792 rm -rf conftest*
2793 eval "ac_cv_func_getpgrp=no"
2794fi
2795rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002798if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002799 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002800 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002801#line 2802 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002802#include "confdefs.h"
2803#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002804int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002806; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002808if { (eval echo configure:2809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002809 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002810 cat >> confdefs.h <<\EOF
2811#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002812EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002813
Guido van Rossumf78abae1997-01-21 22:02:36 +00002814else
2815 echo "configure: failed program was:" >&5
2816 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002817fi
2818rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002820 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002821fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002823echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002824echo "configure:2825: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002825if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2826 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002827else
2828 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002829#line 2830 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002830#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002831/* System header to define __stub macros and hopefully few prototypes,
2832 which can conflict with char setpgrp(); below. */
2833#include <assert.h>
2834/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002835/* We use char because int might match the return type of a gcc2
2836 builtin and then its argument prototype would still apply. */
2837char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002838
Guido van Rossumf78abae1997-01-21 22:02:36 +00002839int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002841/* The GNU C library defines this for functions which it implements
2842 to always fail with ENOSYS. Some functions are actually named
2843 something starting with __ and the normal name is an alias. */
2844#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2845choke me
2846#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002847setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002848#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002849
2850; return 0; }
2851EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002852if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002853 rm -rf conftest*
2854 eval "ac_cv_func_setpgrp=yes"
2855else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002856 echo "configure: failed program was:" >&5
2857 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002858 rm -rf conftest*
2859 eval "ac_cv_func_setpgrp=no"
2860fi
2861rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002864if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002865 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002866 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002867#line 2868 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002868#include "confdefs.h"
2869#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002870int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002871setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002872; return 0; }
2873EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002874if { (eval echo configure:2875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002875 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002876 cat >> confdefs.h <<\EOF
2877#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002878EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002879
Guido van Rossumf78abae1997-01-21 22:02:36 +00002880else
2881 echo "configure: failed program was:" >&5
2882 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002883fi
2884rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002885else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002886 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002887fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002888
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002889echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002890echo "configure:2891: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002891if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2892 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002893else
2894 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002895#line 2896 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002896#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002897/* System header to define __stub macros and hopefully few prototypes,
2898 which can conflict with char gettimeofday(); below. */
2899#include <assert.h>
2900/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002901/* We use char because int might match the return type of a gcc2
2902 builtin and then its argument prototype would still apply. */
2903char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002904
Guido van Rossumf78abae1997-01-21 22:02:36 +00002905int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002906
2907/* The GNU C library defines this for functions which it implements
2908 to always fail with ENOSYS. Some functions are actually named
2909 something starting with __ and the normal name is an alias. */
2910#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2911choke me
2912#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002913gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002914#endif
2915
2916; return 0; }
2917EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002918if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002919 rm -rf conftest*
2920 eval "ac_cv_func_gettimeofday=yes"
2921else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002922 echo "configure: failed program was:" >&5
2923 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002924 rm -rf conftest*
2925 eval "ac_cv_func_gettimeofday=no"
2926fi
2927rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002928fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002929
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002930if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002931 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002932 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002933#line 2934 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002934#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002935#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002936int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002937gettimeofday((struct timeval*)0,(struct timezone*)0);
2938; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002939EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002940if { (eval echo configure:2941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002941 :
2942else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002943 echo "configure: failed program was:" >&5
2944 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002945 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002946 cat >> confdefs.h <<\EOF
2947#define GETTIMEOFDAY_NO_TZ 1
2948EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002949
2950fi
2951rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002952else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002953 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954fi
2955
2956
2957# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002958echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002959echo "configure:2960: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002960if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2961 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002962else
2963 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002964#line 2965 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002965#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002966#include <sys/types.h>
2967#include <sys/time.h>
2968#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002969int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002970struct tm *tp;
2971; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002972EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002973if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002974 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002975 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002976else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002977 echo "configure: failed program was:" >&5
2978 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002979 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002980 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002981fi
2982rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002983fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002984
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002985echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002986if test $ac_cv_header_time = yes; then
2987 cat >> confdefs.h <<\EOF
2988#define TIME_WITH_SYS_TIME 1
2989EOF
2990
2991fi
2992
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002993echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002994echo "configure:2995: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002995if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2996 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002997else
2998 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00002999#line 3000 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003000#include "confdefs.h"
3001#include <sys/types.h>
3002#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003003int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003004struct tm *tp; tp->tm_sec;
3005; return 0; }
3006EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003007if { (eval echo configure:3008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003008 rm -rf conftest*
3009 ac_cv_struct_tm=time.h
3010else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003011 echo "configure: failed program was:" >&5
3012 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003013 rm -rf conftest*
3014 ac_cv_struct_tm=sys/time.h
3015fi
3016rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003017fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003018
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003019echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020if test $ac_cv_struct_tm = sys/time.h; then
3021 cat >> confdefs.h <<\EOF
3022#define TM_IN_SYS_TIME 1
3023EOF
3024
3025fi
3026
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003027echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003028echo "configure:3029: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003029if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3030 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003031else
3032 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003033#line 3034 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003034#include "confdefs.h"
3035#include <sys/types.h>
3036#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003037int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003038struct tm tm; tm.tm_zone;
3039; return 0; }
3040EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003041if { (eval echo configure:3042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003042 rm -rf conftest*
3043 ac_cv_struct_tm_zone=yes
3044else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003045 echo "configure: failed program was:" >&5
3046 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003047 rm -rf conftest*
3048 ac_cv_struct_tm_zone=no
3049fi
3050rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003051fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003052
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003053echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003054if test "$ac_cv_struct_tm_zone" = yes; then
3055 cat >> confdefs.h <<\EOF
3056#define HAVE_TM_ZONE 1
3057EOF
3058
3059else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003060 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003061echo "configure:3062: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003062if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3063 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064else
3065 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003066#line 3067 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003067#include "confdefs.h"
3068#include <time.h>
3069#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003070extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003071#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003072int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003073atoi(*tzname);
3074; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003075EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003076if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003077 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003078 ac_cv_var_tzname=yes
3079else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003080 echo "configure: failed program was:" >&5
3081 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003082 rm -rf conftest*
3083 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003084fi
3085rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003086fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003087
3088echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003089 if test $ac_cv_var_tzname = yes; then
3090 cat >> confdefs.h <<\EOF
3091#define HAVE_TZNAME 1
3092EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003094 fi
3095fi
3096
3097
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003098echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003099echo "configure:3100: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003100if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3101 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003102else
3103 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003104#line 3105 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003105#include "confdefs.h"
3106#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003107int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003108return altzone;
3109; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003110EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003111if { (eval echo configure:3112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003112 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003113 ac_cv_header_time_altzone=yes
3114else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003115 echo "configure: failed program was:" >&5
3116 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003117 rm -rf conftest*
3118 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003119fi
3120rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003121fi
3122
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003123echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003124if test $ac_cv_header_time_altzone = yes; then
3125 cat >> confdefs.h <<\EOF
3126#define HAVE_ALTZONE 1
3127EOF
3128
3129fi
3130
Guido van Rossumda88dad1995-01-26 00:46:29 +00003131was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003132echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003133echo "configure:3134: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003134cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003135#line 3136 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003136#include "confdefs.h"
3137
3138#include <sys/types.h>
3139#include <sys/select.h>
3140#include <sys/time.h>
3141
Guido van Rossumf78abae1997-01-21 22:02:36 +00003142int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003143;
3144; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003145EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003146if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003147 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148 cat >> confdefs.h <<\EOF
3149#define SYS_SELECT_WITH_SYS_TIME 1
3150EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003151 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003152else
3153 echo "configure: failed program was:" >&5
3154 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003155fi
3156rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003157echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003158
3159# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003160
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003161echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003162echo "configure:3163: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003163if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3164 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003165else
3166 if test "$GCC" = yes; then
3167 # GCC predefines this symbol on systems where it applies.
3168cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003169#line 3170 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003170#include "confdefs.h"
3171#ifdef __CHAR_UNSIGNED__
3172 yes
3173#endif
3174
3175EOF
3176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3177 egrep "yes" >/dev/null 2>&1; then
3178 rm -rf conftest*
3179 ac_cv_c_char_unsigned=yes
3180else
3181 rm -rf conftest*
3182 ac_cv_c_char_unsigned=no
3183fi
3184rm -f conftest*
3185
3186else
3187if test "$cross_compiling" = yes; then
3188 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3189else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003190 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003191#line 3192 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003192#include "confdefs.h"
3193/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003195#define volatile
3196#endif
3197main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003198 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003199}
3200EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003201if { (eval echo configure:3202: \"$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 +00003202then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003203 ac_cv_c_char_unsigned=yes
3204else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003205 echo "configure: failed program was:" >&5
3206 cat conftest.$ac_ext >&5
3207 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208 ac_cv_c_char_unsigned=no
3209fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003210rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003211fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003212
3213fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003214fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003216echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003217if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3218 cat >> confdefs.h <<\EOF
3219#define __CHAR_UNSIGNED__ 1
3220EOF
3221
3222fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003223
3224
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003225echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003226echo "configure:3227: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003227if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3228 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003229else
3230 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003231#line 3232 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003232#include "confdefs.h"
3233
Guido van Rossumf78abae1997-01-21 22:02:36 +00003234int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235
3236/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003237typedef int charset[2]; const charset x;
3238/* SunOS 4.1.1 cc rejects this. */
3239char const *const *ccp;
3240char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241/* NEC SVR4.0.2 mips cc rejects this. */
3242struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003243static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003244/* AIX XL C 1.02.0.0 rejects this.
3245 It does not let you subtract one const X* pointer from another in an arm
3246 of an if-expression whose if-part is not a constant expression */
3247const char *g = "string";
3248ccp = &g + (g ? g-g : 0);
3249/* HPUX 7.0 cc rejects these. */
3250++ccp;
3251p = (char**) ccp;
3252ccp = (char const *const *) p;
3253{ /* SCO 3.2v4 cc rejects this. */
3254 char *t;
3255 char const *s = 0 ? (char *) 0 : (char const *) 0;
3256
3257 *t++ = 0;
3258}
3259{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003260 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003261 const int *foo = &x[0];
3262 ++foo;
3263}
3264{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3265 typedef const int *iptr;
3266 iptr p = 0;
3267 ++p;
3268}
3269{ /* AIX XL C 1.02.0.0 rejects this saying
3270 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3271 struct s { int j; const int *ap[3]; };
3272 struct s *b; b->j = 5;
3273}
3274{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3275 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276}
3277
3278; return 0; }
3279EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003280if { (eval echo configure:3281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003281 rm -rf conftest*
3282 ac_cv_c_const=yes
3283else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003284 echo "configure: failed program was:" >&5
3285 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286 rm -rf conftest*
3287 ac_cv_c_const=no
3288fi
3289rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003291
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003292echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003293if test $ac_cv_c_const = no; then
3294 cat >> confdefs.h <<\EOF
3295#define const
3296EOF
3297
3298fi
3299
3300
Guido van Rossumda88dad1995-01-26 00:46:29 +00003301works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003302echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003303echo "configure:3304: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003304cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003305#line 3306 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003306#include "confdefs.h"
3307
Guido van Rossumf78abae1997-01-21 22:02:36 +00003308int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003309volatile int x; x = 0;
3310; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003311EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003312if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003313 rm -rf conftest*
3314 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003315else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003316 echo "configure: failed program was:" >&5
3317 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003318 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319 cat >> confdefs.h <<\EOF
3320#define volatile
3321EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003322
3323fi
3324rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003325echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003326
Guido van Rossumda88dad1995-01-26 00:46:29 +00003327works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003328echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003329echo "configure:3330: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003331#line 3332 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003332#include "confdefs.h"
3333
Guido van Rossumf78abae1997-01-21 22:02:36 +00003334int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335signed char c;
3336; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003337EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003338if { (eval echo configure:3339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003339 rm -rf conftest*
3340 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003341else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003342 echo "configure: failed program was:" >&5
3343 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003344 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345 cat >> confdefs.h <<\EOF
3346#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003347EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003348
3349fi
3350rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003351echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003352
Guido van Rossumda88dad1995-01-26 00:46:29 +00003353have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003354echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003355echo "configure:3356: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003356cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003357#line 3358 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003358#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003359int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003360int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003361return foo(10);
3362; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003363EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003364if { (eval echo configure:3365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365 rm -rf conftest*
3366 cat >> confdefs.h <<\EOF
3367#define HAVE_PROTOTYPES 1
3368EOF
3369 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003370else
3371 echo "configure: failed program was:" >&5
3372 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003373fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003375echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003376
Guido van Rossumda88dad1995-01-26 00:46:29 +00003377works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003378echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003379echo "configure:3380: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003380cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003381#line 3382 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003382#include "confdefs.h"
3383
3384#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003385int foo(int x, ...) {
3386 va_list va;
3387 va_start(va, x);
3388 va_arg(va, int);
3389 va_arg(va, char *);
3390 va_arg(va, double);
3391 return 0;
3392}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003393
Guido van Rossumf78abae1997-01-21 22:02:36 +00003394int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003395return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003396; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003397EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003398if { (eval echo configure:3399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003399 rm -rf conftest*
3400 cat >> confdefs.h <<\EOF
3401#define HAVE_STDARG_PROTOTYPES 1
3402EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003403 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003404else
3405 echo "configure: failed program was:" >&5
3406 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003407fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003408rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003409echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003410
Guido van Rossumda88dad1995-01-26 00:46:29 +00003411if test "$have_prototypes" = yes; then
3412bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003413echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003414echo "configure:3415: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003415cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003416#line 3417 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003417#include "confdefs.h"
3418#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003419int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003420char **t;execve("@",t,t);
3421; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003422EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003423if { (eval echo configure:3424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003424 :
3425else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003426 echo "configure: failed program was:" >&5
3427 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003428 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003429 cat >> confdefs.h <<\EOF
3430#define BAD_EXEC_PROTOTYPES 1
3431EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003432 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003433fi
3434rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003435echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003436fi
3437
Guido van Rossumda88dad1995-01-26 00:46:29 +00003438bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003439echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003440echo "configure:3441: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003441if test "$cross_compiling" = yes; then
3442 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3443else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003444 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003445#line 3446 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003446#include "confdefs.h"
3447
3448struct s { int a; int b; };
3449static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003450int foobar() {
3451 static int random;
3452 random = (int) &foo;
3453 return random;
3454}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003455static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003456main() {
3457 exit(!((int)&foo == foobar()));
3458}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003459
3460EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003461if { (eval echo configure:3462: \"$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 +00003462then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003463 :
3464else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003465 echo "configure: failed program was:" >&5
3466 cat conftest.$ac_ext >&5
3467 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003468 cat >> confdefs.h <<\EOF
3469#define BAD_STATIC_FORWARD 1
3470EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003472fi
3473rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003474fi
3475
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003476echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003477
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003479echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003480echo "configure:3481: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003481cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003482#line 3483 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003483#include "confdefs.h"
3484
3485#ifdef HAVE_STDARG_PROTOTYPES
3486#include <stdarg.h>
3487#else
3488#include <varargs.h>
3489#endif
3490
Guido van Rossumf78abae1997-01-21 22:02:36 +00003491int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003492va_list list1, list2; list1 = list2;
3493; return 0; }
3494EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003495if { (eval echo configure:3496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003496 :
3497else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003498 echo "configure: failed program was:" >&5
3499 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003500 rm -rf conftest*
3501 cat >> confdefs.h <<\EOF
3502#define VA_LIST_IS_ARRAY 1
3503EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003504 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003505fi
3506rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003507echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003508
Guido van Rossum627b2d71993-12-24 10:39:16 +00003509# checks for system services
3510# (none yet)
3511
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003512# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003513echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003514echo "configure:3515: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003515ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003516if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003517 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003518else
3519 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003520LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003521cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003522#line 3523 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003523#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003524/* Override any gcc2 internal prototype to avoid an error. */
3525/* We use char because int might match the return type of a gcc2
3526 builtin and then its argument prototype would still apply. */
3527char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003528
Guido van Rossumf78abae1997-01-21 22:02:36 +00003529int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003530__fpu_control()
3531; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003532EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003533if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003534 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003535 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003536else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003537 echo "configure: failed program was:" >&5
3538 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003539 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003540 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003541fi
3542rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003543LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003545fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003546if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003547 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003548 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3549 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550 cat >> confdefs.h <<EOF
3551#define $ac_tr_lib 1
3552EOF
3553
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003554 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003555
3556else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003557 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003558fi
3559
3560
Guido van Rossum7f253911997-05-09 02:42:48 +00003561# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00003562echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003563echo "configure:3564: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00003564# Check whether --with-fpectl or --without-fpectl was given.
3565if test "${with_fpectl+set}" = set; then
3566 withval="$with_fpectl"
3567
3568if test "$withval" != no
3569then cat >> confdefs.h <<\EOF
3570#define WANT_SIGFPE_HANDLER 1
3571EOF
3572 echo "$ac_t""yes" 1>&6
3573else echo "$ac_t""no" 1>&6
3574fi
3575fi
3576
3577
Guido van Rossum7f43da71994-08-01 12:15:30 +00003578# check for --with-libm=...
3579
Guido van Rossum563e7081996-09-10 18:20:48 +00003580case $ac_sys_system in
3581next) ;;
3582*) LIBM=-lm
3583esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003584echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003585echo "configure:3586: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003586# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003587if test "${with_libm+set}" = set; then
3588 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003589
Guido van Rossum7f253911997-05-09 02:42:48 +00003590if test "$withval" = no
3591then LIBM=
3592 echo "$ac_t""force LIBM empty" 1>&6
3593elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003594then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003595 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003596else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003597fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003598else
3599 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003600fi
3601
3602
3603# check for --with-libc=...
3604
Guido van Rossum7f253911997-05-09 02:42:48 +00003605echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003606echo "configure:3607: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003607# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003608if test "${with_libc+set}" = set; then
3609 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003610
Guido van Rossum7f253911997-05-09 02:42:48 +00003611if test "$withval" = no
3612then LIBC=
3613 echo "$ac_t""force LIBC empty" 1>&6
3614elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003615then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003616 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003617else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003618fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003619else
3620 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003621fi
3622
3623
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003624# check for hypot() in math library
3625LIBS_SAVE=$LIBS
3626LIBS="$LIBS $LIBM"
3627for ac_func in hypot
3628do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003629echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003630echo "configure:3631: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003631if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3632 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003633else
3634 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003635#line 3636 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003636#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003637/* System header to define __stub macros and hopefully few prototypes,
3638 which can conflict with char $ac_func(); below. */
3639#include <assert.h>
3640/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003641/* We use char because int might match the return type of a gcc2
3642 builtin and then its argument prototype would still apply. */
3643char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003644
Guido van Rossumf78abae1997-01-21 22:02:36 +00003645int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003646
3647/* The GNU C library defines this for functions which it implements
3648 to always fail with ENOSYS. Some functions are actually named
3649 something starting with __ and the normal name is an alias. */
3650#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3651choke me
3652#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003653$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003654#endif
3655
3656; return 0; }
3657EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003658if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003659 rm -rf conftest*
3660 eval "ac_cv_func_$ac_func=yes"
3661else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003662 echo "configure: failed program was:" >&5
3663 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003664 rm -rf conftest*
3665 eval "ac_cv_func_$ac_func=no"
3666fi
3667rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003668fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003669
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003670if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003671 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003672 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003673 cat >> confdefs.h <<EOF
3674#define $ac_tr_func 1
3675EOF
3676
3677else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003678 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003679fi
3680done
3681
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003682for ac_func in hypot
3683do
3684echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003685echo "configure:3686: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003686if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3687 echo $ac_n "(cached) $ac_c" 1>&6
3688else
3689 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003690#line 3691 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003691#include "confdefs.h"
3692/* System header to define __stub macros and hopefully few prototypes,
3693 which can conflict with char $ac_func(); below. */
3694#include <assert.h>
3695/* Override any gcc2 internal prototype to avoid an error. */
3696/* We use char because int might match the return type of a gcc2
3697 builtin and then its argument prototype would still apply. */
3698char $ac_func();
3699
Guido van Rossumf78abae1997-01-21 22:02:36 +00003700int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003701
3702/* The GNU C library defines this for functions which it implements
3703 to always fail with ENOSYS. Some functions are actually named
3704 something starting with __ and the normal name is an alias. */
3705#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3706choke me
3707#else
3708$ac_func();
3709#endif
3710
3711; return 0; }
3712EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003713if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003714 rm -rf conftest*
3715 eval "ac_cv_func_$ac_func=yes"
3716else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003717 echo "configure: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003719 rm -rf conftest*
3720 eval "ac_cv_func_$ac_func=no"
3721fi
3722rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003723fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003724
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003725if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3726 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003727 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3728 cat >> confdefs.h <<EOF
3729#define $ac_tr_func 1
3730EOF
3731
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003732else
3733 echo "$ac_t""no" 1>&6
3734LIBOBJS="$LIBOBJS ${ac_func}.o"
3735fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003736done
3737
Guido van Rossumf78abae1997-01-21 22:02:36 +00003738
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003739LIBS=$LIBS_SAVE
3740
Guido van Rossumda88dad1995-01-26 00:46:29 +00003741# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003742echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003743echo "configure:3744: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003744if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3745 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003746else
3747 if test "$cross_compiling" = yes; then
3748 ac_cv_func_getopt=no
3749else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003750 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003751#line 3752 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003752#include "confdefs.h"
3753#include <stdio.h>
3754extern int optind, opterr, getopt();
3755extern char* optarg;
3756int main() {
3757 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3758 opterr = 0;
3759 if (getopt(3, av, "f:") == 'f') { exit(1); }
3760 exit(0);
3761}
3762EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003763if { (eval echo configure:3764: \"$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 +00003764then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003765 ac_cv_func_getopt=yes
3766else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003767 echo "configure: failed program was:" >&5
3768 cat conftest.$ac_ext >&5
3769 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00003770 ac_cv_func_getopt=no
3771fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003772rm -fr conftest*
3773fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003774
3775fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003776echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003777test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3778
Guido van Rossumad713701997-07-10 22:42:38 +00003779# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00003780echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003781echo "configure:3782: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00003782if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
3783 echo $ac_n "(cached) $ac_c" 1>&6
3784else
3785 if test "$cross_compiling" = yes; then
3786 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3787else
3788 cat > conftest.$ac_ext <<EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003789#line 3790 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00003790#include "confdefs.h"
3791#include <stdio.h>
3792#ifdef HAVE_STDLIB
3793#include <stdlib.h>
3794#else
3795char *malloc(), *realloc();
3796int *free();
3797#endif
3798main() {
3799 char *p;
3800 p = malloc(0);
3801 if (p == NULL) exit(1);
3802 p = realloc(p, 0);
3803 if (p == NULL) exit(1);
3804 free(p);
3805 exit(0);
3806}
3807EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003808if { (eval echo configure:3809: \"$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 +00003809then
3810 ac_cv_malloc_zero=nonnull
3811else
3812 echo "configure: failed program was:" >&5
3813 cat conftest.$ac_ext >&5
3814 rm -fr conftest*
3815 ac_cv_malloc_zero=null
3816fi
3817rm -fr conftest*
3818fi
3819
3820fi
3821
3822echo "$ac_t""$ac_cv_malloc_zero" 1>&6
3823if test "$ac_cv_malloc_zero" = null
3824then
3825 cat >> confdefs.h <<\EOF
3826#define MALLOC_ZERO_RETURNS_NULL 1
3827EOF
3828
3829fi
3830
Guido van Rossum627b2d71993-12-24 10:39:16 +00003831# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003832trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003833cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834# This file is a shell script that caches the results of configure
3835# tests run on this system so they can be shared between configure
3836# scripts and configure runs. It is not useful on other systems.
3837# If it contains results you don't want to keep, you may remove or edit it.
3838#
3839# By default, configure uses ./config.cache as the cache file,
3840# creating it if it does not exist already. You can give configure
3841# the --cache-file=FILE option to use a different cache file; that is
3842# what configure does when it calls configure scripts in
3843# subdirectories, so they share the cache.
3844# Giving --cache-file=/dev/null disables caching, for debugging configure.
3845# config.status only pays attention to the cache file if you give it the
3846# --recheck option to rerun configure.
3847#
3848EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003849# The following way of writing the cache mishandles newlines in values,
3850# but we know of no workaround that is simple, portable, and efficient.
3851# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003852# Ultrix sh set writes to stderr and can't be redirected directly,
3853# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003854(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00003855 case `(ac_space=' '; set) 2>&1` in
3856 *ac_space=\ *)
3857 # `set' does not quote correctly, so add quotes (double-quote substitution
3858 # turns \\\\ into \\, and sed turns \\ into \).
3859 sed -n \
3860 -e "s/'/'\\\\''/g" \
3861 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3862 ;;
3863 *)
3864 # `set' quotes correctly as required by POSIX, so do not add quotes.
3865 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3866 ;;
3867 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003868if cmp -s $cache_file confcache; then
3869 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003870else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003871 if test -w $cache_file; then
3872 echo "updating cache $cache_file"
3873 cat confcache > $cache_file
3874 else
3875 echo "not updating unwritable cache $cache_file"
3876 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003877fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003878rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003879
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003880trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881
3882test "x$prefix" = xNONE && prefix=$ac_default_prefix
3883# Let make expand exec_prefix.
3884test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003885
Guido van Rossum7f43da71994-08-01 12:15:30 +00003886# Any assignment to VPATH causes Sun make to only execute
3887# the first set of double-colon rules, so remove it if not needed.
3888# If there is a colon in the path, we need to keep it.
3889if test "x$srcdir" = x.; then
3890 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3891fi
3892
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003893trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003895DEFS=-DHAVE_CONFIG_H
3896
3897# Without the "./", some shells look in PATH for config.status.
3898: ${CONFIG_STATUS=./config.status}
3899
3900echo creating $CONFIG_STATUS
3901rm -f $CONFIG_STATUS
3902cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003903#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003904# Generated automatically by configure.
3905# Run this file to recreate the current configuration.
3906# This directory was configured as follows,
3907# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3908#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003909# $0 $ac_configure_args
3910#
3911# Compiler output produced by configure, useful for debugging
3912# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003914ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003915for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003917 case "\$ac_option" in
3918 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003919 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3920 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003921 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003922 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003923 exit 0 ;;
3924 -help | --help | --hel | --he | --h)
3925 echo "\$ac_cs_usage"; exit 0 ;;
3926 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003927 esac
3928done
3929
Guido van Rossum7f43da71994-08-01 12:15:30 +00003930ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003931
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003932trap 'rm -fr `echo "Makefile \
3933 Objects/Makefile \
3934 Parser/Makefile \
3935 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00003936 Modules/Makefile.pre \
3937 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003938EOF
3939cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003941# Protect against being on the right side of a sed subst in config.status.
3942sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3943 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003944$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003945$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003946s%@CFLAGS@%$CFLAGS%g
3947s%@CPPFLAGS@%$CPPFLAGS%g
3948s%@CXXFLAGS@%$CXXFLAGS%g
3949s%@DEFS@%$DEFS%g
3950s%@LDFLAGS@%$LDFLAGS%g
3951s%@LIBS@%$LIBS%g
3952s%@exec_prefix@%$exec_prefix%g
3953s%@prefix@%$prefix%g
3954s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003955s%@bindir@%$bindir%g
3956s%@sbindir@%$sbindir%g
3957s%@libexecdir@%$libexecdir%g
3958s%@datadir@%$datadir%g
3959s%@sysconfdir@%$sysconfdir%g
3960s%@sharedstatedir@%$sharedstatedir%g
3961s%@localstatedir@%$localstatedir%g
3962s%@libdir@%$libdir%g
3963s%@includedir@%$includedir%g
3964s%@oldincludedir@%$oldincludedir%g
3965s%@infodir@%$infodir%g
3966s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003967s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003968s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00003969s%@SGI_ABI@%$SGI_ABI%g
3970s%@SET_CCC@%$SET_CCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003971s%@CC@%$CC%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003972s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003973s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003974s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003975s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003976s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3977s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003978s%@REALLIBRARY@%$REALLIBRARY%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003979s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003980s%@CPP@%$CPP%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003981s%@DGUX_IS_BROKEN@%$DGUX_IS_BROKEN%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003982s%@SO@%$SO%g
3983s%@LDSHARED@%$LDSHARED%g
3984s%@CCSHARED@%$CCSHARED%g
3985s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00003986s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00003987s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003988s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003989s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003990s%@LIBM@%$LIBM%g
3991s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992
3993CEOF
3994EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003995
3996cat >> $CONFIG_STATUS <<\EOF
3997
3998# Split the substitutions into bite-sized pieces for seds with
3999# small command number limits, like on Digital OSF/1 and HP-UX.
4000ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4001ac_file=1 # Number of current file.
4002ac_beg=1 # First line for current file.
4003ac_end=$ac_max_sed_cmds # Line after last line for current file.
4004ac_more_lines=:
4005ac_sed_cmds=""
4006while $ac_more_lines; do
4007 if test $ac_beg -gt 1; then
4008 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4009 else
4010 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4011 fi
4012 if test ! -s conftest.s$ac_file; then
4013 ac_more_lines=false
4014 rm -f conftest.s$ac_file
4015 else
4016 if test -z "$ac_sed_cmds"; then
4017 ac_sed_cmds="sed -f conftest.s$ac_file"
4018 else
4019 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4020 fi
4021 ac_file=`expr $ac_file + 1`
4022 ac_beg=$ac_end
4023 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4024 fi
4025done
4026if test -z "$ac_sed_cmds"; then
4027 ac_sed_cmds=cat
4028fi
4029EOF
4030
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031cat >> $CONFIG_STATUS <<EOF
4032
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004033CONFIG_FILES=\${CONFIG_FILES-"Makefile \
4034 Objects/Makefile \
4035 Parser/Makefile \
4036 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004037 Modules/Makefile.pre \
4038 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039EOF
4040cat >> $CONFIG_STATUS <<\EOF
4041for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004042 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004043 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004044 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4046 *) ac_file_in="${ac_file}.in" ;;
4047 esac
4048
Guido van Rossumf78abae1997-01-21 22:02:36 +00004049 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004050
4051 # Remove last slash and all that follows it. Not all systems have dirname.
4052 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4053 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4054 # The file is in a subdirectory.
4055 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004056 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004057 # A "../" for each directory in $ac_dir_suffix.
4058 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4059 else
4060 ac_dir_suffix= ac_dots=
4061 fi
4062
4063 case "$ac_given_srcdir" in
4064 .) srcdir=.
4065 if test -z "$ac_dots"; then top_srcdir=.
4066 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4067 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4068 *) # Relative path.
4069 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4070 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4071 esac
4072
Guido van Rossumf78abae1997-01-21 22:02:36 +00004073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074 echo creating "$ac_file"
4075 rm -f "$ac_file"
4076 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4077 case "$ac_file" in
4078 *Makefile*) ac_comsub="1i\\
4079# $configure_input" ;;
4080 *) ac_comsub= ;;
4081 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00004082
4083 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 +00004084 sed -e "$ac_comsub
4085s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004086s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004087s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00004088" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00004089fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00004090rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004092# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4093# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004094#
4095# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4097ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004098ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004100# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004101ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4102ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004103ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004105# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004106ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4107ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004108ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004109ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004110
Guido van Rossumf78abae1997-01-21 22:02:36 +00004111if test "${CONFIG_HEADERS+set}" != set; then
4112EOF
4113cat >> $CONFIG_STATUS <<EOF
4114 CONFIG_HEADERS="config.h"
4115EOF
4116cat >> $CONFIG_STATUS <<\EOF
4117fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004118for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004119 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004120 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004121 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4123 *) ac_file_in="${ac_file}.in" ;;
4124 esac
4125
Guido van Rossum7f43da71994-08-01 12:15:30 +00004126 echo creating $ac_file
4127
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004128 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00004129 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4130 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131
4132EOF
4133
4134# Transform confdefs.h into a sed script conftest.vals that substitutes
4135# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004136# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004137# Protect against being in an unquoted here document in config.status.
4138rm -f conftest.vals
4139cat > conftest.hdr <<\EOF
4140s/[\\&%]/\\&/g
4141s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004142s%#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 +00004143s%ac_d%ac_u%gp
4144s%ac_u%ac_e%gp
4145EOF
4146sed -n -f conftest.hdr confdefs.h > conftest.vals
4147rm -f conftest.hdr
4148
4149# This sed command replaces #undef with comments. This is necessary, for
4150# example, in the case of _POSIX_SOURCE, which is predefined and required
4151# on some systems where configure will not decide to define it.
4152cat >> conftest.vals <<\EOF
4153s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4154EOF
4155
4156# Break up conftest.vals because some shells have a limit on
4157# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158
4159rm -f conftest.tail
4160while :
4161do
4162 ac_lines=`grep -c . conftest.vals`
4163 # grep -c gives empty output for an empty file on some AIX systems.
4164 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4165 # Write a limited-size here document to conftest.frag.
4166 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4167 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4168 echo 'CEOF
4169 sed -f conftest.frag conftest.in > conftest.out
4170 rm -f conftest.in
4171 mv conftest.out conftest.in
4172' >> $CONFIG_STATUS
4173 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4174 rm -f conftest.vals
4175 mv conftest.tail conftest.vals
4176done
4177rm -f conftest.vals
4178
4179cat >> $CONFIG_STATUS <<\EOF
4180 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00004181 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182 cat conftest.in >> conftest.h
4183 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00004184 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004185 echo "$ac_file is unchanged"
4186 rm -f conftest.h
4187 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004188 # Remove last slash and all that follows it. Not all systems have dirname.
4189 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4190 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4191 # The file is in a subdirectory.
4192 test ! -d "$ac_dir" && mkdir "$ac_dir"
4193 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004194 rm -f $ac_file
4195 mv conftest.h $ac_file
4196 fi
4197fi; done
4198
Guido van Rossumf78abae1997-01-21 22:02:36 +00004199EOF
4200cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004201
Guido van Rossumf78abae1997-01-21 22:02:36 +00004202EOF
4203cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004204
4205exit 0
4206EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207chmod +x $CONFIG_STATUS
4208rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004209test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004210