blob: 3838978dee5356de99747532dcf7a94e67ce2215 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003# From configure.in Revision: 1.125
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.
Fred Drake8cef4cf2000-06-28 16:40:38 +00006# Generated automatically using autoconf version 2.14.1
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 Rossum54ecc3d1999-01-27 17:53:11 +000019--with-next-framework Build (OpenStep|Rhapsody|MacOS10) framework"
20ac_help="$ac_help
21--with-dyld Use (OpenStep|Rhapsody|MacOS10) dynamic linker"
22ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023--without-gcc never use gcc"
24ac_help="$ac_help
Guido van Rossum95012191999-12-16 17:50:52 +000025--with-cxx=<compiler> enable C++ support"
26ac_help="$ac_help
Guido van Rossuma68acba1996-07-31 17:36:39 +000027--with-libs='lib1 ...' link against additional libs"
28ac_help="$ac_help
Guido van Rossumb06df271997-08-05 21:50:20 +000029--with(out)-readline obsolete, edit Modules/Setup instead"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000030ac_help="$ac_help
Guido van Rossumec2f0731997-01-22 20:54:01 +000031--with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
32ac_help="$ac_help
33--with-threads alias for --with-thread"
34ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000035--with-thread[=DIRECTORY] make interpreter thread-safe"
36ac_help="$ac_help
37--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
38ac_help="$ac_help
39--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
40ac_help="$ac_help
Guido van Rossum7f253911997-05-09 02:42:48 +000041--with-fpectl enable SIGFPE catching"
42ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000043--with-libm=STRING math library"
44ac_help="$ac_help
45--with-libc=STRING C library"
Guido van Rossumef2255b2000-03-10 22:30:29 +000046ac_help="$ac_help
47--with-wctype-functions use wctype.h functions"
Guido van Rossum627b2d71993-12-24 10:39:16 +000048
Guido van Rossum7f43da71994-08-01 12:15:30 +000049# Initialize some variables set by options.
50# The variables have the same names as the options, with
51# dashes changed to underlines.
52build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000053cache_file=./config.cache
54exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000055host=NONE
56no_create=
57nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000058no_recursion=
59prefix=NONE
60program_prefix=NONE
61program_suffix=NONE
62program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000063silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000064site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000065srcdir=
66target=NONE
67verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068x_includes=NONE
69x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000070bindir='${exec_prefix}/bin'
71sbindir='${exec_prefix}/sbin'
72libexecdir='${exec_prefix}/libexec'
73datadir='${prefix}/share'
74sysconfdir='${prefix}/etc'
75sharedstatedir='${prefix}/com'
76localstatedir='${prefix}/var'
77libdir='${exec_prefix}/lib'
78includedir='${prefix}/include'
79oldincludedir='/usr/include'
80infodir='${prefix}/info'
81mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000082
83# Initialize some other variables.
84subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000085MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000086SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000087# Maximum number of lines to put in a shell here document.
88ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000089
90ac_prev=
91for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000092do
Guido van Rossum627b2d71993-12-24 10:39:16 +000093
Guido van Rossum7f43da71994-08-01 12:15:30 +000094 # If the previous option needs an argument, assign it.
95 if test -n "$ac_prev"; then
96 eval "$ac_prev=\$ac_option"
97 ac_prev=
98 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000099 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000100
Guido van Rossum7f43da71994-08-01 12:15:30 +0000101 case "$ac_option" in
102 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
103 *) ac_optarg= ;;
104 esac
105
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000106 # Accept the important Cygnus configure options, so we can diagnose typos.
107
Guido van Rossum7f43da71994-08-01 12:15:30 +0000108 case "$ac_option" in
109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000110 -bindir | --bindir | --bindi | --bind | --bin | --bi)
111 ac_prev=bindir ;;
112 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
113 bindir="$ac_optarg" ;;
114
115 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000117 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000118 build="$ac_optarg" ;;
119
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000120 -cache-file | --cache-file | --cache-fil | --cache-fi \
121 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
122 ac_prev=cache_file ;;
123 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
124 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
125 cache_file="$ac_optarg" ;;
126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000127 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
128 ac_prev=datadir ;;
129 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
130 | --da=*)
131 datadir="$ac_optarg" ;;
132
Guido van Rossum7f43da71994-08-01 12:15:30 +0000133 -disable-* | --disable-*)
134 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
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 eval "enable_${ac_feature}=no" ;;
141
142 -enable-* | --enable-*)
143 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000144 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000145 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000146 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000147 fi
148 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
149 case "$ac_option" in
150 *=*) ;;
151 *) ac_optarg=yes ;;
152 esac
153 eval "enable_${ac_feature}='$ac_optarg'" ;;
154
Guido van Rossum7f43da71994-08-01 12:15:30 +0000155 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
156 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
157 | --exec | --exe | --ex)
158 ac_prev=exec_prefix ;;
159 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
160 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
161 | --exec=* | --exe=* | --ex=*)
162 exec_prefix="$ac_optarg" ;;
163
164 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000165 # Obsolete; use --with-gas.
166 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000167
168 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000169 # Omit some internal or obsolete options to make the list less imposing.
170 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000171 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000172Usage: configure [options] [host]
173Options: [defaults in brackets after descriptions]
174Configuration:
175 --cache-file=FILE cache test results in FILE
176 --help print this message
177 --no-create do not create output files
178 --quiet, --silent do not print \`checking...' messages
179 --version print the version of autoconf that created configure
180Directory and file names:
181 --prefix=PREFIX install architecture-independent files in PREFIX
182 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000183 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000184 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000185 --bindir=DIR user executables in DIR [EPREFIX/bin]
186 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
187 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
188 --datadir=DIR read-only architecture-independent data in DIR
189 [PREFIX/share]
190 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
191 --sharedstatedir=DIR modifiable architecture-independent data in DIR
192 [PREFIX/com]
193 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
194 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
195 --includedir=DIR C header files in DIR [PREFIX/include]
196 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
197 --infodir=DIR info documentation in DIR [PREFIX/info]
198 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000199 --srcdir=DIR find the sources in DIR [configure dir or ..]
200 --program-prefix=PREFIX prepend PREFIX to installed program names
201 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000202 --program-transform-name=PROGRAM
203 run sed PROGRAM on installed program names
204EOF
205 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000206Host type:
207 --build=BUILD configure for building on BUILD [BUILD=HOST]
208 --host=HOST configure for HOST [guessed]
209 --target=TARGET configure for TARGET [TARGET=HOST]
210Features and packages:
211 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
212 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
213 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
214 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
215 --x-includes=DIR X include files are in DIR
216 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000217EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000218 if test -n "$ac_help"; then
219 echo "--enable and --with options recognized:$ac_help"
220 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000221 exit 0 ;;
222
223 -host | --host | --hos | --ho)
224 ac_prev=host ;;
225 -host=* | --host=* | --hos=* | --ho=*)
226 host="$ac_optarg" ;;
227
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000228 -includedir | --includedir | --includedi | --included | --include \
229 | --includ | --inclu | --incl | --inc)
230 ac_prev=includedir ;;
231 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
232 | --includ=* | --inclu=* | --incl=* | --inc=*)
233 includedir="$ac_optarg" ;;
234
235 -infodir | --infodir | --infodi | --infod | --info | --inf)
236 ac_prev=infodir ;;
237 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
238 infodir="$ac_optarg" ;;
239
240 -libdir | --libdir | --libdi | --libd)
241 ac_prev=libdir ;;
242 -libdir=* | --libdir=* | --libdi=* | --libd=*)
243 libdir="$ac_optarg" ;;
244
245 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
246 | --libexe | --libex | --libe)
247 ac_prev=libexecdir ;;
248 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
249 | --libexe=* | --libex=* | --libe=*)
250 libexecdir="$ac_optarg" ;;
251
252 -localstatedir | --localstatedir | --localstatedi | --localstated \
253 | --localstate | --localstat | --localsta | --localst \
254 | --locals | --local | --loca | --loc | --lo)
255 ac_prev=localstatedir ;;
256 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
257 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
258 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
259 localstatedir="$ac_optarg" ;;
260
261 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
262 ac_prev=mandir ;;
263 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
264 mandir="$ac_optarg" ;;
265
Guido van Rossum7f43da71994-08-01 12:15:30 +0000266 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000267 # Obsolete; use --without-fp.
268 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000269
270 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
271 | --no-cr | --no-c)
272 no_create=yes ;;
273
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000274 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
275 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
276 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000277
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000278 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
279 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
280 | --oldin | --oldi | --old | --ol | --o)
281 ac_prev=oldincludedir ;;
282 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
283 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
284 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
285 oldincludedir="$ac_optarg" ;;
286
Guido van Rossum7f43da71994-08-01 12:15:30 +0000287 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
288 ac_prev=prefix ;;
289 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
290 prefix="$ac_optarg" ;;
291
292 -program-prefix | --program-prefix | --program-prefi | --program-pref \
293 | --program-pre | --program-pr | --program-p)
294 ac_prev=program_prefix ;;
295 -program-prefix=* | --program-prefix=* | --program-prefi=* \
296 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
297 program_prefix="$ac_optarg" ;;
298
299 -program-suffix | --program-suffix | --program-suffi | --program-suff \
300 | --program-suf | --program-su | --program-s)
301 ac_prev=program_suffix ;;
302 -program-suffix=* | --program-suffix=* | --program-suffi=* \
303 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
304 program_suffix="$ac_optarg" ;;
305
306 -program-transform-name | --program-transform-name \
307 | --program-transform-nam | --program-transform-na \
308 | --program-transform-n | --program-transform- \
309 | --program-transform | --program-transfor \
310 | --program-transfo | --program-transf \
311 | --program-trans | --program-tran \
312 | --progr-tra | --program-tr | --program-t)
313 ac_prev=program_transform_name ;;
314 -program-transform-name=* | --program-transform-name=* \
315 | --program-transform-nam=* | --program-transform-na=* \
316 | --program-transform-n=* | --program-transform-=* \
317 | --program-transform=* | --program-transfor=* \
318 | --program-transfo=* | --program-transf=* \
319 | --program-trans=* | --program-tran=* \
320 | --progr-tra=* | --program-tr=* | --program-t=*)
321 program_transform_name="$ac_optarg" ;;
322
323 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
324 | -silent | --silent | --silen | --sile | --sil)
325 silent=yes ;;
326
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000327 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
328 ac_prev=sbindir ;;
329 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
330 | --sbi=* | --sb=*)
331 sbindir="$ac_optarg" ;;
332
333 -sharedstatedir | --sharedstatedir | --sharedstatedi \
334 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
335 | --sharedst | --shareds | --shared | --share | --shar \
336 | --sha | --sh)
337 ac_prev=sharedstatedir ;;
338 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
339 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
340 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
341 | --sha=* | --sh=*)
342 sharedstatedir="$ac_optarg" ;;
343
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000344 -site | --site | --sit)
345 ac_prev=site ;;
346 -site=* | --site=* | --sit=*)
347 site="$ac_optarg" ;;
348
Guido van Rossum7f43da71994-08-01 12:15:30 +0000349 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
350 ac_prev=srcdir ;;
351 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
352 srcdir="$ac_optarg" ;;
353
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000354 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
355 | --syscon | --sysco | --sysc | --sys | --sy)
356 ac_prev=sysconfdir ;;
357 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
358 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
359 sysconfdir="$ac_optarg" ;;
360
Guido van Rossum7f43da71994-08-01 12:15:30 +0000361 -target | --target | --targe | --targ | --tar | --ta | --t)
362 ac_prev=target ;;
363 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
364 target="$ac_optarg" ;;
365
366 -v | -verbose | --verbose | --verbos | --verbo | --verb)
367 verbose=yes ;;
368
369 -version | --version | --versio | --versi | --vers)
Fred Drake8cef4cf2000-06-28 16:40:38 +0000370 echo "configure generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000371 exit 0 ;;
372
373 -with-* | --with-*)
374 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000375 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000376 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000377 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378 fi
379 ac_package=`echo $ac_package| sed 's/-/_/g'`
380 case "$ac_option" in
381 *=*) ;;
382 *) ac_optarg=yes ;;
383 esac
384 eval "with_${ac_package}='$ac_optarg'" ;;
385
386 -without-* | --without-*)
387 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 fi
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 eval "with_${ac_package}=no" ;;
394
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000395 --x)
396 # Obsolete; use --with-x.
397 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398
399 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
400 | --x-incl | --x-inc | --x-in | --x-i)
401 ac_prev=x_includes ;;
402 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
403 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
404 x_includes="$ac_optarg" ;;
405
406 -x-libraries | --x-libraries | --x-librarie | --x-librari \
407 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
408 ac_prev=x_libraries ;;
409 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
410 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
411 x_libraries="$ac_optarg" ;;
412
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000414 ;;
415
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000416 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000417 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000418 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000419 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000420 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421 { 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 +0000422 fi
423 nonopt="$ac_option"
424 ;;
425
426 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000427done
428
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000431fi
432
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000433trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000434
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000435# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000436# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000437# 1 file creation
438# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000439# 3 some systems may open it to /dev/tty
440# 4 used on the Kubota Titan
441# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000442# 5 compiler messages saved in config.log
443if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000444 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000447fi
448exec 5>./config.log
449
450echo "\
451This file contains any messages produced by compilers while
452running configure, to aid debugging if configure makes a mistake.
453" 1>&5
454
455# Strip out --no-create and --no-recursion so they do not pile up.
456# Also quote any args containing shell metacharacters.
457ac_configure_args=
458for ac_arg
459do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000460 case "$ac_arg" in
461 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
462 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000463 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
464 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
465 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
466 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
467 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000468 esac
469done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000470
471# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000472# Only set these to C if already set. These must not be set unconditionally
473# because not all systems understand e.g. LANG=C (notably SCO).
474# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
475# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000476if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000477if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
478if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
479if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480
Guido van Rossum7f43da71994-08-01 12:15:30 +0000481# confdefs.h avoids OS command line length limits that DEFS can exceed.
482rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483# AIX cpp loses on an empty file, so make sure it contains at least a newline.
484echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485
486# A filename unique to this package, relative to the directory that
487# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000488ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000489
490# Find the source files, if location was not specified.
491if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000492 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000493 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494 ac_prog=$0
495 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
496 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
497 srcdir=$ac_confdir
498 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000499 srcdir=..
500 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000501else
502 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000503fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000505 if test "$ac_srcdir_defaulted" = yes; then
506 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000507 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000508 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000509 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000510fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000511srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
512
513# Prefer explicitly selected file to automatically selected ones.
514if test -z "$CONFIG_SITE"; then
515 if test "x$prefix" != xNONE; then
516 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
517 else
518 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
519 fi
520fi
521for ac_site_file in $CONFIG_SITE; do
522 if test -r "$ac_site_file"; then
523 echo "loading site script $ac_site_file"
524 . "$ac_site_file"
525 fi
526done
527
528if test -r "$cache_file"; then
529 echo "loading cache $cache_file"
Fred Drake8cef4cf2000-06-28 16:40:38 +0000530 test -f "$cache_file" && . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000531else
532 echo "creating cache $cache_file"
533 > $cache_file
534fi
535
Guido van Rossum7f43da71994-08-01 12:15:30 +0000536ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000537# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000538ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000539ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000540ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000541cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000542
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000543ac_exeext=
544ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000545if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
546 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
547 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
548 ac_n= ac_c='
549' ac_t=' '
550 else
551 ac_n=-n ac_c= ac_t=
552 fi
553else
554 ac_n= ac_c='\c' ac_t=
555fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000556
Guido van Rossum0a516c91994-09-12 10:58:40 +0000557
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558
Guido van Rossum627b2d71993-12-24 10:39:16 +0000559
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000560# Set VERSION so we only need to edit in one place (i.e., here)
561
Guido van Rossum6a6a77c2000-03-31 15:15:17 +0000562VERSION=1.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000563
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000564# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000565if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000566
567 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000568echo "configure:569: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000569 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000570if test "${with_next_archs+set}" = set; then
571 withval="$with_next_archs"
572
Guido van Rossum563e7081996-09-10 18:20:48 +0000573 if test -n "$withval"; then
574 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
575 # GCC does not currently support multi archs on the NeXT
576 with_gcc=no
577 fi
578 echo "$ac_t""$with_next_archs" 1>&6
579
580else
581 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000582fi
583
Guido van Rossum563e7081996-09-10 18:20:48 +0000584
585 if test -z "$MACHDEP"
586 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000587 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000588 sed -e 's/://' -e 's/\./_/'` && \
589 ac_sys_system=next && ac_sys_release=$4
590
Guido van Rossumb97ef171997-09-28 05:44:03 +0000591 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000592 fi
593fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000594
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000595# Check whether --with-next-framework or --without-next-framework was given.
596if test "${with_next_framework+set}" = set; then
597 withval="$with_next_framework"
598 :
599fi
600
601# Check whether --with-dyld or --without-dyld was given.
602if test "${with_dyld+set}" = set; then
603 withval="$with_dyld"
604 :
605fi
606
Guido van Rossum91922671997-10-09 20:24:13 +0000607
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000608# Set name for machine-dependent library files
609
610echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000611echo "configure:612: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000612if test -z "$MACHDEP"
613then
Guido van Rossum563e7081996-09-10 18:20:48 +0000614 ac_sys_system=`uname -s`
615 if test "$ac_sys_system" = "AIX" ; then
616 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000617 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000618 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000619 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000620 ac_md_system=`echo $ac_sys_system |
621 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
622 ac_md_release=`echo $ac_sys_release |
623 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000624 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000625
Guido van Rossum07397971997-04-29 21:49:50 +0000626 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000627 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000628 esac
629fi
Guido van Rossum91922671997-10-09 20:24:13 +0000630
631#
632# SGI compilers allow the specification of the both the ABI and the
633# ISA on the command line. Depending on the values of these switches,
634# different and often incompatable code will be generated.
635#
636# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
637# thus supply support for various ABI/ISA combinations. The MACHDEP
638# variable is also adjusted.
639#
640
641if test ! -z "$SGI_ABI"
642then
643 CC="cc $SGI_ABI"
644 LDFLAGS="$SGI_ABI $LDFLAGS"
645 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
646fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000647echo "$ac_t""$MACHDEP" 1>&6
648
Guido van Rossum91922671997-10-09 20:24:13 +0000649#
650# CCC is the command that compiles C++ programs
651#
652# Not all make programs have this predefined.
653#
Guido van Rossum95012191999-12-16 17:50:52 +0000654#AC_SUBST(SET_CCC)
655#AC_MSG_CHECKING(CCC)
656#if test -z "$CCC"
657#then
658# case $ac_sys_system in
659# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
660# Linux*) SET_CCC="CCC= g++";;
661# *) SET_CCC=""
662# esac
663#else
664# SET_CCC="CCC= ${CCC}"
665#fi
666#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000667
668
Guido van Rossum627b2d71993-12-24 10:39:16 +0000669# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000670echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000671echo "configure:672: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000672# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000673if test "${with_gcc+set}" = set; then
674 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000675
676 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000677 no) CC=cc
678 without_gcc=yes;;
679 yes) CC=gcc
680 without_gcc=no;;
681 *) CC=$withval
682 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000683 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000684else
Guido van Rossume77438c1995-09-13 18:59:59 +0000685
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000686 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000687 OSF1) CC=cc
688 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000689 BeOS*)
690 # Dunno if it's a good idea to get this over with all at once, or
691 # to handle it in with the other goodies.
692 MACHDEP=beos
693
694 case $BE_HOST_CPU in
695 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000696 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000697 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000698 case `uname -r` in
699 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
700 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
701 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 CCSHARED=-UUSE_DL_EXPORT
703 LDFLAGS="$LDFLAGS -nodup"
704
705 AR="$PWD/BeOS/ar-fake"
706 RANLIB=:
707
708 cat >> confdefs.h <<\EOF
709#define DL_EXPORT_HEADER "dl_export.h"
710EOF
711
712 ;;
713 x86)
714 CC="gcc -I$PWD/BeOS"
715 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000716 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000717 CCSHARED=-UUSE_DL_EXPORT
718
719 AR="$PWD/BeOS/ar-fake"
720 RANLIB=:
721
722 cat >> confdefs.h <<\EOF
723#define DL_EXPORT_HEADER "dl_export.h"
724EOF
725
726 ;;
727 *)
728 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
729 ;;
730 esac
731 ;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000732 *) without_gcc=no;;
733 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000734fi
735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000736echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000737
Guido van Rossum95012191999-12-16 17:50:52 +0000738
739
740MAINOBJ=python.o
741echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000742echo "configure:743: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000743# Check whether --with-cxx or --without-cxx was given.
744if test "${with_cxx+set}" = set; then
745 withval="$with_cxx"
746
747 case $withval in
748 no) CXX=
749 with_cxx=no;;
750 *) CXX=$withval
751 MAINOBJ=ccpython.o
752 with_cxx=$withval;;
753 esac
754else
755
756 with_cxx=no
757
758fi
759
760echo "$ac_t""$with_cxx" 1>&6
761SET_CXX="CXX = $CXX"
762
763#AC_MSG_CHECKING(CCC)
764#if test -z "$CCC"
765#then
766# case $ac_sys_system in
767# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
768# Linux*) SET_CCC="CCC= g++";;
769# *) SET_CCC=""
770# esac
771#else
772# SET_CCC="CCC= ${CCC}"
773#fi
774#AC_MSG_RESULT($SET_CCC)
775
Guido van Rossum8b131c51995-03-09 14:10:13 +0000776# If the user switches compilers, we can't believe the cache
777if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
778then
779 { echo "configure: error: cached CC is different -- throw away $cache_file
780(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
781fi
782
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783# Extract the first word of "gcc", so it can be a program name with args.
784set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000785echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000786echo "configure:787: checking for $ac_word" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +0000787if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000788 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000789else
790 if test -n "$CC"; then
791 ac_cv_prog_CC="$CC" # Let the user override the test.
792else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000793 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
794 ac_dummy="$PATH"
795 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796 test -z "$ac_dir" && ac_dir=.
797 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799 break
800 fi
801 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000803fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000804fi
805CC="$ac_cv_prog_CC"
806if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000807 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000809 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000811
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812if test -z "$CC"; then
813 # Extract the first word of "cc", so it can be a program name with args.
814set dummy cc; ac_word=$2
815echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000816echo "configure:817: checking for $ac_word" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +0000817if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 echo $ac_n "(cached) $ac_c" 1>&6
819else
820 if test -n "$CC"; then
821 ac_cv_prog_CC="$CC" # Let the user override the test.
822else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000823 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000825 ac_dummy="$PATH"
826 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 test -z "$ac_dir" && ac_dir=.
828 if test -f $ac_dir/$ac_word; then
829 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
830 ac_prog_rejected=yes
831 continue
832 fi
833 ac_cv_prog_CC="cc"
834 break
835 fi
836 done
837 IFS="$ac_save_ifs"
838if test $ac_prog_rejected = yes; then
839 # We found a bogon in the path, so make sure we never use it.
840 set dummy $ac_cv_prog_CC
841 shift
842 if test $# -gt 0; then
843 # We chose a different compiler from the bogus one.
844 # However, it has the same basename, so the bogon will be chosen
845 # first if we set CC to just the basename; use the full file name.
846 shift
847 set dummy "$ac_dir/$ac_word" "$@"
848 shift
849 ac_cv_prog_CC="$@"
850 fi
851fi
852fi
853fi
854CC="$ac_cv_prog_CC"
855if test -n "$CC"; then
856 echo "$ac_t""$CC" 1>&6
857else
858 echo "$ac_t""no" 1>&6
859fi
860
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000861 if test -z "$CC"; then
862 case "`uname -s`" in
Fred Drake8cef4cf2000-06-28 16:40:38 +0000863 *win32* | *WIN32* | *CYGWIN*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000864 # Extract the first word of "cl", so it can be a program name with args.
865set dummy cl; ac_word=$2
866echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000867echo "configure:868: checking for $ac_word" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +0000868if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000869 echo $ac_n "(cached) $ac_c" 1>&6
870else
871 if test -n "$CC"; then
872 ac_cv_prog_CC="$CC" # Let the user override the test.
873else
874 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
875 ac_dummy="$PATH"
876 for ac_dir in $ac_dummy; do
877 test -z "$ac_dir" && ac_dir=.
878 if test -f $ac_dir/$ac_word; then
879 ac_cv_prog_CC="cl"
880 break
881 fi
882 done
883 IFS="$ac_save_ifs"
884fi
885fi
886CC="$ac_cv_prog_CC"
887if test -n "$CC"; then
888 echo "$ac_t""$CC" 1>&6
889else
890 echo "$ac_t""no" 1>&6
891fi
892 ;;
893 esac
894 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
896fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897
Fred Drake8cef4cf2000-06-28 16:40:38 +0000898echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
899echo "configure:900: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000900
901ac_ext=c
902# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
903ac_cpp='$CPP $CPPFLAGS'
904ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000905ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000906cross_compiling=$ac_cv_prog_cc_cross
907
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000908cat > conftest.$ac_ext << EOF
909
Guido van Rossumef2255b2000-03-10 22:30:29 +0000910#line 911 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000911#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000912
Guido van Rossumf78abae1997-01-21 22:02:36 +0000913main(){return(0);}
914EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +0000915if { (eval echo configure:916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000916 ac_cv_prog_cc_works=yes
917 # If we can't run a trivial program, we are probably using a cross compiler.
918 if (./conftest; exit) 2>/dev/null; then
919 ac_cv_prog_cc_cross=no
920 else
921 ac_cv_prog_cc_cross=yes
922 fi
923else
924 echo "configure: failed program was:" >&5
925 cat conftest.$ac_ext >&5
926 ac_cv_prog_cc_works=no
927fi
928rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000929ac_ext=c
930# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
931ac_cpp='$CPP $CPPFLAGS'
932ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
933ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
934cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000935
936echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
937if test $ac_cv_prog_cc_works = no; then
938 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
939fi
Fred Drake8cef4cf2000-06-28 16:40:38 +0000940echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
941echo "configure:942: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000942echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
943cross_compiling=$ac_cv_prog_cc_cross
944
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000945echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000946echo "configure:947: checking whether we are using GNU C" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +0000947if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000948 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949else
950 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000951#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000953#endif
954EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +0000955if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 ac_cv_prog_gcc=yes
957else
958 ac_cv_prog_gcc=no
959fi
960fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000962echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000963
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964if test $ac_cv_prog_gcc = yes; then
965 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000966else
967 GCC=
968fi
969
970ac_test_CFLAGS="${CFLAGS+set}"
971ac_save_CFLAGS="$CFLAGS"
972CFLAGS=
973echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000974echo "configure:975: checking whether ${CC-cc} accepts -g" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +0000975if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000976 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000977else
978 echo 'void f(){}' > conftest.c
979if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000980 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000981else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000982 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000983fi
984rm -f conftest*
985
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
Guido van Rossumf78abae1997-01-21 22:02:36 +0000988echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000989if test "$ac_test_CFLAGS" = set; then
990 CFLAGS="$ac_save_CFLAGS"
991elif test $ac_cv_prog_cc_g = yes; then
992 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993 CFLAGS="-g -O2"
994 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000995 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 fi
997else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000998 if test "$GCC" = yes; then
999 CFLAGS="-O2"
1000 else
1001 CFLAGS=
1002 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003fi
1004
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001005
Guido van Rossumdd997f71998-10-07 19:58:26 +00001006case $MACHDEP in
1007bsdos*)
1008 case $CC in
1009 gcc) CC="$CC -D_HAVE_BSDI";;
1010 esac;;
1011esac
1012
Guido van Rossum24b1e751997-08-21 02:29:16 +00001013case $ac_sys_system in
1014hp*|HP*)
1015 case $CC in
1016 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1017 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001018BeOS*)
1019 case $CC in
1020 cc) CC=cc;;
1021 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001022esac
1023
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001024# LDLIBRARY is the name of the library to link against (as opposed to the
1025# name of the library into which to insert object files). On systems
1026# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1027# the Makefiles).
1028
1029
1030LDLIBRARY=''
1031
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001032# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001033# This is altered for AIX and BeOS in order to build the export list before
1034# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001035
1036echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001037echo "configure:1038: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001038if test -z "$LINKCC" -a ! -z "$CXX"
1039then
1040 LINKCC="$CXX"
1041fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001042if test -z "$LINKCC"
1043then
1044 case $ac_sys_system in
1045 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001046 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001047 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001048 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001049 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001050 dgux*)
1051 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001052 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001053 esac
1054fi
1055echo "$ac_t""$LINKCC" 1>&6
1056
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001057echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001058echo "configure:1059: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001059
1060# NeXT framework builds require that the 'ar' library be converted into
1061# a bundle using libtool.
1062if test "$with_next_framework"
1063then
1064 LDLIBRARY='libpython$(VERSION).dylib'
1065fi
1066
1067# DG/UX requires some fancy ld contortions to produce a .so from an .a
1068if test "$MACHDEP" = "dguxR4"
1069then
1070 LDLIBRARY='libpython$(VERSION).so'
1071 OPT="$OPT -pic"
1072fi
1073echo "$ac_t""$LDLIBRARY" 1>&6
1074
1075# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1076if test -z "$LDLIBRARY"
1077then
1078 LDLIBRARY='libpython$(VERSION).a'
1079 MAKE_LDLIBRARY="true"
1080else
1081 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1082fi
1083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084# Extract the first word of "ranlib", so it can be a program name with args.
1085set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001086echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001087echo "configure:1088: checking for $ac_word" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001088if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001089 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090else
1091 if test -n "$RANLIB"; then
1092 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1093else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001094 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1095 ac_dummy="$PATH"
1096 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 test -z "$ac_dir" && ac_dir=.
1098 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001099 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001100 break
1101 fi
1102 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001105fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106fi
1107RANLIB="$ac_cv_prog_RANLIB"
1108if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001109 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001111 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001112fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001113
1114
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115for ac_prog in ar aal
1116do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117# Extract the first word of "$ac_prog", so it can be a program name with args.
1118set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001119echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001120echo "configure:1121: checking for $ac_word" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001121if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001122 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123else
1124 if test -n "$AR"; then
1125 ac_cv_prog_AR="$AR" # Let the user override the test.
1126else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001127 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1128 ac_dummy="$PATH"
1129 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 test -z "$ac_dir" && ac_dir=.
1131 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 break
1134 fi
1135 done
1136 IFS="$ac_save_ifs"
1137fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138fi
1139AR="$ac_cv_prog_AR"
1140if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001141 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146test -n "$AR" && break
1147done
1148test -n "$AR" || AR="ar"
1149
1150
Guido van Rossumda88dad1995-01-26 00:46:29 +00001151
1152
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001153# Install just never works :-(
1154if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001155then
1156 INSTALL=cp
1157 INSTALL_PROGRAM=cp
1158 INSTALL_DATA=cp
1159else
1160 INSTALL_PROGRAM="$INSTALL"
1161 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001162fi
1163
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001164# Not every filesystem supports hard links
1165
1166if test -z "$LN" ; then
1167 case $ac_sys_system in
1168 BeOS*) LN="ln -s";;
1169 *) LN=ln;;
1170 esac
1171fi
1172
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001173# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001174
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001175if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001176then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001177 case $GCC in
1178 yes)
1179 case $ac_cv_prog_cc_g in
1180 yes) OPT="-g -O2";;
1181 *) OPT="-O2";;
1182 esac
1183 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001184 *) OPT="-O";;
1185 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001186fi
1187
Guido van Rossum563e7081996-09-10 18:20:48 +00001188if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001189then
1190 OPT="$OPT $ac_arch_flags"
1191fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001192# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001193echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001194echo "configure:1195: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195# On Suns, sometimes $CPP names a directory.
1196if test -n "$CPP" && test -d "$CPP"; then
1197 CPP=
1198fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199if test -z "$CPP"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00001200if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001201 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202else
1203 # This must be in double quotes, not single quotes, because CPP may get
1204 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # On the NeXT, cc -E runs the code through the compiler's parser,
1207 # not just through cpp.
1208 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001209#line 1210 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212Syntax Error
1213EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001214ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumef2255b2000-03-10 22:30:29 +00001215{ (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001216ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217if test -z "$ac_err"; then
1218 :
1219else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001221 echo "configure: failed program was:" >&5
1222 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 rm -rf conftest*
1224 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001226#line 1227 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229Syntax Error
1230EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001231ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumef2255b2000-03-10 22:30:29 +00001232{ (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001233ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1234if test -z "$ac_err"; then
1235 :
1236else
1237 echo "$ac_err" >&5
1238 echo "configure: failed program was:" >&5
1239 cat conftest.$ac_ext >&5
1240 rm -rf conftest*
1241 CPP="${CC-cc} -nologo -E"
1242 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001243#line 1244 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001244#include "confdefs.h"
1245#include <assert.h>
1246Syntax Error
1247EOF
1248ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumef2255b2000-03-10 22:30:29 +00001249{ (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001250ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001252 :
1253else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001254 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001255 echo "configure: failed program was:" >&5
1256 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257 rm -rf conftest*
1258 CPP=/lib/cpp
1259fi
1260rm -f conftest*
1261fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001263fi
1264rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001265 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001267 CPP="$ac_cv_prog_CPP"
1268else
1269 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001271echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001273echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001274echo "configure:1275: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001275cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001276#line 1277 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277#include "confdefs.h"
1278#ifdef _AIX
1279 yes
1280#endif
1281
1282EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1284 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001286 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287#define _ALL_SOURCE 1
1288EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290else
1291 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001292 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293fi
1294rm -f conftest*
1295
1296
Guido van Rossumf78abae1997-01-21 22:02:36 +00001297ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001298echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001299echo "configure:1300: checking for minix/config.h" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001300if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001301 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302else
1303 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001304#line 1305 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305#include "confdefs.h"
1306#include <minix/config.h>
1307EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001308ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumef2255b2000-03-10 22:30:29 +00001309{ (eval echo configure:1310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001310ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001316 echo "configure: failed program was:" >&5
1317 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318 rm -rf conftest*
1319 eval "ac_cv_header_$ac_safe=no"
1320fi
1321rm -f conftest*
1322fi
1323if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001324 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325 MINIX=yes
1326else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001327 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329fi
1330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331if test "$MINIX" = yes; then
1332 cat >> confdefs.h <<\EOF
1333#define _POSIX_SOURCE 1
1334EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336 cat >> confdefs.h <<\EOF
1337#define _POSIX_1_SOURCE 2
1338EOF
1339
1340 cat >> confdefs.h <<\EOF
1341#define _MINIX 1
1342EOF
1343
1344fi
1345
Guido van Rossumda88dad1995-01-26 00:46:29 +00001346
Guido van Rossum91922671997-10-09 20:24:13 +00001347echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001348echo "configure:1349: checking whether $CC accepts -OPT:Olimit=0" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001349if eval "test \"\${ac_cv_opt_olimit_ok+set}\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001350 echo $ac_n "(cached) $ac_c" 1>&6
1351else
1352 ac_save_cc="$CC"
1353CC="$CC -OPT:Olimit=0"
1354if test "$cross_compiling" = yes; then
1355 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1356else
1357 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001358#line 1359 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001359#include "confdefs.h"
1360int main() { return 0; }
1361EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001362if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001363then
1364 ac_cv_opt_olimit_ok=yes
1365else
1366 echo "configure: failed program was:" >&5
1367 cat conftest.$ac_ext >&5
1368 rm -fr conftest*
1369 ac_cv_opt_olimit_ok=no
1370fi
1371rm -fr conftest*
1372fi
1373
1374CC="$ac_save_cc"
1375fi
1376
1377echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001378if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001379 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001380else
1381 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001382echo "configure:1383: checking whether $CC accepts -Olimit 1500" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001383 if eval "test \"\${ac_cv_olimit_ok+set}\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001384 echo $ac_n "(cached) $ac_c" 1>&6
1385else
1386 ac_save_cc="$CC"
1387 CC="$CC -Olimit 1500"
1388 if test "$cross_compiling" = yes; then
1389 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1390else
1391 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001392#line 1393 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001393#include "confdefs.h"
1394int main() { return 0; }
1395EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001396if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001397then
1398 ac_cv_olimit_ok=yes
1399else
1400 echo "configure: failed program was:" >&5
1401 cat conftest.$ac_ext >&5
1402 rm -fr conftest*
1403 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001404fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001405rm -fr conftest*
1406fi
1407
1408 CC="$ac_save_cc"
1409fi
1410
1411 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1412 if test $ac_cv_olimit_ok = yes; then
1413 OPT="$OPT -Olimit 1500"
1414 fi
1415fi
1416
Guido van Rossum84e7b241996-08-19 21:59:00 +00001417# check for ANSI or K&R ("traditional") preprocessor
1418echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001419echo "configure:1420: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001420cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001421#line 1422 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001422#include "confdefs.h"
1423
1424#define spam(name, doc) {#name, &name, #name "() -- " doc}
1425int foo;
1426struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1427
Guido van Rossumf78abae1997-01-21 22:02:36 +00001428int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001429;
1430; return 0; }
1431EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001432if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001433 rm -rf conftest*
1434 cpp_type=ansi
1435else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001436 echo "configure: failed program was:" >&5
1437 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001438 rm -rf conftest*
1439 cat >> confdefs.h <<\EOF
1440#define HAVE_OLD_CPP 1
1441EOF
1442 cpp_type=traditional
1443fi
1444rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001445echo "$ac_t""$cpp_type" 1>&6
1446
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001447# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001448echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001449echo "configure:1450: checking for ANSI C header files" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001450if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001451 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001452else
1453 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001454#line 1455 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001455#include "confdefs.h"
1456#include <stdlib.h>
1457#include <stdarg.h>
1458#include <string.h>
1459#include <float.h>
1460EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001461ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumef2255b2000-03-10 22:30:29 +00001462{ (eval echo configure:1463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001463ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001464if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001465 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001466 ac_cv_header_stdc=yes
1467else
1468 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001469 echo "configure: failed program was:" >&5
1470 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001471 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001472 ac_cv_header_stdc=no
1473fi
1474rm -f conftest*
1475
1476if test $ac_cv_header_stdc = yes; then
1477 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1478cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001479#line 1480 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001480#include "confdefs.h"
1481#include <string.h>
1482EOF
1483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1484 egrep "memchr" >/dev/null 2>&1; then
1485 :
1486else
1487 rm -rf conftest*
1488 ac_cv_header_stdc=no
1489fi
1490rm -f conftest*
1491
1492fi
1493
1494if test $ac_cv_header_stdc = yes; then
1495 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1496cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001497#line 1498 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001498#include "confdefs.h"
1499#include <stdlib.h>
1500EOF
1501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1502 egrep "free" >/dev/null 2>&1; then
1503 :
1504else
1505 rm -rf conftest*
1506 ac_cv_header_stdc=no
1507fi
1508rm -f conftest*
1509
1510fi
1511
1512if test $ac_cv_header_stdc = yes; then
1513 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1514if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001515 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001516else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001517 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001518#line 1519 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001519#include "confdefs.h"
1520#include <ctype.h>
1521#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1522#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001523#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001524int main () { int i; for (i = 0; i < 256; i++)
1525if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1526exit (0); }
1527
1528EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001529if { (eval echo configure:1530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001530then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531 :
1532else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001533 echo "configure: failed program was:" >&5
1534 cat conftest.$ac_ext >&5
1535 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001537fi
1538rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001540
1541fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001542fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001543
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001544echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545if test $ac_cv_header_stdc = yes; then
1546 cat >> confdefs.h <<\EOF
1547#define STDC_HEADERS 1
1548EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001549
1550fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001551
Guido van Rossum96013151997-10-08 22:47:52 +00001552for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001553signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001554sys/audioio.h sys/file.h sys/lock.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001555sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drake8cef4cf2000-06-28 16:40:38 +00001556sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001557do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001558ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001559echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001560echo "configure:1561: checking for $ac_hdr" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001561if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001562 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001563else
1564 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001565#line 1566 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001567#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001568EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001569ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumef2255b2000-03-10 22:30:29 +00001570{ (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001571ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001572if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001573 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001574 eval "ac_cv_header_$ac_safe=yes"
1575else
1576 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001577 echo "configure: failed program was:" >&5
1578 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001579 rm -rf conftest*
1580 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001581fi
1582rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583fi
1584if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001585 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001586 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001587 cat >> confdefs.h <<EOF
1588#define $ac_tr_hdr 1
1589EOF
1590
1591else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001593fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001594done
1595
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001596ac_header_dirent=no
1597for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1598do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001599ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001600echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001601echo "configure:1602: checking for $ac_hdr that defines DIR" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001602if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001603 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001604else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001605 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001606#line 1607 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607#include "confdefs.h"
1608#include <sys/types.h>
1609#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001610int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001611DIR *dirp = 0;
1612; return 0; }
1613EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001614if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001615 rm -rf conftest*
1616 eval "ac_cv_header_dirent_$ac_safe=yes"
1617else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001618 echo "configure: failed program was:" >&5
1619 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001620 rm -rf conftest*
1621 eval "ac_cv_header_dirent_$ac_safe=no"
1622fi
1623rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001624fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001625if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001626 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001627 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001628 cat >> confdefs.h <<EOF
1629#define $ac_tr_hdr 1
1630EOF
1631 ac_header_dirent=$ac_hdr; break
1632else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001633 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634fi
1635done
1636# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1637if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001638echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001639echo "configure:1640: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001640ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00001641if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001642 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001643else
1644 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001645LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001646cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001647#line 1648 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001649/* Override any gcc2 internal prototype to avoid an error. */
1650/* We use char because int might match the return type of a gcc2
1651 builtin and then its argument prototype would still apply. */
1652char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653
Guido van Rossumf78abae1997-01-21 22:02:36 +00001654int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655opendir()
1656; return 0; }
1657EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001658if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001659 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001660 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001661else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001662 echo "configure: failed program was:" >&5
1663 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001664 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001665 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001666fi
1667rm -f conftest*
1668LIBS="$ac_save_LIBS"
1669
1670fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001671if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001672 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673 LIBS="$LIBS -ldir"
1674else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001675 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676fi
1677
1678else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001679echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001680echo "configure:1681: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001681ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00001682if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001683 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001684else
1685 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001686LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001687cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001688#line 1689 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001690/* Override any gcc2 internal prototype to avoid an error. */
1691/* We use char because int might match the return type of a gcc2
1692 builtin and then its argument prototype would still apply. */
1693char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694
Guido van Rossumf78abae1997-01-21 22:02:36 +00001695int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696opendir()
1697; return 0; }
1698EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001699if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001701 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001703 echo "configure: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001706 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707fi
1708rm -f conftest*
1709LIBS="$ac_save_LIBS"
1710
1711fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001712if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001713 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001714 LIBS="$LIBS -lx"
1715else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001716 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717fi
1718
1719fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001720
1721
1722# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001723was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001724echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001725echo "configure:1726: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001727#line 1728 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728#include "confdefs.h"
1729#include <time.h>
1730EOF
1731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1732 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001733 rm -rf conftest*
1734 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001735else
1736 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001737 cat >> confdefs.h <<\EOF
1738#define clock_t long
1739EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001740
1741fi
1742rm -f conftest*
1743
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001744echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001745
Guido van Rossum84e7b241996-08-19 21:59:00 +00001746# Add some code to confdefs.h so that the test for off_t works on SCO
1747cat >> confdefs.h <<\EOF
1748#if defined(SCO_DS)
1749#undef _OFF_T
1750#endif
1751EOF
1752
Guido van Rossumef2255b2000-03-10 22:30:29 +00001753# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001754echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001755echo "configure:1756: checking for mode_t" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00001756if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001757 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001758else
1759 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001760#line 1761 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761#include "confdefs.h"
1762#include <sys/types.h>
1763#if STDC_HEADERS
1764#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001765#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001766#endif
1767EOF
1768if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001769 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00001771 eval "ac_cv_type_mode_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001772else
1773 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00001774 eval "ac_cv_type_mode_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001775fi
1776rm -f conftest*
1777
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00001779if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
1780 echo "$ac_t""yes" 1>&6
1781else
1782 echo "$ac_t""no" 1>&6
1783 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001784#define mode_t int
1785EOF
1786
1787fi
1788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001789echo $ac_n "checking for off_t""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00001790echo "configure:1791: checking for off_t" >&5
1791if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001792 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001793else
1794 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00001795#line 1796 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796#include "confdefs.h"
1797#include <sys/types.h>
1798#if STDC_HEADERS
1799#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001800#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801#endif
1802EOF
1803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001804 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00001806 eval "ac_cv_type_off_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807else
1808 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00001809 eval "ac_cv_type_off_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810fi
1811rm -f conftest*
1812
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00001814if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
1815 echo "$ac_t""yes" 1>&6
1816else
1817 echo "$ac_t""no" 1>&6
1818 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001819#define off_t long
1820EOF
1821
1822fi
1823
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001824echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00001825echo "configure:1826: checking for pid_t" >&5
1826if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001827 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001828else
1829 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00001830#line 1831 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001831#include "confdefs.h"
1832#include <sys/types.h>
1833#if STDC_HEADERS
1834#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001835#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836#endif
1837EOF
1838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001839 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00001841 eval "ac_cv_type_pid_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001842else
1843 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00001844 eval "ac_cv_type_pid_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001845fi
1846rm -f conftest*
1847
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001848fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00001849if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
1850 echo "$ac_t""yes" 1>&6
1851else
1852 echo "$ac_t""no" 1>&6
1853 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001854#define pid_t int
1855EOF
1856
1857fi
1858
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001859echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00001860echo "configure:1861: checking return type of signal handlers" >&5
1861if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001862 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001863else
1864 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00001865#line 1866 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001866#include "confdefs.h"
1867#include <sys/types.h>
1868#include <signal.h>
1869#ifdef signal
1870#undef signal
1871#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001872#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001873extern "C" void (*signal (int, void (*)(int)))(int);
1874#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001875void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001876#endif
1877
Guido van Rossumf78abae1997-01-21 22:02:36 +00001878int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879int i;
1880; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001881EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00001882if { (eval echo configure:1883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001883 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001885else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001888 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001889 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001890fi
1891rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001893
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001894echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001895cat >> confdefs.h <<EOF
1896#define RETSIGTYPE $ac_cv_type_signal
1897EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001898
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001899
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001900echo $ac_n "checking for size_t""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00001901echo "configure:1902: checking for size_t" >&5
1902if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904else
1905 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00001906#line 1907 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907#include "confdefs.h"
1908#include <sys/types.h>
1909#if STDC_HEADERS
1910#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001911#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001912#endif
1913EOF
1914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001915 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001916 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00001917 eval "ac_cv_type_size_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001918else
1919 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00001920 eval "ac_cv_type_size_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001921fi
1922rm -f conftest*
1923
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00001925if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
1926 echo "$ac_t""yes" 1>&6
1927else
1928 echo "$ac_t""no" 1>&6
1929 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001930#define size_t unsigned
1931EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001932
1933fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001934
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001935echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00001936echo "configure:1937: checking for uid_t in sys/types.h" >&5
1937if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001938 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939else
1940 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00001941#line 1942 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942#include "confdefs.h"
1943#include <sys/types.h>
1944EOF
1945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1946 egrep "uid_t" >/dev/null 2>&1; then
1947 rm -rf conftest*
1948 ac_cv_type_uid_t=yes
1949else
1950 rm -rf conftest*
1951 ac_cv_type_uid_t=no
1952fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001953rm -f conftest*
1954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001955fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001956
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001957echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001958if test $ac_cv_type_uid_t = no; then
1959 cat >> confdefs.h <<\EOF
1960#define uid_t int
1961EOF
1962
1963 cat >> confdefs.h <<\EOF
1964#define gid_t int
1965EOF
1966
1967fi
1968
Guido van Rossum627b2d71993-12-24 10:39:16 +00001969
Guido van Rossumef2255b2000-03-10 22:30:29 +00001970# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001971echo $ac_n "checking size of int""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00001972echo "configure:1973: checking size of int" >&5
1973if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001974 echo $ac_n "(cached) $ac_c" 1>&6
1975else
1976 if test "$cross_compiling" = yes; then
1977 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1978else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001979 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00001980#line 1981 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001981#include "confdefs.h"
1982#include <stdio.h>
1983main()
1984{
1985 FILE *f=fopen("conftestval", "w");
1986 if (!f) exit(1);
1987 fprintf(f, "%d\n", sizeof(int));
1988 exit(0);
1989}
1990EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00001991if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001992then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001993 ac_cv_sizeof_int=`cat conftestval`
1994else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001995 echo "configure: failed program was:" >&5
1996 cat conftest.$ac_ext >&5
1997 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001998 ac_cv_sizeof_int=0
1999fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002000rm -fr conftest*
2001fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002002
2003fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002004echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2005cat >> confdefs.h <<EOF
2006#define SIZEOF_INT $ac_cv_sizeof_int
2007EOF
2008
2009
2010echo $ac_n "checking size of long""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002011echo "configure:2012: checking size of long" >&5
2012if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002013 echo $ac_n "(cached) $ac_c" 1>&6
2014else
2015 if test "$cross_compiling" = yes; then
2016 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2017else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002018 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002019#line 2020 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002020#include "confdefs.h"
2021#include <stdio.h>
2022main()
2023{
2024 FILE *f=fopen("conftestval", "w");
2025 if (!f) exit(1);
2026 fprintf(f, "%d\n", sizeof(long));
2027 exit(0);
2028}
2029EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002030if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002031then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002032 ac_cv_sizeof_long=`cat conftestval`
2033else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002034 echo "configure: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002037 ac_cv_sizeof_long=0
2038fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002039rm -fr conftest*
2040fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002041
2042fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002043echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2044cat >> confdefs.h <<EOF
2045#define SIZEOF_LONG $ac_cv_sizeof_long
2046EOF
2047
2048
Guido van Rossumad678af1998-10-02 14:42:15 +00002049echo $ac_n "checking size of void *""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002050echo "configure:2051: checking size of void *" >&5
2051if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002052 echo $ac_n "(cached) $ac_c" 1>&6
2053else
2054 if test "$cross_compiling" = yes; then
2055 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2056else
2057 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002058#line 2059 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002059#include "confdefs.h"
2060#include <stdio.h>
2061main()
2062{
2063 FILE *f=fopen("conftestval", "w");
2064 if (!f) exit(1);
2065 fprintf(f, "%d\n", sizeof(void *));
2066 exit(0);
2067}
2068EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002069if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad678af1998-10-02 14:42:15 +00002070then
2071 ac_cv_sizeof_void_p=`cat conftestval`
2072else
2073 echo "configure: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 rm -fr conftest*
2076 ac_cv_sizeof_void_p=0
2077fi
2078rm -fr conftest*
2079fi
2080
2081fi
2082echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2083cat >> confdefs.h <<EOF
2084#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2085EOF
2086
2087
Guido van Rossumef2255b2000-03-10 22:30:29 +00002088echo $ac_n "checking size of char""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002089echo "configure:2090: checking size of char" >&5
2090if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002091 echo $ac_n "(cached) $ac_c" 1>&6
2092else
2093 if test "$cross_compiling" = yes; then
2094 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2095else
2096 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002097#line 2098 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002098#include "confdefs.h"
2099#include <stdio.h>
2100main()
2101{
2102 FILE *f=fopen("conftestval", "w");
2103 if (!f) exit(1);
2104 fprintf(f, "%d\n", sizeof(char));
2105 exit(0);
2106}
2107EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002108if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002109then
2110 ac_cv_sizeof_char=`cat conftestval`
2111else
2112 echo "configure: failed program was:" >&5
2113 cat conftest.$ac_ext >&5
2114 rm -fr conftest*
2115 ac_cv_sizeof_char=0
2116fi
2117rm -fr conftest*
2118fi
2119
2120fi
2121echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2122cat >> confdefs.h <<EOF
2123#define SIZEOF_CHAR $ac_cv_sizeof_char
2124EOF
2125
2126
2127echo $ac_n "checking size of short""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002128echo "configure:2129: checking size of short" >&5
2129if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002130 echo $ac_n "(cached) $ac_c" 1>&6
2131else
2132 if test "$cross_compiling" = yes; then
2133 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2134else
2135 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002136#line 2137 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002137#include "confdefs.h"
2138#include <stdio.h>
2139main()
2140{
2141 FILE *f=fopen("conftestval", "w");
2142 if (!f) exit(1);
2143 fprintf(f, "%d\n", sizeof(short));
2144 exit(0);
2145}
2146EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002147if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002148then
2149 ac_cv_sizeof_short=`cat conftestval`
2150else
2151 echo "configure: failed program was:" >&5
2152 cat conftest.$ac_ext >&5
2153 rm -fr conftest*
2154 ac_cv_sizeof_short=0
2155fi
2156rm -fr conftest*
2157fi
2158
2159fi
2160echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2161cat >> confdefs.h <<EOF
2162#define SIZEOF_SHORT $ac_cv_sizeof_short
2163EOF
2164
2165
2166echo $ac_n "checking size of float""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002167echo "configure:2168: checking size of float" >&5
2168if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002169 echo $ac_n "(cached) $ac_c" 1>&6
2170else
2171 if test "$cross_compiling" = yes; then
2172 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2173else
2174 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002175#line 2176 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002176#include "confdefs.h"
2177#include <stdio.h>
2178main()
2179{
2180 FILE *f=fopen("conftestval", "w");
2181 if (!f) exit(1);
2182 fprintf(f, "%d\n", sizeof(float));
2183 exit(0);
2184}
2185EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002186if { (eval echo configure:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002187then
2188 ac_cv_sizeof_float=`cat conftestval`
2189else
2190 echo "configure: failed program was:" >&5
2191 cat conftest.$ac_ext >&5
2192 rm -fr conftest*
2193 ac_cv_sizeof_float=0
2194fi
2195rm -fr conftest*
2196fi
2197
2198fi
2199echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2200cat >> confdefs.h <<EOF
2201#define SIZEOF_FLOAT $ac_cv_sizeof_float
2202EOF
2203
2204
2205echo $ac_n "checking size of double""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002206echo "configure:2207: checking size of double" >&5
2207if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002208 echo $ac_n "(cached) $ac_c" 1>&6
2209else
2210 if test "$cross_compiling" = yes; then
2211 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2212else
2213 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002214#line 2215 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002215#include "confdefs.h"
2216#include <stdio.h>
2217main()
2218{
2219 FILE *f=fopen("conftestval", "w");
2220 if (!f) exit(1);
2221 fprintf(f, "%d\n", sizeof(double));
2222 exit(0);
2223}
2224EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002225if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002226then
2227 ac_cv_sizeof_double=`cat conftestval`
2228else
2229 echo "configure: failed program was:" >&5
2230 cat conftest.$ac_ext >&5
2231 rm -fr conftest*
2232 ac_cv_sizeof_double=0
2233fi
2234rm -fr conftest*
2235fi
2236
2237fi
2238echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2239cat >> confdefs.h <<EOF
2240#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2241EOF
2242
2243
Guido van Rossum0a516c91994-09-12 10:58:40 +00002244
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002245echo $ac_n "checking for long long support""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002246echo "configure:2247: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002247have_long_long=no
2248cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002249#line 2250 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002250#include "confdefs.h"
2251
2252int main() {
2253long long x; x = (long long)0;
2254; return 0; }
2255EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002256if { (eval echo configure:2257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002257 rm -rf conftest*
2258 cat >> confdefs.h <<\EOF
2259#define HAVE_LONG_LONG 1
2260EOF
2261 have_long_long=yes
2262else
2263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
2265fi
2266rm -f conftest*
2267echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002268if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002269echo $ac_n "checking size of long long""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002270echo "configure:2271: checking size of long long" >&5
2271if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002272 echo $ac_n "(cached) $ac_c" 1>&6
2273else
2274 if test "$cross_compiling" = yes; then
2275 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2276else
2277 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002278#line 2279 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002279#include "confdefs.h"
2280#include <stdio.h>
2281main()
2282{
2283 FILE *f=fopen("conftestval", "w");
2284 if (!f) exit(1);
2285 fprintf(f, "%d\n", sizeof(long long));
2286 exit(0);
2287}
2288EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002289if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002290then
2291 ac_cv_sizeof_long_long=`cat conftestval`
2292else
2293 echo "configure: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 rm -fr conftest*
2296 ac_cv_sizeof_long_long=0
2297fi
2298rm -fr conftest*
2299fi
2300
2301fi
2302echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2303cat >> confdefs.h <<EOF
2304#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2305EOF
2306
2307
2308fi
2309
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002310# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2311echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002312echo "configure:2313: checking size of off_t" >&5
2313if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002314 echo $ac_n "(cached) $ac_c" 1>&6
2315else
2316 if test "$cross_compiling" = yes; then
2317 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2318else
2319 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002320#line 2321 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002321#include "confdefs.h"
2322#include <stdio.h>
2323#include <sys/types.h>
2324main()
2325{
2326 FILE *f=fopen("conftestval", "w");
2327 if (!f) exit(1);
2328 fprintf(f, "%d\n", sizeof(off_t));
2329 exit(0);
2330}
2331EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002332if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002333then
2334 ac_cv_sizeof_off_t=`cat conftestval`
2335else
2336 echo "configure: failed program was:" >&5
2337 cat conftest.$ac_ext >&5
2338 rm -fr conftest*
2339 ac_cv_sizeof_off_t=0
2340fi
2341rm -fr conftest*
2342fi
2343
2344
2345fi
2346
2347echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2348cat >> confdefs.h <<EOF
2349#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2350EOF
2351
2352
2353echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002354echo "configure:2355: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002355if test "$have_long_long" = yes -a \
2356 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2357 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002358 cat >> confdefs.h <<\EOF
2359#define HAVE_LARGEFILE_SUPPORT 1
2360EOF
2361
2362 echo "$ac_t""yes" 1>&6
2363else
2364 echo "$ac_t""no" 1>&6
2365fi
2366
2367
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002368# Minor variations in building a framework between NextStep versions 4 and 5
2369
2370case $ac_sys_system/$ac_sys_release in
2371 next/4*)
2372 ns_undef_sym='__environ'
2373 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2374 next/5*)
2375 ns_undef_sym='_environ'
2376 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2377esac
2378
2379echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002380echo "configure:2381: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002381if test "$with_next_framework"
2382then
2383 OPT="$OPT -fno-common"
2384 # -U __environ is needed since bundles don't have access
2385 # to crt0 when built but will always be linked against it
2386 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2387 cat >> confdefs.h <<\EOF
2388#define WITH_NEXT_FRAMEWORK 1
2389EOF
2390
2391 echo "$ac_t""yes" 1>&6
2392else
2393 echo "$ac_t""no" 1>&6
2394fi
2395
2396echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002397echo "configure:2398: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002398if test "$with_next_framework" -o "$with_dyld"
2399then
2400 if test "$with_dyld"
2401 then
2402 echo "$ac_t""yes" 1>&6
2403 else
2404 echo "$ac_t""required for framework build" 1>&6
2405 fi
2406 cat >> confdefs.h <<\EOF
2407#define WITH_DYLD 1
2408EOF
2409
2410 ns_dyld='set'
2411else
2412 echo "$ac_t""no" 1>&6
2413fi
2414
Guido van Rossum0a516c91994-09-12 10:58:40 +00002415# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002416
2417
2418
2419
Guido van Rossum0a516c91994-09-12 10:58:40 +00002420# SO is the extension of shared libraries `(including the dot!)
2421# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002422echo $ac_n "checking SO""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002423echo "configure:2424: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002424if test -z "$SO"
2425then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002426 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002427 hp*|HP*) SO=.sl;;
2428 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002429 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002430fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002431echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002432# LDSHARED is the ld *command* used to create shared library
2433# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002434# (Shared libraries in this instance are shared modules to be loaded into
2435# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002436echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002437echo "configure:2438: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002438if test -z "$LDSHARED"
2439then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002440 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002441 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002442 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002443 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002444 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002445 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002446 SunOS/5*)
2447 if test "$GCC" = "yes"
2448 then LDSHARED='$(CC) -G'
2449 else LDSHARED="ld -G";
2450 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002451 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002452 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2453 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002454 next/*)
2455 if test "$ns_dyld"
2456 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2457 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2458 fi
2459 if test "$with_next_framework" ; then
2460 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2461 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002462 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002463 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002464 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002465 FreeBSD*/[34]*) LDSHARED="gcc -shared";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002466 FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
2467 NetBSD*)
2468 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2469 then
2470 LDSHARED="cc -shared"
2471 else
2472 LDSHARED="ld -Bshareable"
2473 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002474 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002475 *) LDSHARED="ld";;
2476 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002477fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002478echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002479# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002480# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002481echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002482echo "configure:2483: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002483if test -z "$CCSHARED"
2484then
Guido van Rossum07397971997-04-29 21:49:50 +00002485 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002486 hp*|HP*) if test "$GCC" = yes;
2487 then CCSHARED="-fpic";
2488 else CCSHARED="+z";
2489 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002490 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002491 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002492 FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
2493 NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002494 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002495 IRIX*/6*) case $CC in
2496 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002497 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002498 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002499 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002500fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002501echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002502# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002503# the python executable -- this is only needed for a few systems
2504echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002505echo "configure:2506: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002506if test -z "$LINKFORSHARED"
2507then
Guido van Rossum07397971997-04-29 21:49:50 +00002508 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002509 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002510 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002511 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002512 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002513 FreeBSD/[34]*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002514 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002515 # -u libsys_s pulls in all symbols in libsys
2516 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2517 # -u __dummy makes the linker aware of the objc runtime
2518 # in System.framework; otherwise, __objcInit (referenced in
2519 # crt1.o) gets erroneously defined as common, which breaks dynamic
2520 # loading of any modules which reference it in System.framework
2521 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002522 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002523 NetBSD*)
2524 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2525 then
2526 LINKFORSHARED="-Wl,--export-dynamic"
2527 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002528 SunOS/5*) case $CC in
2529 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002530 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002531 then
2532 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002533 fi;;
2534 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002535 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002536fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002537echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002538
Guido van Rossum627b2d71993-12-24 10:39:16 +00002539# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002540echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002541echo "configure:2542: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002542ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00002543if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002544 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002545else
2546 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002547LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002548cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002549#line 2550 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002550#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002551/* Override any gcc2 internal prototype to avoid an error. */
2552/* We use char because int might match the return type of a gcc2
2553 builtin and then its argument prototype would still apply. */
2554char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002555
Guido van Rossumf78abae1997-01-21 22:02:36 +00002556int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002557dlopen()
2558; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002559EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002560if { (eval echo configure:2561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002561 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002562 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002563else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002564 echo "configure: failed program was:" >&5
2565 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002566 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002567 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002568fi
2569rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002570LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002571
Guido van Rossum627b2d71993-12-24 10:39:16 +00002572fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002573if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002574 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002575 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2576 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002577 cat >> confdefs.h <<EOF
2578#define $ac_tr_lib 1
2579EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002580
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002581 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002582
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002584 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
2586 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002587echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002588echo "configure:2589: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002589ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00002590if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002591 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592else
2593 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002594LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002596#line 2597 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002597#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002598/* Override any gcc2 internal prototype to avoid an error. */
2599/* We use char because int might match the return type of a gcc2
2600 builtin and then its argument prototype would still apply. */
2601char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002602
Guido van Rossumf78abae1997-01-21 22:02:36 +00002603int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604shl_load()
2605; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002606EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002607if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002608 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002609 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002611 echo "configure: failed program was:" >&5
2612 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002614 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002615fi
2616rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002618
Guido van Rossum627b2d71993-12-24 10:39:16 +00002619fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002620if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002621 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002622 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2623 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624 cat >> confdefs.h <<EOF
2625#define $ac_tr_lib 1
2626EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002627
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002628 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629
2630else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002631 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632fi
2633 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002634
2635# checks for system dependent C++ extensions support
2636case "$ac_sys_system" in
2637 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002638echo "configure:2639: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002639 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002640#line 2641 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002641#include "confdefs.h"
2642#include "/usr/lpp/xlC/include/load.h"
2643int main() {
2644loadAndInit("", 0, "")
2645; return 0; }
2646EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002647if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002648 rm -rf conftest*
2649 cat >> confdefs.h <<\EOF
2650#define AIX_GENUINE_CPLUSPLUS 1
2651EOF
2652
2653 echo "$ac_t""yes" 1>&6
2654else
2655 echo "configure: failed program was:" >&5
2656 cat conftest.$ac_ext >&5
2657 rm -rf conftest*
2658 echo "$ac_t""no" 1>&6
2659fi
2660rm -f conftest*;;
2661 *) ;;
2662esac
2663
Guido van Rossum70c7f481998-03-26 18:44:10 +00002664# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2665# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002666# BeOS' sockets are stashed in libnet.
2667case "$ac_sys_system" in
2668IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002669*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002670echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002671echo "configure:2672: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002672ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00002673if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002674 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002675else
2676 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002677LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002678cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002679#line 2680 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002680#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002681/* Override any gcc2 internal prototype to avoid an error. */
2682/* We use char because int might match the return type of a gcc2
2683 builtin and then its argument prototype would still apply. */
2684char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002685
Guido van Rossumf78abae1997-01-21 22:02:36 +00002686int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002687t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002688; return 0; }
2689EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002690if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002691 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002692 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002693else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002694 echo "configure: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002696 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002697 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002698fi
2699rm -f conftest*
2700LIBS="$ac_save_LIBS"
2701
2702fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002703if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002704 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002705 LIBS="-lnsl $LIBS"
2706else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002707 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002708fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002709 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002710echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002711echo "configure:2712: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002712ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00002713if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002714 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715else
2716 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002717LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002718cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002719#line 2720 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002720#include "confdefs.h"
2721/* Override any gcc2 internal prototype to avoid an error. */
2722/* We use char because int might match the return type of a gcc2
2723 builtin and then its argument prototype would still apply. */
2724char socket();
2725
2726int main() {
2727socket()
2728; return 0; }
2729EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002730if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002731 rm -rf conftest*
2732 eval "ac_cv_lib_$ac_lib_var=yes"
2733else
2734 echo "configure: failed program was:" >&5
2735 cat conftest.$ac_ext >&5
2736 rm -rf conftest*
2737 eval "ac_cv_lib_$ac_lib_var=no"
2738fi
2739rm -f conftest*
2740LIBS="$ac_save_LIBS"
2741
2742fi
2743if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2744 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002745 LIBS="-lsocket $LIBS"
2746else
2747 echo "$ac_t""no" 1>&6
2748fi
2749 # SVR4 sockets
2750echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002751echo "configure:2752: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002752ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00002753if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002754 echo $ac_n "(cached) $ac_c" 1>&6
2755else
2756 ac_save_LIBS="$LIBS"
2757LIBS="-lnet $LIBS $LIBS"
2758cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002759#line 2760 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002760#include "confdefs.h"
2761/* Override any gcc2 internal prototype to avoid an error. */
2762/* We use char because int might match the return type of a gcc2
2763 builtin and then its argument prototype would still apply. */
2764char socket();
2765
2766int main() {
2767socket()
2768; return 0; }
2769EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002770if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002771 rm -rf conftest*
2772 eval "ac_cv_lib_$ac_lib_var=yes"
2773else
2774 echo "configure: failed program was:" >&5
2775 cat conftest.$ac_ext >&5
2776 rm -rf conftest*
2777 eval "ac_cv_lib_$ac_lib_var=no"
2778fi
2779rm -f conftest*
2780LIBS="$ac_save_LIBS"
2781
2782fi
2783if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2784 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002785 LIBS="-lnet $LIBS"
2786else
2787 echo "$ac_t""no" 1>&6
2788fi
2789 # BeOS
2790;;
2791esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002792
Guido van Rossuma68acba1996-07-31 17:36:39 +00002793echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002794echo "configure:2795: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002795# Check whether --with-libs or --without-libs was given.
2796if test "${with_libs+set}" = set; then
2797 withval="$with_libs"
2798
2799echo "$ac_t""$withval" 1>&6
2800LIBS="$withval $LIBS"
2801
2802else
2803 echo "$ac_t""no" 1>&6
2804fi
2805
Guido van Rossum7f43da71994-08-01 12:15:30 +00002806
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002807echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002808echo "configure:2809: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002810if test "${with_readline+set}" = set; then
2811 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002812 echo "$ac_t""$withval" 1>&6
2813{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002814else
Guido van Rossumb06df271997-08-05 21:50:20 +00002815 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002816fi
2817
Guido van Rossum7f43da71994-08-01 12:15:30 +00002818
Guido van Rossum009f7871997-12-04 00:51:42 +00002819
2820USE_THREAD_MODULE="#"
2821
Guido van Rossumec2f0731997-01-22 20:54:01 +00002822echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002823echo "configure:2824: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002824
2825# Check whether --with-dec-threads or --without-dec-threads was given.
2826if test "${with_dec_threads+set}" = set; then
2827 withval="$with_dec_threads"
2828 echo "$ac_t""$withval" 1>&6
2829LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002830if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002831 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002832fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002833else
2834 echo "$ac_t""no" 1>&6
2835fi
2836
2837
2838echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002839echo "configure:2840: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002840# Check whether --with-threads or --without-threads was given.
2841if test "${with_threads+set}" = set; then
2842 withval="$with_threads"
2843 echo "$ac_t""$withval" 1>&6
2844if test "${with_thread+set}" != set; then
2845 with_thread="$withval";
2846fi
2847else
2848 echo "$ac_t""no" 1>&6
2849fi
2850
2851
2852echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002853echo "configure:2854: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002854# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002855if test "${with_thread+set}" = set; then
2856 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002857
Guido van Rossum009f7871997-12-04 00:51:42 +00002858USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002859echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002860if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002861then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002862fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002863cat >> confdefs.h <<\EOF
2864#define _REENTRANT 1
2865EOF
2866
Guido van Rossumf78abae1997-01-21 22:02:36 +00002867ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002868echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002869echo "configure:2870: checking for mach/cthreads.h" >&5
2870if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002871 echo $ac_n "(cached) $ac_c" 1>&6
2872else
2873 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002874#line 2875 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002875#include "confdefs.h"
2876#include <mach/cthreads.h>
2877EOF
2878ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake8cef4cf2000-06-28 16:40:38 +00002879{ (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002880ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002881if test -z "$ac_err"; then
2882 rm -rf conftest*
2883 eval "ac_cv_header_$ac_safe=yes"
2884else
2885 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002886 echo "configure: failed program was:" >&5
2887 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002888 rm -rf conftest*
2889 eval "ac_cv_header_$ac_safe=no"
2890fi
2891rm -f conftest*
2892fi
2893if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2894 echo "$ac_t""yes" 1>&6
2895 cat >> confdefs.h <<\EOF
2896#define WITH_THREAD 1
2897EOF
2898
2899cat >> confdefs.h <<\EOF
2900#define C_THREADS 1
2901EOF
2902
2903LIBOBJS="$LIBOBJS thread.o"
2904else
2905 echo "$ac_t""no" 1>&6
2906
Guido van Rossum07bd90e2000-05-08 13:41:38 +00002907echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002908echo "configure:2909: checking for pth_init in -lpth" >&5
Guido van Rossum07bd90e2000-05-08 13:41:38 +00002909ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00002910if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00002911 echo $ac_n "(cached) $ac_c" 1>&6
2912else
2913 ac_save_LIBS="$LIBS"
2914LIBS="-lpth $LIBS"
2915cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002916#line 2917 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00002917#include "confdefs.h"
2918/* Override any gcc2 internal prototype to avoid an error. */
2919/* We use char because int might match the return type of a gcc2
2920 builtin and then its argument prototype would still apply. */
2921char pth_init();
2922
2923int main() {
2924pth_init()
2925; return 0; }
2926EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002927if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00002928 rm -rf conftest*
2929 eval "ac_cv_lib_$ac_lib_var=yes"
2930else
2931 echo "configure: failed program was:" >&5
2932 cat conftest.$ac_ext >&5
2933 rm -rf conftest*
2934 eval "ac_cv_lib_$ac_lib_var=no"
2935fi
2936rm -f conftest*
2937LIBS="$ac_save_LIBS"
2938
2939fi
2940if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2941 echo "$ac_t""yes" 1>&6
2942 cat >> confdefs.h <<\EOF
2943#define WITH_THREAD 1
2944EOF
2945
2946cat >> confdefs.h <<\EOF
2947#define _GNU_PTH 1
2948EOF
2949
2950LIBS="-lpth $LIBS"
2951LIBOBJS="$LIBOBJS thread.o"
2952else
2953 echo "$ac_t""no" 1>&6
2954
Guido van Rossum02a1c402000-02-25 19:26:31 +00002955echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00002956echo "configure:2957: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00002957ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00002958if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00002959 echo $ac_n "(cached) $ac_c" 1>&6
2960else
2961 ac_save_LIBS="$LIBS"
2962LIBS="-lpthread $LIBS"
2963cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002964#line 2965 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00002965#include "confdefs.h"
2966/* Override any gcc2 internal prototype to avoid an error. */
2967/* We use char because int might match the return type of a gcc2
2968 builtin and then its argument prototype would still apply. */
2969char pthread_create();
2970
2971int main() {
2972pthread_create()
2973; return 0; }
2974EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00002975if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00002976 rm -rf conftest*
2977 eval "ac_cv_lib_$ac_lib_var=yes"
2978else
2979 echo "configure: failed program was:" >&5
2980 cat conftest.$ac_ext >&5
2981 rm -rf conftest*
2982 eval "ac_cv_lib_$ac_lib_var=no"
2983fi
2984rm -f conftest*
2985LIBS="$ac_save_LIBS"
2986
2987fi
2988if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2989 echo "$ac_t""yes" 1>&6
2990 cat >> confdefs.h <<\EOF
2991#define WITH_THREAD 1
2992EOF
2993
2994cat >> confdefs.h <<\EOF
2995#define _POSIX_THREADS 1
2996EOF
2997
2998LIBS="-lpthread $LIBS"
2999LIBOBJS="$LIBOBJS thread.o"
3000else
3001 echo "$ac_t""no" 1>&6
3002
Guido van Rossumea516321998-12-17 18:08:55 +00003003echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003004echo "configure:3005: checking for pthread_detach" >&5
3005if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003006 echo $ac_n "(cached) $ac_c" 1>&6
3007else
3008 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003009#line 3010 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003010#include "confdefs.h"
3011/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003012 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003013#include <assert.h>
3014/* Override any gcc2 internal prototype to avoid an error. */
3015/* We use char because int might match the return type of a gcc2
3016 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003017char pthread_detach();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003018char (*f)();
Guido van Rossumad678af1998-10-02 14:42:15 +00003019
3020int main() {
3021
3022/* The GNU C library defines this for functions which it implements
3023 to always fail with ENOSYS. Some functions are actually named
3024 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003025#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003026choke me
3027#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00003028f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00003029#endif
3030
3031; return 0; }
3032EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003033if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003034 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003035 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003036else
3037 echo "configure: failed program was:" >&5
3038 cat conftest.$ac_ext >&5
3039 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003040 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003041fi
3042rm -f conftest*
3043fi
3044
Guido van Rossumea516321998-12-17 18:08:55 +00003045if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003046 echo "$ac_t""yes" 1>&6
3047 cat >> confdefs.h <<\EOF
3048#define WITH_THREAD 1
3049EOF
3050
3051cat >> confdefs.h <<\EOF
3052#define _POSIX_THREADS 1
3053EOF
3054
3055LIBOBJS="$LIBOBJS thread.o"
3056else
3057 echo "$ac_t""no" 1>&6
3058
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003059ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
3060echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003061echo "configure:3062: checking for kernel/OS.h" >&5
3062if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003063 echo $ac_n "(cached) $ac_c" 1>&6
3064else
3065 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003066#line 3067 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003067#include "confdefs.h"
3068#include <kernel/OS.h>
3069EOF
3070ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003071{ (eval echo configure:3072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003072ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003073if test -z "$ac_err"; then
3074 rm -rf conftest*
3075 eval "ac_cv_header_$ac_safe=yes"
3076else
3077 echo "$ac_err" >&5
3078 echo "configure: failed program was:" >&5
3079 cat conftest.$ac_ext >&5
3080 rm -rf conftest*
3081 eval "ac_cv_header_$ac_safe=no"
3082fi
3083rm -f conftest*
3084fi
3085if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3086 echo "$ac_t""yes" 1>&6
3087 cat >> confdefs.h <<\EOF
3088#define WITH_THREAD 1
3089EOF
3090
3091cat >> confdefs.h <<\EOF
3092#define BEOS_THREADS 1
3093EOF
3094
3095LIBOBJS="$LIBOBJS thread.o"
3096else
3097 echo "$ac_t""no" 1>&6
3098
Guido van Rossumf78abae1997-01-21 22:02:36 +00003099echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003100echo "configure:3101: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003101ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00003102if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003103 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104else
3105 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003106LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003107cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003108#line 3109 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003109#include "confdefs.h"
3110/* Override any gcc2 internal prototype to avoid an error. */
3111/* We use char because int might match the return type of a gcc2
3112 builtin and then its argument prototype would still apply. */
3113char pthread_create();
3114
3115int main() {
3116pthread_create()
3117; return 0; }
3118EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003119if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003120 rm -rf conftest*
3121 eval "ac_cv_lib_$ac_lib_var=yes"
3122else
3123 echo "configure: failed program was:" >&5
3124 cat conftest.$ac_ext >&5
3125 rm -rf conftest*
3126 eval "ac_cv_lib_$ac_lib_var=no"
3127fi
3128rm -f conftest*
3129LIBS="$ac_save_LIBS"
3130
3131fi
3132if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3133 echo "$ac_t""yes" 1>&6
3134 cat >> confdefs.h <<\EOF
3135#define WITH_THREAD 1
3136EOF
3137
3138cat >> confdefs.h <<\EOF
3139#define _POSIX_THREADS 1
3140EOF
3141
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003142LIBS="$LIBS -lpthreads"
3143LIBOBJS="$LIBOBJS thread.o"
3144else
3145 echo "$ac_t""no" 1>&6
3146
3147echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003148echo "configure:3149: checking for pthread_create in -lc_r" >&5
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003149ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00003150if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003151 echo $ac_n "(cached) $ac_c" 1>&6
3152else
3153 ac_save_LIBS="$LIBS"
3154LIBS="-lc_r $LIBS"
3155cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003156#line 3157 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003157#include "confdefs.h"
3158/* Override any gcc2 internal prototype to avoid an error. */
3159/* We use char because int might match the return type of a gcc2
3160 builtin and then its argument prototype would still apply. */
3161char pthread_create();
3162
3163int main() {
3164pthread_create()
3165; return 0; }
3166EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003167if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003168 rm -rf conftest*
3169 eval "ac_cv_lib_$ac_lib_var=yes"
3170else
3171 echo "configure: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
3173 rm -rf conftest*
3174 eval "ac_cv_lib_$ac_lib_var=no"
3175fi
3176rm -f conftest*
3177LIBS="$ac_save_LIBS"
3178
3179fi
3180if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3181 echo "$ac_t""yes" 1>&6
3182 cat >> confdefs.h <<\EOF
3183#define WITH_THREAD 1
3184EOF
3185
3186cat >> confdefs.h <<\EOF
3187#define _POSIX_THREADS 1
3188EOF
3189
Guido van Rossum49545951997-12-02 19:28:29 +00003190LIBS="$LIBS -lc_r"
3191LIBOBJS="$LIBOBJS thread.o"
3192else
3193 echo "$ac_t""no" 1>&6
3194
Guido van Rossum0be3e491997-05-22 20:33:33 +00003195echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003196echo "configure:3197: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00003197ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00003198if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003199 echo $ac_n "(cached) $ac_c" 1>&6
3200else
3201 ac_save_LIBS="$LIBS"
3202LIBS="-lthread $LIBS"
3203cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003204#line 3205 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003205#include "confdefs.h"
3206/* Override any gcc2 internal prototype to avoid an error. */
3207/* We use char because int might match the return type of a gcc2
3208 builtin and then its argument prototype would still apply. */
3209char __d6_pthread_create();
3210
3211int main() {
3212__d6_pthread_create()
3213; return 0; }
3214EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003215if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003216 rm -rf conftest*
3217 eval "ac_cv_lib_$ac_lib_var=yes"
3218else
3219 echo "configure: failed program was:" >&5
3220 cat conftest.$ac_ext >&5
3221 rm -rf conftest*
3222 eval "ac_cv_lib_$ac_lib_var=no"
3223fi
3224rm -f conftest*
3225LIBS="$ac_save_LIBS"
3226
3227fi
3228if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3229 echo "$ac_t""yes" 1>&6
3230 cat >> confdefs.h <<\EOF
3231#define WITH_THREAD 1
3232EOF
3233
3234cat >> confdefs.h <<\EOF
3235#define _POSIX_THREADS 1
3236EOF
3237
3238LIBS="$LIBS -lthread"
3239LIBOBJS="$LIBOBJS thread.o"
3240else
3241 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003242
3243echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003244echo "configure:3245: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003245ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00003246if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003247 echo $ac_n "(cached) $ac_c" 1>&6
3248else
3249 ac_save_LIBS="$LIBS"
3250LIBS="-lcma $LIBS"
3251cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003252#line 3253 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003253#include "confdefs.h"
3254/* Override any gcc2 internal prototype to avoid an error. */
3255/* We use char because int might match the return type of a gcc2
3256 builtin and then its argument prototype would still apply. */
3257char pthread_create();
3258
3259int main() {
3260pthread_create()
3261; return 0; }
3262EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003263if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003264 rm -rf conftest*
3265 eval "ac_cv_lib_$ac_lib_var=yes"
3266else
3267 echo "configure: failed program was:" >&5
3268 cat conftest.$ac_ext >&5
3269 rm -rf conftest*
3270 eval "ac_cv_lib_$ac_lib_var=no"
3271fi
3272rm -f conftest*
3273LIBS="$ac_save_LIBS"
3274
3275fi
3276if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3277 echo "$ac_t""yes" 1>&6
3278 cat >> confdefs.h <<\EOF
3279#define WITH_THREAD 1
3280EOF
3281
3282cat >> confdefs.h <<\EOF
3283#define _POSIX_THREADS 1
3284EOF
3285
3286LIBS="$LIBS -lcma"
3287LIBOBJS="$LIBOBJS thread.o"
3288else
3289 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00003290fi
3291
3292
Guido van Rossum627b2d71993-12-24 10:39:16 +00003293fi
3294
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295fi
3296
Guido van Rossum0be3e491997-05-22 20:33:33 +00003297fi
3298
Guido van Rossum49545951997-12-02 19:28:29 +00003299fi
3300
Guido van Rossumb93a8621998-05-07 13:27:32 +00003301fi
3302
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003303fi
3304
Guido van Rossumad678af1998-10-02 14:42:15 +00003305fi
3306
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003307fi
3308
Guido van Rossum0be3e491997-05-22 20:33:33 +00003309
Guido van Rossumf78abae1997-01-21 22:02:36 +00003310echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003311echo "configure:3312: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003312ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00003313if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003314 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003315else
3316 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003317LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003318cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003319#line 3320 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003320#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003321/* Override any gcc2 internal prototype to avoid an error. */
3322/* We use char because int might match the return type of a gcc2
3323 builtin and then its argument prototype would still apply. */
3324char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003325
Guido van Rossumf78abae1997-01-21 22:02:36 +00003326int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003327usconfig()
3328; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003330if { (eval echo configure:3331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003331 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003332 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003333else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003334 echo "configure: failed program was:" >&5
3335 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003337 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003338fi
3339rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003340LIBS="$ac_save_LIBS"
3341
3342fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003344 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345 cat >> confdefs.h <<\EOF
3346#define WITH_THREAD 1
3347EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003348
Guido van Rossum7f43da71994-08-01 12:15:30 +00003349LIBS="$LIBS -lmpc"
3350LIBOBJS="$LIBOBJS thread.o"
3351else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003352 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003353fi
3354
Guido van Rossumf78abae1997-01-21 22:02:36 +00003355echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003356echo "configure:3357: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003357ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00003358if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003359 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360else
3361 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003362LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003364#line 3365 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003365#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366/* Override any gcc2 internal prototype to avoid an error. */
3367/* We use char because int might match the return type of a gcc2
3368 builtin and then its argument prototype would still apply. */
3369char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003370
Guido van Rossumf78abae1997-01-21 22:02:36 +00003371int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003372thr_create()
3373; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003374EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003375if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003376 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003377 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003379 echo "configure: failed program was:" >&5
3380 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003381 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003382 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003383fi
3384rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385LIBS="$ac_save_LIBS"
3386
3387fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003388if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003389 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003390 cat >> confdefs.h <<\EOF
3391#define WITH_THREAD 1
3392EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003393
Guido van Rossum7f43da71994-08-01 12:15:30 +00003394LIBS="$LIBS -lthread"
3395LIBOBJS="$LIBOBJS thread.o"
3396else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003397 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003398fi
3399
Guido van Rossum7f43da71994-08-01 12:15:30 +00003400
Guido van Rossumda88dad1995-01-26 00:46:29 +00003401else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003402 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003403fi
3404
Guido van Rossum7f43da71994-08-01 12:15:30 +00003405
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003406# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003407
3408DLINCLDIR=/
3409
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003410echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003411echo "configure:3412: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003413if test "${with_sgi_dl+set}" = set; then
3414 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003415
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003416echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417cat >> confdefs.h <<\EOF
3418#define WITH_SGI_DL 1
3419EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003420
Guido van Rossume97ee181999-12-20 21:27:22 +00003421DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003422dldir=$withval
3423if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003424then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003425else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003426fi
3427DLINCLDIR=${dldir}
3428LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003429else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003430 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003431fi
3432
3433
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003434echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003435echo "configure:3436: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003436# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003437if test "${with_dl_dld+set}" = set; then
3438 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003439
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003440echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003441cat >> confdefs.h <<\EOF
3442#define WITH_DL_DLD 1
3443EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003444
Guido van Rossume97ee181999-12-20 21:27:22 +00003445DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003446dldir=`echo "$withval" | sed 's/,.*//'`
3447dlddir=`echo "$withval" | sed 's/.*,//'`
3448if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003449then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003450else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003451fi
3452DLINCLDIR=${dldir}
3453LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003454else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003455 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003456fi
3457
3458
Guido van Rossume97ee181999-12-20 21:27:22 +00003459# the dlopen() function means we might want to use dynload_shlib.o. some
3460# platforms, such as AIX, have dlopen(), but don't want to use it.
3461echo $ac_n "checking for dlopen""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003462echo "configure:3463: checking for dlopen" >&5
3463if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003464 echo $ac_n "(cached) $ac_c" 1>&6
3465else
3466 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003467#line 3468 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003468#include "confdefs.h"
3469/* System header to define __stub macros and hopefully few prototypes,
3470 which can conflict with char dlopen(); below. */
3471#include <assert.h>
3472/* Override any gcc2 internal prototype to avoid an error. */
3473/* We use char because int might match the return type of a gcc2
3474 builtin and then its argument prototype would still apply. */
3475char dlopen();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003476char (*f)();
Guido van Rossume97ee181999-12-20 21:27:22 +00003477
3478int main() {
3479
3480/* The GNU C library defines this for functions which it implements
3481 to always fail with ENOSYS. Some functions are actually named
3482 something starting with __ and the normal name is an alias. */
3483#if defined (__stub_dlopen) || defined (__stub___dlopen)
3484choke me
3485#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00003486f = dlopen;
Guido van Rossume97ee181999-12-20 21:27:22 +00003487#endif
3488
3489; return 0; }
3490EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003491if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003492 rm -rf conftest*
3493 eval "ac_cv_func_dlopen=yes"
3494else
3495 echo "configure: failed program was:" >&5
3496 cat conftest.$ac_ext >&5
3497 rm -rf conftest*
3498 eval "ac_cv_func_dlopen=no"
3499fi
3500rm -f conftest*
3501fi
3502
3503if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
3504 echo "$ac_t""yes" 1>&6
3505 :
3506else
3507 echo "$ac_t""no" 1>&6
3508fi
3509
3510
3511# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3512# loading of modules.
3513
3514echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003515echo "configure:3516: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003516if test -z "$DYNLOADFILE"
3517then
3518 case $ac_sys_system/$ac_sys_release in
3519 AIX*) DYNLOADFILE="dynload_aix.o";;
3520 BeOS*) DYNLOADFILE="dynload_beos.o";;
3521 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3522 next/*) DYNLOADFILE="dynload_next.o";;
3523 *)
3524 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3525 # out any dynamic loading
3526 if test "$ac_cv_func_dlopen" = yes
3527 then DYNLOADFILE="dynload_shlib.o"
3528 else DYNLOADFILE="dynload_stub.o"
3529 fi
3530 ;;
3531 esac
3532fi
3533echo "$ac_t""$DYNLOADFILE" 1>&6
3534if test "$DYNLOADFILE" != "dynload_stub.o"
3535then
3536 cat >> confdefs.h <<\EOF
3537#define HAVE_DYNAMIC_LOADING 1
3538EOF
3539
3540fi
3541
Guido van Rossum627b2d71993-12-24 10:39:16 +00003542# checks for library functions
Fred Drake35a092f1999-12-13 16:23:35 +00003543for ac_func in alarm chown clock confstr ctermid ctermid_r dlopen execv \
3544 flock fork fsync fdatasync fpathconf ftime ftruncate \
Fred Drakef581db11999-12-14 21:11:47 +00003545 getgroups getlogin getpeername getpgrp getpid getpwent gettimeofday getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003546 kill link lstat mkfifo mktime mremap \
3547 nice pathconf pause plock pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003548 putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00003549 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003550 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003551 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
3552 truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00003553do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003554echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003555echo "configure:3556: checking for $ac_func" >&5
3556if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003557 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003558else
3559 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003560#line 3561 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003561#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003562/* System header to define __stub macros and hopefully few prototypes,
3563 which can conflict with char $ac_func(); below. */
3564#include <assert.h>
3565/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003566/* We use char because int might match the return type of a gcc2
3567 builtin and then its argument prototype would still apply. */
3568char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003569char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003570
Guido van Rossumf78abae1997-01-21 22:02:36 +00003571int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003572
Guido van Rossum627b2d71993-12-24 10:39:16 +00003573/* The GNU C library defines this for functions which it implements
3574 to always fail with ENOSYS. Some functions are actually named
3575 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003576#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003577choke me
3578#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00003579f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003580#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003581
Guido van Rossum7f43da71994-08-01 12:15:30 +00003582; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003583EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003584if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003585 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003586 eval "ac_cv_func_$ac_func=yes"
3587else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003588 echo "configure: failed program was:" >&5
3589 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003590 rm -rf conftest*
3591 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003592fi
3593rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003594fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003595
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003596if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003597 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003598 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003599 cat >> confdefs.h <<EOF
3600#define $ac_tr_func 1
3601EOF
3602
3603else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003604 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003605fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003606done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003607
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003608
Fred Drake8cef4cf2000-06-28 16:40:38 +00003609# check for openpty and forkpty
3610
3611for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003612do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003613echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003614echo "configure:3615: checking for $ac_func" >&5
3615if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003616 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003617else
3618 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003619#line 3620 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003620#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003621/* System header to define __stub macros and hopefully few prototypes,
3622 which can conflict with char $ac_func(); below. */
3623#include <assert.h>
3624/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003625/* We use char because int might match the return type of a gcc2
3626 builtin and then its argument prototype would still apply. */
3627char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003628char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003629
Guido van Rossumf78abae1997-01-21 22:02:36 +00003630int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003631
Guido van Rossum627b2d71993-12-24 10:39:16 +00003632/* The GNU C library defines this for functions which it implements
3633 to always fail with ENOSYS. Some functions are actually named
3634 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003635#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003636choke me
3637#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00003638f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003639#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003640
Guido van Rossum7f43da71994-08-01 12:15:30 +00003641; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003642EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003643if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3644 rm -rf conftest*
3645 eval "ac_cv_func_$ac_func=yes"
3646else
3647 echo "configure: failed program was:" >&5
3648 cat conftest.$ac_ext >&5
3649 rm -rf conftest*
3650 eval "ac_cv_func_$ac_func=no"
3651fi
3652rm -f conftest*
3653fi
3654
3655if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3656 echo "$ac_t""yes" 1>&6
3657 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3658 cat >> confdefs.h <<EOF
3659#define $ac_tr_func 1
3660EOF
3661
3662else
3663 echo "$ac_t""no" 1>&6
3664echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
3665echo "configure:3666: checking for openpty in -lutil" >&5
3666ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
3667if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3668 echo $ac_n "(cached) $ac_c" 1>&6
3669else
3670 ac_save_LIBS="$LIBS"
3671LIBS="-lutil $LIBS"
3672cat > conftest.$ac_ext <<EOF
3673#line 3674 "configure"
3674#include "confdefs.h"
3675/* Override any gcc2 internal prototype to avoid an error. */
3676/* We use char because int might match the return type of a gcc2
3677 builtin and then its argument prototype would still apply. */
3678char openpty();
3679
3680int main() {
3681openpty()
3682; return 0; }
3683EOF
3684if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3685 rm -rf conftest*
3686 eval "ac_cv_lib_$ac_lib_var=yes"
3687else
3688 echo "configure: failed program was:" >&5
3689 cat conftest.$ac_ext >&5
3690 rm -rf conftest*
3691 eval "ac_cv_lib_$ac_lib_var=no"
3692fi
3693rm -f conftest*
3694LIBS="$ac_save_LIBS"
3695
3696fi
3697if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3698 echo "$ac_t""yes" 1>&6
3699 cat >> confdefs.h <<\EOF
3700#define HAVE_OPENPTY 1
3701EOF
3702 LIBS="$LIBS -lutil"
3703else
3704 echo "$ac_t""no" 1>&6
3705fi
3706
3707fi
3708done
3709
3710for ac_func in forkpty
3711do
3712echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3713echo "configure:3714: checking for $ac_func" >&5
3714if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3715 echo $ac_n "(cached) $ac_c" 1>&6
3716else
3717 cat > conftest.$ac_ext <<EOF
3718#line 3719 "configure"
3719#include "confdefs.h"
3720/* System header to define __stub macros and hopefully few prototypes,
3721 which can conflict with char $ac_func(); below. */
3722#include <assert.h>
3723/* Override any gcc2 internal prototype to avoid an error. */
3724/* We use char because int might match the return type of a gcc2
3725 builtin and then its argument prototype would still apply. */
3726char $ac_func();
3727char (*f)();
3728
3729int main() {
3730
3731/* The GNU C library defines this for functions which it implements
3732 to always fail with ENOSYS. Some functions are actually named
3733 something starting with __ and the normal name is an alias. */
3734#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3735choke me
3736#else
3737f = $ac_func;
3738#endif
3739
3740; return 0; }
3741EOF
3742if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3743 rm -rf conftest*
3744 eval "ac_cv_func_$ac_func=yes"
3745else
3746 echo "configure: failed program was:" >&5
3747 cat conftest.$ac_ext >&5
3748 rm -rf conftest*
3749 eval "ac_cv_func_$ac_func=no"
3750fi
3751rm -f conftest*
3752fi
3753
3754if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3755 echo "$ac_t""yes" 1>&6
3756 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3757 cat >> confdefs.h <<EOF
3758#define $ac_tr_func 1
3759EOF
3760
3761else
3762 echo "$ac_t""no" 1>&6
3763echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
3764echo "configure:3765: checking for forkpty in -lutil" >&5
3765ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
3766if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3767 echo $ac_n "(cached) $ac_c" 1>&6
3768else
3769 ac_save_LIBS="$LIBS"
3770LIBS="-lutil $LIBS"
3771cat > conftest.$ac_ext <<EOF
3772#line 3773 "configure"
3773#include "confdefs.h"
3774/* Override any gcc2 internal prototype to avoid an error. */
3775/* We use char because int might match the return type of a gcc2
3776 builtin and then its argument prototype would still apply. */
3777char forkpty();
3778
3779int main() {
3780forkpty()
3781; return 0; }
3782EOF
3783if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3784 rm -rf conftest*
3785 eval "ac_cv_lib_$ac_lib_var=yes"
3786else
3787 echo "configure: failed program was:" >&5
3788 cat conftest.$ac_ext >&5
3789 rm -rf conftest*
3790 eval "ac_cv_lib_$ac_lib_var=no"
3791fi
3792rm -f conftest*
3793LIBS="$ac_save_LIBS"
3794
3795fi
3796if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3797 echo "$ac_t""yes" 1>&6
3798 cat >> confdefs.h <<\EOF
3799#define HAVE_FORKPTY 1
3800EOF
3801 LIBS="$LIBS -lutil"
3802else
3803 echo "$ac_t""no" 1>&6
3804fi
3805
3806fi
3807done
3808
3809
3810# check for long file support functions
3811for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
3812do
3813echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3814echo "configure:3815: checking for $ac_func" >&5
3815if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3816 echo $ac_n "(cached) $ac_c" 1>&6
3817else
3818 cat > conftest.$ac_ext <<EOF
3819#line 3820 "configure"
3820#include "confdefs.h"
3821/* System header to define __stub macros and hopefully few prototypes,
3822 which can conflict with char $ac_func(); below. */
3823#include <assert.h>
3824/* Override any gcc2 internal prototype to avoid an error. */
3825/* We use char because int might match the return type of a gcc2
3826 builtin and then its argument prototype would still apply. */
3827char $ac_func();
3828char (*f)();
3829
3830int main() {
3831
3832/* The GNU C library defines this for functions which it implements
3833 to always fail with ENOSYS. Some functions are actually named
3834 something starting with __ and the normal name is an alias. */
3835#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3836choke me
3837#else
3838f = $ac_func;
3839#endif
3840
3841; return 0; }
3842EOF
3843if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003844 rm -rf conftest*
3845 eval "ac_cv_func_$ac_func=yes"
3846else
3847 echo "configure: failed program was:" >&5
3848 cat conftest.$ac_ext >&5
3849 rm -rf conftest*
3850 eval "ac_cv_func_$ac_func=no"
3851fi
3852rm -f conftest*
3853fi
3854
3855if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3856 echo "$ac_t""yes" 1>&6
3857 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3858 cat >> confdefs.h <<EOF
3859#define $ac_tr_func 1
3860EOF
3861
3862else
3863 echo "$ac_t""no" 1>&6
3864fi
3865done
3866
3867
3868for ac_func in dup2 getcwd strdup strerror memmove
3869do
3870echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003871echo "configure:3872: checking for $ac_func" >&5
3872if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003873 echo $ac_n "(cached) $ac_c" 1>&6
3874else
3875 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003876#line 3877 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003877#include "confdefs.h"
3878/* System header to define __stub macros and hopefully few prototypes,
3879 which can conflict with char $ac_func(); below. */
3880#include <assert.h>
3881/* Override any gcc2 internal prototype to avoid an error. */
3882/* We use char because int might match the return type of a gcc2
3883 builtin and then its argument prototype would still apply. */
3884char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003885char (*f)();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003886
3887int main() {
3888
3889/* The GNU C library defines this for functions which it implements
3890 to always fail with ENOSYS. Some functions are actually named
3891 something starting with __ and the normal name is an alias. */
3892#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3893choke me
3894#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00003895f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003896#endif
3897
3898; return 0; }
3899EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003900if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003901 rm -rf conftest*
3902 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003903else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003904 echo "configure: failed program was:" >&5
3905 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003906 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003907 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003908fi
3909rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003911
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003913 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003914 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3915 cat >> confdefs.h <<EOF
3916#define $ac_tr_func 1
3917EOF
3918
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003919else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003920 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003922fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003923done
3924
Guido van Rossumf78abae1997-01-21 22:02:36 +00003925
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003926echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003927echo "configure:3928: checking for getpgrp" >&5
3928if eval "test \"\${ac_cv_func_getpgrp+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003929 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003930else
3931 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003932#line 3933 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003933#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003934/* System header to define __stub macros and hopefully few prototypes,
3935 which can conflict with char getpgrp(); below. */
3936#include <assert.h>
3937/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003938/* We use char because int might match the return type of a gcc2
3939 builtin and then its argument prototype would still apply. */
3940char getpgrp();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003941char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003942
Guido van Rossumf78abae1997-01-21 22:02:36 +00003943int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003944
Guido van Rossum627b2d71993-12-24 10:39:16 +00003945/* The GNU C library defines this for functions which it implements
3946 to always fail with ENOSYS. Some functions are actually named
3947 something starting with __ and the normal name is an alias. */
3948#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
3949choke me
3950#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00003951f = getpgrp;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003952#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003953
3954; return 0; }
3955EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003956if { (eval echo configure:3957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957 rm -rf conftest*
3958 eval "ac_cv_func_getpgrp=yes"
3959else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003960 echo "configure: failed program was:" >&5
3961 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003962 rm -rf conftest*
3963 eval "ac_cv_func_getpgrp=no"
3964fi
3965rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003966fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003967
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003968if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003969 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003971#line 3972 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003972#include "confdefs.h"
3973#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003974int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003975getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003976; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003977EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003978if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003979 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980 cat >> confdefs.h <<\EOF
3981#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003982EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003983
Guido van Rossumf78abae1997-01-21 22:02:36 +00003984else
3985 echo "configure: failed program was:" >&5
3986 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003987fi
3988rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003990 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003991fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003992
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003993echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00003994echo "configure:3995: checking for setpgrp" >&5
3995if eval "test \"\${ac_cv_func_setpgrp+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003996 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997else
3998 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00003999#line 4000 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004000#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004001/* System header to define __stub macros and hopefully few prototypes,
4002 which can conflict with char setpgrp(); below. */
4003#include <assert.h>
4004/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004005/* We use char because int might match the return type of a gcc2
4006 builtin and then its argument prototype would still apply. */
4007char setpgrp();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004008char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004009
Guido van Rossumf78abae1997-01-21 22:02:36 +00004010int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004011
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004012/* The GNU C library defines this for functions which it implements
4013 to always fail with ENOSYS. Some functions are actually named
4014 something starting with __ and the normal name is an alias. */
4015#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
4016choke me
4017#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00004018f = setpgrp;
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004019#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004020
4021; return 0; }
4022EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004023if { (eval echo configure:4024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024 rm -rf conftest*
4025 eval "ac_cv_func_setpgrp=yes"
4026else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004027 echo "configure: failed program was:" >&5
4028 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004029 rm -rf conftest*
4030 eval "ac_cv_func_setpgrp=no"
4031fi
4032rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004036 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004037 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004038#line 4039 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039#include "confdefs.h"
4040#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004041int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004042setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004043; return 0; }
4044EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004045if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004046 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047 cat >> confdefs.h <<\EOF
4048#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004049EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004050
Guido van Rossumf78abae1997-01-21 22:02:36 +00004051else
4052 echo "configure: failed program was:" >&5
4053 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004054fi
4055rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004057 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004058fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004059
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004060echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004061echo "configure:4062: checking for gettimeofday" >&5
4062if eval "test \"\${ac_cv_func_gettimeofday+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004063 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004064else
4065 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004066#line 4067 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004067#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004068/* System header to define __stub macros and hopefully few prototypes,
4069 which can conflict with char gettimeofday(); below. */
4070#include <assert.h>
4071/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004072/* We use char because int might match the return type of a gcc2
4073 builtin and then its argument prototype would still apply. */
4074char gettimeofday();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004075char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004076
Guido van Rossumf78abae1997-01-21 22:02:36 +00004077int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004078
4079/* The GNU C library defines this for functions which it implements
4080 to always fail with ENOSYS. Some functions are actually named
4081 something starting with __ and the normal name is an alias. */
4082#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
4083choke me
4084#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00004085f = gettimeofday;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004086#endif
4087
4088; return 0; }
4089EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004090if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091 rm -rf conftest*
4092 eval "ac_cv_func_gettimeofday=yes"
4093else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004094 echo "configure: failed program was:" >&5
4095 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096 rm -rf conftest*
4097 eval "ac_cv_func_gettimeofday=no"
4098fi
4099rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004102if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004103 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004105#line 4106 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004106#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004107#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004108int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004109gettimeofday((struct timeval*)0,(struct timezone*)0);
4110; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004111EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004112if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004113 :
4114else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004115 echo "configure: failed program was:" >&5
4116 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004117 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004118 cat >> confdefs.h <<\EOF
4119#define GETTIMEOFDAY_NO_TZ 1
4120EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004121
4122fi
4123rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004125 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004126fi
4127
4128
4129# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004130echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004131echo "configure:4132: checking whether time.h and sys/time.h may both be included" >&5
4132if eval "test \"\${ac_cv_header_time+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004133 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134else
4135 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004136#line 4137 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004137#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004138#include <sys/types.h>
4139#include <sys/time.h>
4140#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004141int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142struct tm *tp;
4143; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004144EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004145if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004146 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004148else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004149 echo "configure: failed program was:" >&5
4150 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004151 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004153fi
4154rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004156
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004157echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158if test $ac_cv_header_time = yes; then
4159 cat >> confdefs.h <<\EOF
4160#define TIME_WITH_SYS_TIME 1
4161EOF
4162
4163fi
4164
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004165echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004166echo "configure:4167: checking whether struct tm is in sys/time.h or time.h" >&5
4167if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004168 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169else
4170 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004171#line 4172 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172#include "confdefs.h"
4173#include <sys/types.h>
4174#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004175int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004176struct tm *tp; tp->tm_sec;
4177; return 0; }
4178EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004179if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004180 rm -rf conftest*
4181 ac_cv_struct_tm=time.h
4182else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004183 echo "configure: failed program was:" >&5
4184 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185 rm -rf conftest*
4186 ac_cv_struct_tm=sys/time.h
4187fi
4188rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004189fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004190
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004191echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192if test $ac_cv_struct_tm = sys/time.h; then
4193 cat >> confdefs.h <<\EOF
4194#define TM_IN_SYS_TIME 1
4195EOF
4196
4197fi
4198
Fred Drake8cef4cf2000-06-28 16:40:38 +00004199echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6
4200echo "configure:4201: checking for member tm_zone in aggregate type struct tm" >&5
4201if eval "test \"\${ac_cv_c_struct_member_tm_zone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004202 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203else
4204 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004205#line 4206 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206#include "confdefs.h"
4207#include <sys/types.h>
4208#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004209int main() {
Fred Drake8cef4cf2000-06-28 16:40:38 +00004210struct tm foo; foo.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211; return 0; }
4212EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004213if { (eval echo configure:4214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00004215 ac_cv_c_struct_member_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004217 echo "configure: failed program was:" >&5
4218 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00004220 ac_cv_c_struct_member_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221fi
4222rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004224
Fred Drake8cef4cf2000-06-28 16:40:38 +00004225echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6
4226tm_zone="$ac_cv_c_struct_member_tm_zone"
4227if test "$ac_cv_c_struct_member_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004228 cat >> confdefs.h <<\EOF
4229#define HAVE_TM_ZONE 1
4230EOF
4231
4232else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004233 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004234echo "configure:4235: checking for tzname" >&5
4235if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004236 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237else
4238 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004239#line 4240 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240#include "confdefs.h"
4241#include <time.h>
4242#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004244#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004245int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246atoi(*tzname);
4247; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004249if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004251 ac_cv_var_tzname=yes
4252else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253 echo "configure: failed program was:" >&5
4254 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255 rm -rf conftest*
4256 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257fi
4258rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004260
4261echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262 if test $ac_cv_var_tzname = yes; then
4263 cat >> confdefs.h <<\EOF
4264#define HAVE_TZNAME 1
4265EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004266
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267 fi
4268fi
4269
4270
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004271echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004272echo "configure:4273: checking for time.h that defines altzone" >&5
4273if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004274 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275else
4276 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004277#line 4278 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004278#include "confdefs.h"
4279#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004280int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281return altzone;
4282; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004283EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004284if { (eval echo configure:4285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004285 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286 ac_cv_header_time_altzone=yes
4287else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004288 echo "configure: failed program was:" >&5
4289 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290 rm -rf conftest*
4291 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004292fi
4293rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294fi
4295
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004296echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004297if test $ac_cv_header_time_altzone = yes; then
4298 cat >> confdefs.h <<\EOF
4299#define HAVE_ALTZONE 1
4300EOF
4301
4302fi
4303
Guido van Rossumda88dad1995-01-26 00:46:29 +00004304was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004305echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004306echo "configure:4307: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004308#line 4309 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004309#include "confdefs.h"
4310
4311#include <sys/types.h>
4312#include <sys/select.h>
4313#include <sys/time.h>
4314
Guido van Rossumf78abae1997-01-21 22:02:36 +00004315int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316;
4317; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004318EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004319if { (eval echo configure:4320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004320 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321 cat >> confdefs.h <<\EOF
4322#define SYS_SELECT_WITH_SYS_TIME 1
4323EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004324 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004325else
4326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004328fi
4329rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004330echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004331
4332# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004333
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004334echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004335echo "configure:4336: checking whether char is unsigned" >&5
4336if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004337 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004338else
4339 if test "$GCC" = yes; then
4340 # GCC predefines this symbol on systems where it applies.
4341cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004342#line 4343 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004343#include "confdefs.h"
4344#ifdef __CHAR_UNSIGNED__
4345 yes
4346#endif
4347
4348EOF
4349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4350 egrep "yes" >/dev/null 2>&1; then
4351 rm -rf conftest*
4352 ac_cv_c_char_unsigned=yes
4353else
4354 rm -rf conftest*
4355 ac_cv_c_char_unsigned=no
4356fi
4357rm -f conftest*
4358
4359else
4360if test "$cross_compiling" = yes; then
4361 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4362else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004363 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004364#line 4365 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004365#include "confdefs.h"
4366/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004368#define volatile
4369#endif
4370main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004371 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004372}
4373EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004374if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00004375then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004376 ac_cv_c_char_unsigned=yes
4377else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004378 echo "configure: failed program was:" >&5
4379 cat conftest.$ac_ext >&5
4380 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381 ac_cv_c_char_unsigned=no
4382fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004383rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004385
4386fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004387fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004388
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004389echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4391 cat >> confdefs.h <<\EOF
4392#define __CHAR_UNSIGNED__ 1
4393EOF
4394
4395fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004396
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004397echo $ac_n "checking for working const""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004398echo "configure:4399: checking for working const" >&5
4399if eval "test \"\${ac_cv_c_const+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004400 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401else
4402 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004403#line 4404 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404#include "confdefs.h"
4405
Guido van Rossumf78abae1997-01-21 22:02:36 +00004406int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407
4408/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004409typedef int charset[2]; const charset x;
4410/* SunOS 4.1.1 cc rejects this. */
4411char const *const *ccp;
4412char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413/* NEC SVR4.0.2 mips cc rejects this. */
4414struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004415static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004416/* AIX XL C 1.02.0.0 rejects this.
4417 It does not let you subtract one const X* pointer from another in an arm
4418 of an if-expression whose if-part is not a constant expression */
4419const char *g = "string";
4420ccp = &g + (g ? g-g : 0);
4421/* HPUX 7.0 cc rejects these. */
4422++ccp;
4423p = (char**) ccp;
4424ccp = (char const *const *) p;
4425{ /* SCO 3.2v4 cc rejects this. */
4426 char *t;
4427 char const *s = 0 ? (char *) 0 : (char const *) 0;
4428
4429 *t++ = 0;
4430}
4431{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004432 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004433 const int *foo = &x[0];
4434 ++foo;
4435}
4436{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4437 typedef const int *iptr;
4438 iptr p = 0;
4439 ++p;
4440}
4441{ /* AIX XL C 1.02.0.0 rejects this saying
4442 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4443 struct s { int j; const int *ap[3]; };
4444 struct s *b; b->j = 5;
4445}
4446{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4447 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004448}
4449
4450; return 0; }
4451EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004452if { (eval echo configure:4453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004453 rm -rf conftest*
4454 ac_cv_c_const=yes
4455else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004456 echo "configure: failed program was:" >&5
4457 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458 rm -rf conftest*
4459 ac_cv_c_const=no
4460fi
4461rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004462fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004463
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004464echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004465if test $ac_cv_c_const = no; then
4466 cat >> confdefs.h <<\EOF
4467#define const
4468EOF
4469
4470fi
4471
Guido van Rossumef2255b2000-03-10 22:30:29 +00004472echo $ac_n "checking for inline""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004473echo "configure:4474: checking for inline" >&5
4474if eval "test \"\${ac_cv_c_inline+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004475 echo $ac_n "(cached) $ac_c" 1>&6
4476else
4477 ac_cv_c_inline=no
4478for ac_kw in inline __inline__ __inline; do
4479 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004480#line 4481 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004481#include "confdefs.h"
4482
4483int main() {
4484} $ac_kw foo() {
4485; return 0; }
4486EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004487if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004488 rm -rf conftest*
4489 ac_cv_c_inline=$ac_kw; break
4490else
4491 echo "configure: failed program was:" >&5
4492 cat conftest.$ac_ext >&5
4493fi
4494rm -f conftest*
4495done
4496
4497fi
4498
4499echo "$ac_t""$ac_cv_c_inline" 1>&6
4500case "$ac_cv_c_inline" in
4501 inline | yes) ;;
4502 no) cat >> confdefs.h <<\EOF
4503#define inline
4504EOF
4505 ;;
4506 *) cat >> confdefs.h <<EOF
4507#define inline $ac_cv_c_inline
4508EOF
4509 ;;
4510esac
4511
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004512
Guido van Rossumda88dad1995-01-26 00:46:29 +00004513works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004514echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004515echo "configure:4516: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004516cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004517#line 4518 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004518#include "confdefs.h"
4519
Guido van Rossumf78abae1997-01-21 22:02:36 +00004520int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521volatile int x; x = 0;
4522; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004523EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004524if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004525 rm -rf conftest*
4526 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004527else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004530 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004531 cat >> confdefs.h <<\EOF
4532#define volatile
4533EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004534
4535fi
4536rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004537echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004538
Guido van Rossumda88dad1995-01-26 00:46:29 +00004539works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004540echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004541echo "configure:4542: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004543#line 4544 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004544#include "confdefs.h"
4545
Guido van Rossumf78abae1997-01-21 22:02:36 +00004546int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004547signed char c;
4548; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004549EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004550if { (eval echo configure:4551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004551 rm -rf conftest*
4552 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004553else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004554 echo "configure: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004556 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557 cat >> confdefs.h <<\EOF
4558#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004559EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004560
4561fi
4562rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004563echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004564
Guido van Rossumda88dad1995-01-26 00:46:29 +00004565have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004566echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004567echo "configure:4568: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004568cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004569#line 4570 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004570#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004571int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004572int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004573return foo(10);
4574; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004575EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004576if { (eval echo configure:4577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004577 rm -rf conftest*
4578 cat >> confdefs.h <<\EOF
4579#define HAVE_PROTOTYPES 1
4580EOF
4581 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004582else
4583 echo "configure: failed program was:" >&5
4584 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004585fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004586rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004587echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004588
Guido van Rossumda88dad1995-01-26 00:46:29 +00004589works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004590echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004591echo "configure:4592: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004592cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004593#line 4594 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004594#include "confdefs.h"
4595
4596#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004597int foo(int x, ...) {
4598 va_list va;
4599 va_start(va, x);
4600 va_arg(va, int);
4601 va_arg(va, char *);
4602 va_arg(va, double);
4603 return 0;
4604}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004605
Guido van Rossumf78abae1997-01-21 22:02:36 +00004606int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004607return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004609EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004610if { (eval echo configure:4611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004611 rm -rf conftest*
4612 cat >> confdefs.h <<\EOF
4613#define HAVE_STDARG_PROTOTYPES 1
4614EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004615 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004616else
4617 echo "configure: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004619fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004620rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004621echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622
Guido van Rossumda88dad1995-01-26 00:46:29 +00004623if test "$have_prototypes" = yes; then
4624bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004625echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004626echo "configure:4627: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004628#line 4629 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004629#include "confdefs.h"
4630#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004631int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004632char **t;execve("@",t,t);
4633; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004634EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004635if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004636 :
4637else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004638 echo "configure: failed program was:" >&5
4639 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004640 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641 cat >> confdefs.h <<\EOF
4642#define BAD_EXEC_PROTOTYPES 1
4643EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004644 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004645fi
4646rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004647echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004648fi
4649
Guido van Rossumda88dad1995-01-26 00:46:29 +00004650bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004651echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004652echo "configure:4653: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004653if test "$cross_compiling" = yes; then
4654 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4655else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004656 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004657#line 4658 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004658#include "confdefs.h"
4659
4660struct s { int a; int b; };
4661static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662int foobar() {
4663 static int random;
4664 random = (int) &foo;
4665 return random;
4666}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004667static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004668main() {
4669 exit(!((int)&foo == foobar()));
4670}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004671
4672EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004673if { (eval echo configure:4674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00004674then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004675 :
4676else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004677 echo "configure: failed program was:" >&5
4678 cat conftest.$ac_ext >&5
4679 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004680 cat >> confdefs.h <<\EOF
4681#define BAD_STATIC_FORWARD 1
4682EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004683 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004684fi
4685rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004686fi
4687
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004688echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004689
Guido van Rossumda88dad1995-01-26 00:46:29 +00004690va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004691echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004692echo "configure:4693: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004693cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004694#line 4695 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004695#include "confdefs.h"
4696
4697#ifdef HAVE_STDARG_PROTOTYPES
4698#include <stdarg.h>
4699#else
4700#include <varargs.h>
4701#endif
4702
Guido van Rossumf78abae1997-01-21 22:02:36 +00004703int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004704va_list list1, list2; list1 = list2;
4705; return 0; }
4706EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004707if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004708 :
4709else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004710 echo "configure: failed program was:" >&5
4711 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004712 rm -rf conftest*
4713 cat >> confdefs.h <<\EOF
4714#define VA_LIST_IS_ARRAY 1
4715EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004716 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004717fi
4718rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004719echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004720
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004721# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4722echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004723echo "configure:4724: checking for gethostbyname_r" >&5
4724if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004725 echo $ac_n "(cached) $ac_c" 1>&6
4726else
4727 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004728#line 4729 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004729#include "confdefs.h"
4730/* System header to define __stub macros and hopefully few prototypes,
4731 which can conflict with char gethostbyname_r(); below. */
4732#include <assert.h>
4733/* Override any gcc2 internal prototype to avoid an error. */
4734/* We use char because int might match the return type of a gcc2
4735 builtin and then its argument prototype would still apply. */
4736char gethostbyname_r();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004737char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004738
4739int main() {
4740
4741/* The GNU C library defines this for functions which it implements
4742 to always fail with ENOSYS. Some functions are actually named
4743 something starting with __ and the normal name is an alias. */
4744#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
4745choke me
4746#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00004747f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004748#endif
4749
4750; return 0; }
4751EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004752if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004753 rm -rf conftest*
4754 eval "ac_cv_func_gethostbyname_r=yes"
4755else
4756 echo "configure: failed program was:" >&5
4757 cat conftest.$ac_ext >&5
4758 rm -rf conftest*
4759 eval "ac_cv_func_gethostbyname_r=no"
4760fi
4761rm -f conftest*
4762fi
4763
4764if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
4765 echo "$ac_t""yes" 1>&6
4766
4767 cat >> confdefs.h <<\EOF
4768#define HAVE_GETHOSTBYNAME_R 1
4769EOF
4770
4771 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004772echo "configure:4773: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004773 OLD_CFLAGS=$CFLAGS
4774 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
4775 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004776#line 4777 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004777#include "confdefs.h"
4778
4779# include <netdb.h>
4780
4781int main() {
4782
4783 char *name;
4784 struct hostent *he, *res;
4785 char buffer[2048];
4786 int buflen = 2048;
4787 int h_errnop;
4788
4789 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
4790
4791; return 0; }
4792EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004793if { (eval echo configure:4794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004794 rm -rf conftest*
4795
4796 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004797#define HAVE_GETHOSTBYNAME_R 1
4798EOF
4799
4800 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004801#define HAVE_GETHOSTBYNAME_R_6_ARG 1
4802EOF
4803
4804 echo "$ac_t""yes" 1>&6
4805
4806else
4807 echo "configure: failed program was:" >&5
4808 cat conftest.$ac_ext >&5
4809 rm -rf conftest*
4810
4811 echo "$ac_t""no" 1>&6
4812 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004813echo "configure:4814: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004814 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004815#line 4816 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004816#include "confdefs.h"
4817
4818# include <netdb.h>
4819
4820int main() {
4821
4822 char *name;
4823 struct hostent *he;
4824 char buffer[2048];
4825 int buflen = 2048;
4826 int h_errnop;
4827
4828 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
4829
4830; return 0; }
4831EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004832if { (eval echo configure:4833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004833 rm -rf conftest*
4834
4835 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004836#define HAVE_GETHOSTBYNAME_R 1
4837EOF
4838
4839 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004840#define HAVE_GETHOSTBYNAME_R_5_ARG 1
4841EOF
4842
4843 echo "$ac_t""yes" 1>&6
4844
4845else
4846 echo "configure: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 rm -rf conftest*
4849
4850 echo "$ac_t""no" 1>&6
4851 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004852echo "configure:4853: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004853 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004854#line 4855 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004855#include "confdefs.h"
4856
4857# include <netdb.h>
4858
4859int main() {
4860
4861 char *name;
4862 struct hostent *he;
4863 struct hostent_data data;
4864
4865 (void) gethostbyname_r(name, he, &data);
4866
4867; return 0; }
4868EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004869if { (eval echo configure:4870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004870 rm -rf conftest*
4871
4872 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004873#define HAVE_GETHOSTBYNAME_R 1
4874EOF
4875
4876 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004877#define HAVE_GETHOSTBYNAME_R_3_ARG 1
4878EOF
4879
4880 echo "$ac_t""yes" 1>&6
4881
4882else
4883 echo "configure: failed program was:" >&5
4884 cat conftest.$ac_ext >&5
4885 rm -rf conftest*
4886
4887 echo "$ac_t""no" 1>&6
4888
4889fi
4890rm -f conftest*
4891
4892fi
4893rm -f conftest*
4894
4895fi
4896rm -f conftest*
4897 CFLAGS=$OLD_CFLAGS
4898
4899else
4900 echo "$ac_t""no" 1>&6
4901
4902 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004903echo "configure:4904: checking for gethostbyname" >&5
4904if eval "test \"\${ac_cv_func_gethostbyname+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004905 echo $ac_n "(cached) $ac_c" 1>&6
4906else
4907 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004908#line 4909 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004909#include "confdefs.h"
4910/* System header to define __stub macros and hopefully few prototypes,
4911 which can conflict with char gethostbyname(); below. */
4912#include <assert.h>
4913/* Override any gcc2 internal prototype to avoid an error. */
4914/* We use char because int might match the return type of a gcc2
4915 builtin and then its argument prototype would still apply. */
4916char gethostbyname();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004917char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004918
4919int main() {
4920
4921/* The GNU C library defines this for functions which it implements
4922 to always fail with ENOSYS. Some functions are actually named
4923 something starting with __ and the normal name is an alias. */
4924#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4925choke me
4926#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00004927f = gethostbyname;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004928#endif
4929
4930; return 0; }
4931EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004932if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004933 rm -rf conftest*
4934 eval "ac_cv_func_gethostbyname=yes"
4935else
4936 echo "configure: failed program was:" >&5
4937 cat conftest.$ac_ext >&5
4938 rm -rf conftest*
4939 eval "ac_cv_func_gethostbyname=no"
4940fi
4941rm -f conftest*
4942fi
4943
4944if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4945 echo "$ac_t""yes" 1>&6
4946 cat >> confdefs.h <<\EOF
4947#define HAVE_GETHOSTBYNAME 1
4948EOF
4949
4950else
4951 echo "$ac_t""no" 1>&6
4952fi
4953
4954
4955fi
4956
4957
4958
4959
4960
4961
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004962
Guido van Rossum627b2d71993-12-24 10:39:16 +00004963# checks for system services
4964# (none yet)
4965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004966# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00004967echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004968echo "configure:4969: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004969ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Fred Drake8cef4cf2000-06-28 16:40:38 +00004970if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004971 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004972else
4973 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004974LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004976#line 4977 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004977#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004978/* Override any gcc2 internal prototype to avoid an error. */
4979/* We use char because int might match the return type of a gcc2
4980 builtin and then its argument prototype would still apply. */
4981char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004982
Guido van Rossumf78abae1997-01-21 22:02:36 +00004983int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984__fpu_control()
4985; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004986EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00004987if { (eval echo configure:4988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004988 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004989 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004990else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004991 echo "configure: failed program was:" >&5
4992 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004993 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004994 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004995fi
4996rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004997LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004998
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004999fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005000if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005001 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005002 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5003 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004 cat >> confdefs.h <<EOF
5005#define $ac_tr_lib 1
5006EOF
5007
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005008 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005009
5010else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005011 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005012fi
5013
5014
Guido van Rossum7f253911997-05-09 02:42:48 +00005015# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005016echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005017echo "configure:5018: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005018# Check whether --with-fpectl or --without-fpectl was given.
5019if test "${with_fpectl+set}" = set; then
5020 withval="$with_fpectl"
5021
5022if test "$withval" != no
5023then cat >> confdefs.h <<\EOF
5024#define WANT_SIGFPE_HANDLER 1
5025EOF
5026 echo "$ac_t""yes" 1>&6
5027else echo "$ac_t""no" 1>&6
5028fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005029else
5030 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005031fi
5032
5033
Guido van Rossum7f43da71994-08-01 12:15:30 +00005034# check for --with-libm=...
5035
Guido van Rossum563e7081996-09-10 18:20:48 +00005036case $ac_sys_system in
5037next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005038BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005039*) LIBM=-lm
5040esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005041echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005042echo "configure:5043: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005043# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005044if test "${with_libm+set}" = set; then
5045 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005046
Guido van Rossum7f253911997-05-09 02:42:48 +00005047if test "$withval" = no
5048then LIBM=
5049 echo "$ac_t""force LIBM empty" 1>&6
5050elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005051then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005052 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005053else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005054fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005055else
5056 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005057fi
5058
5059
5060# check for --with-libc=...
5061
Guido van Rossum7f253911997-05-09 02:42:48 +00005062echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005063echo "configure:5064: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005065if test "${with_libc+set}" = set; then
5066 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005067
Guido van Rossum7f253911997-05-09 02:42:48 +00005068if test "$withval" = no
5069then LIBC=
5070 echo "$ac_t""force LIBC empty" 1>&6
5071elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005072then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005073 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005074else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005075fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005076else
5077 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005078fi
5079
5080
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005081# check for hypot() in math library
5082LIBS_SAVE=$LIBS
5083LIBS="$LIBS $LIBM"
5084for ac_func in hypot
5085do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005086echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005087echo "configure:5088: checking for $ac_func" >&5
5088if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005089 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005090else
5091 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005092#line 5093 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005093#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005094/* System header to define __stub macros and hopefully few prototypes,
5095 which can conflict with char $ac_func(); below. */
5096#include <assert.h>
5097/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005098/* We use char because int might match the return type of a gcc2
5099 builtin and then its argument prototype would still apply. */
5100char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005101char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005102
Guido van Rossumf78abae1997-01-21 22:02:36 +00005103int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005104
5105/* The GNU C library defines this for functions which it implements
5106 to always fail with ENOSYS. Some functions are actually named
5107 something starting with __ and the normal name is an alias. */
5108#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5109choke me
5110#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00005111f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005112#endif
5113
5114; return 0; }
5115EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005116if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005117 rm -rf conftest*
5118 eval "ac_cv_func_$ac_func=yes"
5119else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005120 echo "configure: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005122 rm -rf conftest*
5123 eval "ac_cv_func_$ac_func=no"
5124fi
5125rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005126fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005127
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005128if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005129 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005130 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005131 cat >> confdefs.h <<EOF
5132#define $ac_tr_func 1
5133EOF
5134
5135else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005136 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005137fi
5138done
5139
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005140for ac_func in hypot
5141do
5142echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005143echo "configure:5144: checking for $ac_func" >&5
5144if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005145 echo $ac_n "(cached) $ac_c" 1>&6
5146else
5147 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005148#line 5149 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005149#include "confdefs.h"
5150/* System header to define __stub macros and hopefully few prototypes,
5151 which can conflict with char $ac_func(); below. */
5152#include <assert.h>
5153/* Override any gcc2 internal prototype to avoid an error. */
5154/* We use char because int might match the return type of a gcc2
5155 builtin and then its argument prototype would still apply. */
5156char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005157char (*f)();
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005158
Guido van Rossumf78abae1997-01-21 22:02:36 +00005159int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005160
5161/* The GNU C library defines this for functions which it implements
5162 to always fail with ENOSYS. Some functions are actually named
5163 something starting with __ and the normal name is an alias. */
5164#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5165choke me
5166#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00005167f = $ac_func;
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005168#endif
5169
5170; return 0; }
5171EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005172if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005173 rm -rf conftest*
5174 eval "ac_cv_func_$ac_func=yes"
5175else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005176 echo "configure: failed program was:" >&5
5177 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005178 rm -rf conftest*
5179 eval "ac_cv_func_$ac_func=no"
5180fi
5181rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005182fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005183
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005184if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5185 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005186 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5187 cat >> confdefs.h <<EOF
5188#define $ac_tr_func 1
5189EOF
5190
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005191else
5192 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005193LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005194fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005195done
5196
Guido van Rossumf78abae1997-01-21 22:02:36 +00005197
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005198LIBS=$LIBS_SAVE
5199
Guido van Rossuma28518a2000-05-11 18:41:32 +00005200# check for rint() in math library
5201LIBS_SAVE=$LIBS
5202LIBS="$LIBS $LIBM"
5203for ac_func in rint
5204do
5205echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005206echo "configure:5207: checking for $ac_func" >&5
5207if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossuma28518a2000-05-11 18:41:32 +00005208 echo $ac_n "(cached) $ac_c" 1>&6
5209else
5210 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005211#line 5212 "configure"
Guido van Rossuma28518a2000-05-11 18:41:32 +00005212#include "confdefs.h"
5213/* System header to define __stub macros and hopefully few prototypes,
5214 which can conflict with char $ac_func(); below. */
5215#include <assert.h>
5216/* Override any gcc2 internal prototype to avoid an error. */
5217/* We use char because int might match the return type of a gcc2
5218 builtin and then its argument prototype would still apply. */
5219char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005220char (*f)();
Guido van Rossuma28518a2000-05-11 18:41:32 +00005221
5222int main() {
5223
5224/* The GNU C library defines this for functions which it implements
5225 to always fail with ENOSYS. Some functions are actually named
5226 something starting with __ and the normal name is an alias. */
5227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5228choke me
5229#else
Fred Drake8cef4cf2000-06-28 16:40:38 +00005230f = $ac_func;
Guido van Rossuma28518a2000-05-11 18:41:32 +00005231#endif
5232
5233; return 0; }
5234EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005235if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma28518a2000-05-11 18:41:32 +00005236 rm -rf conftest*
5237 eval "ac_cv_func_$ac_func=yes"
5238else
5239 echo "configure: failed program was:" >&5
5240 cat conftest.$ac_ext >&5
5241 rm -rf conftest*
5242 eval "ac_cv_func_$ac_func=no"
5243fi
5244rm -f conftest*
5245fi
5246
5247if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5248 echo "$ac_t""yes" 1>&6
5249 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5250 cat >> confdefs.h <<EOF
5251#define $ac_tr_func 1
5252EOF
5253
5254else
5255 echo "$ac_t""no" 1>&6
5256fi
5257done
5258
5259LIBS=$LIBS_SAVE
5260
Guido van Rossumda88dad1995-01-26 00:46:29 +00005261# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005262echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005263echo "configure:5264: checking for genuine getopt" >&5
5264if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005265 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005266else
5267 if test "$cross_compiling" = yes; then
5268 ac_cv_func_getopt=no
5269else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005270 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005271#line 5272 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005272#include "confdefs.h"
5273#include <stdio.h>
5274extern int optind, opterr, getopt();
5275extern char* optarg;
5276int main() {
5277 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5278 opterr = 0;
5279 if (getopt(3, av, "f:") == 'f') { exit(1); }
5280 exit(0);
5281}
5282EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005283if { (eval echo configure:5284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00005284then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005285 ac_cv_func_getopt=yes
5286else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005287 echo "configure: failed program was:" >&5
5288 cat conftest.$ac_ext >&5
5289 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005290 ac_cv_func_getopt=no
5291fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005292rm -fr conftest*
5293fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005294
5295fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005296echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005297test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5298
Guido van Rossumad713701997-07-10 22:42:38 +00005299# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005300echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005301echo "configure:5302: checking what malloc(0) returns" >&5
5302if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005303 echo $ac_n "(cached) $ac_c" 1>&6
5304else
5305 if test "$cross_compiling" = yes; then
5306 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5307else
5308 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005309#line 5310 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005310#include "confdefs.h"
5311#include <stdio.h>
5312#ifdef HAVE_STDLIB
5313#include <stdlib.h>
5314#else
5315char *malloc(), *realloc();
5316int *free();
5317#endif
5318main() {
5319 char *p;
5320 p = malloc(0);
5321 if (p == NULL) exit(1);
5322 p = realloc(p, 0);
5323 if (p == NULL) exit(1);
5324 free(p);
5325 exit(0);
5326}
5327EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005328if { (eval echo configure:5329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad713701997-07-10 22:42:38 +00005329then
5330 ac_cv_malloc_zero=nonnull
5331else
5332 echo "configure: failed program was:" >&5
5333 cat conftest.$ac_ext >&5
5334 rm -fr conftest*
5335 ac_cv_malloc_zero=null
5336fi
5337rm -fr conftest*
5338fi
5339
5340fi
5341
5342echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5343if test "$ac_cv_malloc_zero" = null
5344then
5345 cat >> confdefs.h <<\EOF
5346#define MALLOC_ZERO_RETURNS_NULL 1
5347EOF
5348
5349fi
5350
Guido van Rossumef2255b2000-03-10 22:30:29 +00005351# check for wchar.h
5352ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5353echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005354echo "configure:5355: checking for wchar.h" >&5
5355if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005356 echo $ac_n "(cached) $ac_c" 1>&6
5357else
5358 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005359#line 5360 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005360#include "confdefs.h"
5361#include <wchar.h>
5362EOF
5363ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005364{ (eval echo configure:5365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005365ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5366if test -z "$ac_err"; then
5367 rm -rf conftest*
5368 eval "ac_cv_header_$ac_safe=yes"
5369else
5370 echo "$ac_err" >&5
5371 echo "configure: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
5373 rm -rf conftest*
5374 eval "ac_cv_header_$ac_safe=no"
5375fi
5376rm -f conftest*
5377fi
5378if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5379 echo "$ac_t""yes" 1>&6
5380 cat >> confdefs.h <<\EOF
5381#define HAVE_WCHAR_H 1
5382EOF
5383 wchar_h="yes"
5384else
5385 echo "$ac_t""no" 1>&6
5386wchar_h="no"
5387
5388fi
5389
5390
5391# check for usable wchar_t
5392usable_wchar_t="unkown"
5393echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005394echo "configure:5395: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005395if test "$cross_compiling" = yes; then
5396 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5397else
5398 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005399#line 5400 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005400#include "confdefs.h"
5401
5402#include "wchar.h"
5403#include "wctype.h"
5404main() {
5405 wchar_t s;
5406 if (sizeof(s) == 2)
5407 exit(0);
5408 else
5409 exit(1);
5410}
5411
5412EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005413if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00005414then
5415 cat >> confdefs.h <<\EOF
5416#define HAVE_USABLE_WCHAR_T 1
5417EOF
5418 usable_wchar_t="yes"
5419else
5420 echo "configure: failed program was:" >&5
5421 cat conftest.$ac_ext >&5
5422 rm -fr conftest*
5423 usable_wchar_t="no"
5424fi
5425rm -fr conftest*
5426fi
5427
5428echo "$ac_t""$usable_wchar_t" 1>&6
5429
5430# check for endianness
5431echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005432echo "configure:5433: checking whether byte ordering is bigendian" >&5
5433if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005434 echo $ac_n "(cached) $ac_c" 1>&6
5435else
5436 ac_cv_c_bigendian=unknown
5437# See if sys/param.h defines the BYTE_ORDER macro.
5438cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005439#line 5440 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005440#include "confdefs.h"
5441#include <sys/types.h>
5442#include <sys/param.h>
5443int main() {
5444
5445#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5446 bogus endian macros
5447#endif
5448; return 0; }
5449EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005450if { (eval echo configure:5451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005451 rm -rf conftest*
5452 # It does; now see whether it defined to BIG_ENDIAN or not.
5453cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005454#line 5455 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005455#include "confdefs.h"
5456#include <sys/types.h>
5457#include <sys/param.h>
5458int main() {
5459
5460#if BYTE_ORDER != BIG_ENDIAN
5461 not big endian
5462#endif
5463; return 0; }
5464EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005465if { (eval echo configure:5466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005466 rm -rf conftest*
5467 ac_cv_c_bigendian=yes
5468else
5469 echo "configure: failed program was:" >&5
5470 cat conftest.$ac_ext >&5
5471 rm -rf conftest*
5472 ac_cv_c_bigendian=no
5473fi
5474rm -f conftest*
5475else
5476 echo "configure: failed program was:" >&5
5477 cat conftest.$ac_ext >&5
5478fi
5479rm -f conftest*
5480if test $ac_cv_c_bigendian = unknown; then
5481if test "$cross_compiling" = yes; then
5482 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5483else
5484 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005485#line 5486 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005486#include "confdefs.h"
5487main () {
5488 /* Are we little or big endian? From Harbison&Steele. */
5489 union
5490 {
5491 long l;
5492 char c[sizeof (long)];
5493 } u;
5494 u.l = 1;
5495 exit (u.c[sizeof (long) - 1] == 1);
5496}
5497EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005498if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00005499then
5500 ac_cv_c_bigendian=no
5501else
5502 echo "configure: failed program was:" >&5
5503 cat conftest.$ac_ext >&5
5504 rm -fr conftest*
5505 ac_cv_c_bigendian=yes
5506fi
5507rm -fr conftest*
5508fi
5509
5510fi
5511fi
5512
5513echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5514if test $ac_cv_c_bigendian = yes; then
5515 cat >> confdefs.h <<\EOF
5516#define WORDS_BIGENDIAN 1
5517EOF
5518
5519fi
5520
5521
5522# Check for --with-wctype-functions
5523echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005524echo "configure:5525: checking for --with-wctype-functions" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005525# Check whether --with-wctype-functions or --without-wctype-functions was given.
5526if test "${with_wctype_functions+set}" = set; then
5527 withval="$with_wctype_functions"
5528
5529if test "$withval" != no
5530then cat >> confdefs.h <<\EOF
5531#define WANT_WCTYPE_FUNCTIONS 1
5532EOF
5533 echo "$ac_t""yes" 1>&6
5534else echo "$ac_t""no" 1>&6
5535fi
5536else
5537 echo "$ac_t""no" 1>&6
5538fi
5539
5540
Guido van Rossum95713eb2000-05-18 20:53:31 +00005541# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5542# Add sys/socket.h to confdefs.h
5543cat >> confdefs.h <<\EOF
5544#ifdef HAVE_SYS_SOCKET_H
5545#include <sys/socket.h>
5546#endif
5547EOF
5548echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005549echo "configure:5550: checking for socklen_t" >&5
5550if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005551 echo $ac_n "(cached) $ac_c" 1>&6
5552else
5553 cat > conftest.$ac_ext <<EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005554#line 5555 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005555#include "confdefs.h"
5556#include <sys/types.h>
5557#if STDC_HEADERS
5558#include <stdlib.h>
5559#include <stddef.h>
5560#endif
5561EOF
5562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5563 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5564 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00005565 eval "ac_cv_type_socklen_t=yes"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005566else
5567 rm -rf conftest*
Fred Drake8cef4cf2000-06-28 16:40:38 +00005568 eval "ac_cv_type_socklen_t=no"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005569fi
5570rm -f conftest*
5571
5572fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005573if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then
5574 echo "$ac_t""yes" 1>&6
5575else
5576 echo "$ac_t""no" 1>&6
5577 cat >> confdefs.h <<EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005578#define socklen_t int
5579EOF
5580
5581fi
5582
5583
Guido van Rossum627b2d71993-12-24 10:39:16 +00005584# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005585trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005586cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005587# This file is a shell script that caches the results of configure
5588# tests run on this system so they can be shared between configure
5589# scripts and configure runs. It is not useful on other systems.
5590# If it contains results you don't want to keep, you may remove or edit it.
5591#
5592# By default, configure uses ./config.cache as the cache file,
5593# creating it if it does not exist already. You can give configure
5594# the --cache-file=FILE option to use a different cache file; that is
5595# what configure does when it calls configure scripts in
5596# subdirectories, so they share the cache.
5597# Giving --cache-file=/dev/null disables caching, for debugging configure.
5598# config.status only pays attention to the cache file if you give it the
5599# --recheck option to rerun configure.
5600#
5601EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005602# The following way of writing the cache mishandles newlines in values,
5603# but we know of no workaround that is simple, portable, and efficient.
5604# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005605# Ultrix sh set writes to stderr and can't be redirected directly,
5606# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005607(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005608 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005609 *ac_space=\ *)
5610 # `set' does not quote correctly, so add quotes (double-quote substitution
5611 # turns \\\\ into \\, and sed turns \\ into \).
5612 sed -n \
5613 -e "s/'/'\\\\''/g" \
5614 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5615 ;;
5616 *)
5617 # `set' quotes correctly as required by POSIX, so do not add quotes.
5618 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5619 ;;
5620 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005621if cmp -s $cache_file confcache; then
5622 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005623else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005624 if test -w $cache_file; then
5625 echo "updating cache $cache_file"
5626 cat confcache > $cache_file
5627 else
5628 echo "not updating unwritable cache $cache_file"
5629 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005630fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005631rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005632
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005633trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005634
5635test "x$prefix" = xNONE && prefix=$ac_default_prefix
5636# Let make expand exec_prefix.
5637test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005638
Guido van Rossum7f43da71994-08-01 12:15:30 +00005639# Any assignment to VPATH causes Sun make to only execute
5640# the first set of double-colon rules, so remove it if not needed.
5641# If there is a colon in the path, we need to keep it.
5642if test "x$srcdir" = x.; then
5643 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5644fi
5645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648DEFS=-DHAVE_CONFIG_H
5649
5650# Without the "./", some shells look in PATH for config.status.
5651: ${CONFIG_STATUS=./config.status}
5652
5653echo creating $CONFIG_STATUS
5654rm -f $CONFIG_STATUS
5655cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005656#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005657# Generated automatically by configure.
5658# Run this file to recreate the current configuration.
5659# This directory was configured as follows,
5660# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5661#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005662# $0 $ac_configure_args
5663#
5664# Compiler output produced by configure, useful for debugging
5665# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005666
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005667ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005668for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00005669do
Guido van Rossum7f43da71994-08-01 12:15:30 +00005670 case "\$ac_option" in
5671 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005672 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5673 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00005674 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Fred Drake8cef4cf2000-06-28 16:40:38 +00005675 echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005676 exit 0 ;;
5677 -help | --help | --hel | --he | --h)
5678 echo "\$ac_cs_usage"; exit 0 ;;
5679 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005680 esac
5681done
5682
Guido van Rossum7f43da71994-08-01 12:15:30 +00005683ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00005684
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005685trap 'rm -fr `echo "Makefile \
5686 Objects/Makefile \
5687 Parser/Makefile \
5688 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005689 Modules/Makefile.pre \
5690 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005691EOF
5692cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005693
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005694# Protect against being on the right side of a sed subst in config.status.
5695sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5696 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005697$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00005698$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005699s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005700s%@CFLAGS@%$CFLAGS%g
5701s%@CPPFLAGS@%$CPPFLAGS%g
5702s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005703s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005704s%@DEFS@%$DEFS%g
5705s%@LDFLAGS@%$LDFLAGS%g
5706s%@LIBS@%$LIBS%g
5707s%@exec_prefix@%$exec_prefix%g
5708s%@prefix@%$prefix%g
5709s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005710s%@bindir@%$bindir%g
5711s%@sbindir@%$sbindir%g
5712s%@libexecdir@%$libexecdir%g
5713s%@datadir@%$datadir%g
5714s%@sysconfdir@%$sysconfdir%g
5715s%@sharedstatedir@%$sharedstatedir%g
5716s%@localstatedir@%$localstatedir%g
5717s%@libdir@%$libdir%g
5718s%@includedir@%$includedir%g
5719s%@oldincludedir@%$oldincludedir%g
5720s%@infodir@%$infodir%g
5721s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00005722s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005723s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00005724s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00005725s%@SET_CXX@%$SET_CXX%g
5726s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005727s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005728s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
5729s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00005730s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005731s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005732s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005733s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00005734s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5735s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005736s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005737s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005738s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005739s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00005740s%@SO@%$SO%g
5741s%@LDSHARED@%$LDSHARED%g
5742s%@CCSHARED@%$CCSHARED%g
5743s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00005744s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00005745s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005746s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00005747s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005748s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005749s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
5750s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
5751s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005752s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005753s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005754s%@LIBM@%$LIBM%g
5755s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756
5757CEOF
5758EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005759
5760cat >> $CONFIG_STATUS <<\EOF
5761
5762# Split the substitutions into bite-sized pieces for seds with
5763# small command number limits, like on Digital OSF/1 and HP-UX.
5764ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5765ac_file=1 # Number of current file.
5766ac_beg=1 # First line for current file.
5767ac_end=$ac_max_sed_cmds # Line after last line for current file.
5768ac_more_lines=:
5769ac_sed_cmds=""
5770while $ac_more_lines; do
5771 if test $ac_beg -gt 1; then
5772 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5773 else
5774 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5775 fi
5776 if test ! -s conftest.s$ac_file; then
5777 ac_more_lines=false
5778 rm -f conftest.s$ac_file
5779 else
5780 if test -z "$ac_sed_cmds"; then
5781 ac_sed_cmds="sed -f conftest.s$ac_file"
5782 else
5783 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5784 fi
5785 ac_file=`expr $ac_file + 1`
5786 ac_beg=$ac_end
5787 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5788 fi
5789done
5790if test -z "$ac_sed_cmds"; then
5791 ac_sed_cmds=cat
5792fi
5793EOF
5794
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005795cat >> $CONFIG_STATUS <<EOF
5796
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005797CONFIG_FILES=\${CONFIG_FILES-"Makefile \
5798 Objects/Makefile \
5799 Parser/Makefile \
5800 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005801 Modules/Makefile.pre \
5802 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005803EOF
5804cat >> $CONFIG_STATUS <<\EOF
5805for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005806 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005808 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5810 *) ac_file_in="${ac_file}.in" ;;
5811 esac
5812
Guido van Rossumf78abae1997-01-21 22:02:36 +00005813 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814
5815 # Remove last slash and all that follows it. Not all systems have dirname.
5816 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5817 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5818 # The file is in a subdirectory.
5819 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005820 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005821 # A "../" for each directory in $ac_dir_suffix.
5822 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5823 else
5824 ac_dir_suffix= ac_dots=
5825 fi
5826
5827 case "$ac_given_srcdir" in
5828 .) srcdir=.
5829 if test -z "$ac_dots"; then top_srcdir=.
5830 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5831 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5832 *) # Relative path.
5833 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5834 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5835 esac
5836
Guido van Rossumf78abae1997-01-21 22:02:36 +00005837
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005838 echo creating "$ac_file"
5839 rm -f "$ac_file"
5840 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5841 case "$ac_file" in
5842 *Makefile*) ac_comsub="1i\\
5843# $configure_input" ;;
5844 *) ac_comsub= ;;
5845 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00005846
5847 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 +00005848 sed -e "$ac_comsub
5849s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005850s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005851s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00005852" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00005853fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00005854rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005855
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5857# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00005858#
5859# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005860ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5861ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005862ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005863ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005864# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5866ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005867ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005869# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005870ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5871ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005872ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005873ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005874
Guido van Rossumf78abae1997-01-21 22:02:36 +00005875if test "${CONFIG_HEADERS+set}" != set; then
5876EOF
5877cat >> $CONFIG_STATUS <<EOF
5878 CONFIG_HEADERS="config.h"
5879EOF
5880cat >> $CONFIG_STATUS <<\EOF
5881fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005882for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005883 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005884 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005885 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5887 *) ac_file_in="${ac_file}.in" ;;
5888 esac
5889
Guido van Rossum7f43da71994-08-01 12:15:30 +00005890 echo creating $ac_file
5891
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005892 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00005893 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5894 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005895
5896EOF
5897
5898# Transform confdefs.h into a sed script conftest.vals that substitutes
5899# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005900# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005901# Protect against being in an unquoted here document in config.status.
5902rm -f conftest.vals
5903cat > conftest.hdr <<\EOF
5904s/[\\&%]/\\&/g
5905s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005906s%#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 +00005907s%ac_d%ac_u%gp
5908s%ac_u%ac_e%gp
5909EOF
5910sed -n -f conftest.hdr confdefs.h > conftest.vals
5911rm -f conftest.hdr
5912
5913# This sed command replaces #undef with comments. This is necessary, for
5914# example, in the case of _POSIX_SOURCE, which is predefined and required
5915# on some systems where configure will not decide to define it.
5916cat >> conftest.vals <<\EOF
5917s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5918EOF
5919
5920# Break up conftest.vals because some shells have a limit on
5921# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005922
5923rm -f conftest.tail
5924while :
5925do
5926 ac_lines=`grep -c . conftest.vals`
5927 # grep -c gives empty output for an empty file on some AIX systems.
5928 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5929 # Write a limited-size here document to conftest.frag.
5930 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5931 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5932 echo 'CEOF
5933 sed -f conftest.frag conftest.in > conftest.out
5934 rm -f conftest.in
5935 mv conftest.out conftest.in
5936' >> $CONFIG_STATUS
5937 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5938 rm -f conftest.vals
5939 mv conftest.tail conftest.vals
5940done
5941rm -f conftest.vals
5942
5943cat >> $CONFIG_STATUS <<\EOF
5944 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00005945 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946 cat conftest.in >> conftest.h
5947 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00005948 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005949 echo "$ac_file is unchanged"
5950 rm -f conftest.h
5951 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005952 # Remove last slash and all that follows it. Not all systems have dirname.
5953 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5954 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5955 # The file is in a subdirectory.
5956 test ! -d "$ac_dir" && mkdir "$ac_dir"
5957 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005958 rm -f $ac_file
5959 mv conftest.h $ac_file
5960 fi
5961fi; done
5962
Guido van Rossumf78abae1997-01-21 22:02:36 +00005963EOF
5964cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005965
Guido van Rossumf78abae1997-01-21 22:02:36 +00005966EOF
5967cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005968
5969exit 0
5970EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971chmod +x $CONFIG_STATUS
5972rm -fr confdefs* $ac_clean_files
Fred Drake8cef4cf2000-06-28 16:40:38 +00005973test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005974