blob: 57c57f24ae9988cb82f26e7f141c15194f8b0901 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossumef2255b2000-03-10 22:30:29 +00003# From configure.in Revision: 1.117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006# Generated automatically using autoconf version 2.13
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)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000370 echo "configure generated by autoconf version 2.13"
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"
530 . $cache_file
531else
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
562VERSION=1.5
563
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
716 OPT="-DUSE_DL_EXPORT -O3 -mpentiumpro"
717 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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000787if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
788 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
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
818 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
863 *win32* | *WIN32*)
864 # 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
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000868if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
869 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
Guido van Rossumf78abae1997-01-21 22:02:36 +0000898echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000899echo "configure:900: checking whether the C compiler ($CC $CFLAGS $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
940echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +0000941echo "configure:942: checking whether the C compiler ($CC $CFLAGS $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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000947if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
948 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
Guido van Rossumf78abae1997-01-21 22:02:36 +0000975if eval "test \"`echo '$''{'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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001088if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1089 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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001121if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1122 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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001200if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1201 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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001300if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1301 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
Guido van Rossum91922671997-10-09 20:24:13 +00001349if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1350 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
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001383 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1384 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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001450if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1451 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001452else
1453 cat > conftest.$ac_ext <<EOF
Guido van 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 \
1555sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001556sys/un.h sys/utsname.h sys/wait.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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001561if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1562 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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001602if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1603 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_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001641if eval "test \"`echo '$''{'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_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001682if eval "test \"`echo '$''{'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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001756if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1757 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*
1771 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001772else
1773 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774 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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001779echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780if test $ac_cv_type_mode_t = no; then
1781 cat >> confdefs.h <<\EOF
1782#define mode_t int
1783EOF
1784
1785fi
1786
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001787echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001788echo "configure:1789: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001789if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1790 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791else
1792 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001793#line 1794 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001794#include "confdefs.h"
1795#include <sys/types.h>
1796#if STDC_HEADERS
1797#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001798#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799#endif
1800EOF
1801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001802 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 +00001803 rm -rf conftest*
1804 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001805else
1806 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001808fi
1809rm -f conftest*
1810
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001812echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813if test $ac_cv_type_off_t = no; then
1814 cat >> confdefs.h <<\EOF
1815#define off_t long
1816EOF
1817
1818fi
1819
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001820echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001821echo "configure:1822: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001822if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1823 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824else
1825 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001826#line 1827 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001827#include "confdefs.h"
1828#include <sys/types.h>
1829#if STDC_HEADERS
1830#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001831#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001832#endif
1833EOF
1834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001835 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 +00001836 rm -rf conftest*
1837 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001838else
1839 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001841fi
1842rm -f conftest*
1843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001844fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001845echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001846if test $ac_cv_type_pid_t = no; then
1847 cat >> confdefs.h <<\EOF
1848#define pid_t int
1849EOF
1850
1851fi
1852
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001853echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001854echo "configure:1855: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001855if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001857else
1858 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001859#line 1860 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001860#include "confdefs.h"
1861#include <sys/types.h>
1862#include <signal.h>
1863#ifdef signal
1864#undef signal
1865#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001866#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001867extern "C" void (*signal (int, void (*)(int)))(int);
1868#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001869void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001870#endif
1871
Guido van Rossumf78abae1997-01-21 22:02:36 +00001872int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001873int i;
1874; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001875EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001876if { (eval echo configure:1877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001877 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001879else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001880 echo "configure: failed program was:" >&5
1881 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001882 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001883 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001884fi
1885rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001886fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001887
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001888echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001889cat >> confdefs.h <<EOF
1890#define RETSIGTYPE $ac_cv_type_signal
1891EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001892
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001894echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001895echo "configure:1896: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001896if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1897 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898else
1899 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001900#line 1901 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901#include "confdefs.h"
1902#include <sys/types.h>
1903#if STDC_HEADERS
1904#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001905#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001906#endif
1907EOF
1908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001909 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 +00001910 rm -rf conftest*
1911 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001912else
1913 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001915fi
1916rm -f conftest*
1917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001919echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920if test $ac_cv_type_size_t = no; then
1921 cat >> confdefs.h <<\EOF
1922#define size_t unsigned
1923EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001924
1925fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001927echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001928echo "configure:1929: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001929if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1930 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001931else
1932 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001933#line 1934 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001934#include "confdefs.h"
1935#include <sys/types.h>
1936EOF
1937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1938 egrep "uid_t" >/dev/null 2>&1; then
1939 rm -rf conftest*
1940 ac_cv_type_uid_t=yes
1941else
1942 rm -rf conftest*
1943 ac_cv_type_uid_t=no
1944fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001945rm -f conftest*
1946
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001947fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001948
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001949echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001950if test $ac_cv_type_uid_t = no; then
1951 cat >> confdefs.h <<\EOF
1952#define uid_t int
1953EOF
1954
1955 cat >> confdefs.h <<\EOF
1956#define gid_t int
1957EOF
1958
1959fi
1960
Guido van Rossum627b2d71993-12-24 10:39:16 +00001961
Guido van Rossumef2255b2000-03-10 22:30:29 +00001962# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001963echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00001964echo "configure:1965: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001965if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1966 echo $ac_n "(cached) $ac_c" 1>&6
1967else
1968 if test "$cross_compiling" = yes; then
1969 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1970else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001971 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001972#line 1973 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001973#include "confdefs.h"
1974#include <stdio.h>
1975main()
1976{
1977 FILE *f=fopen("conftestval", "w");
1978 if (!f) exit(1);
1979 fprintf(f, "%d\n", sizeof(int));
1980 exit(0);
1981}
1982EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00001983if { (eval echo configure:1984: \"$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 +00001984then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001985 ac_cv_sizeof_int=`cat conftestval`
1986else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001987 echo "configure: failed program was:" >&5
1988 cat conftest.$ac_ext >&5
1989 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001990 ac_cv_sizeof_int=0
1991fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001992rm -fr conftest*
1993fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001994
1995fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001996echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1997cat >> confdefs.h <<EOF
1998#define SIZEOF_INT $ac_cv_sizeof_int
1999EOF
2000
2001
2002echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002003echo "configure:2004: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002004if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006else
2007 if test "$cross_compiling" = yes; then
2008 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2009else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002010 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002011#line 2012 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002012#include "confdefs.h"
2013#include <stdio.h>
2014main()
2015{
2016 FILE *f=fopen("conftestval", "w");
2017 if (!f) exit(1);
2018 fprintf(f, "%d\n", sizeof(long));
2019 exit(0);
2020}
2021EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002022if { (eval echo configure:2023: \"$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 +00002023then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002024 ac_cv_sizeof_long=`cat conftestval`
2025else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002026 echo "configure: failed program was:" >&5
2027 cat conftest.$ac_ext >&5
2028 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002029 ac_cv_sizeof_long=0
2030fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002031rm -fr conftest*
2032fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002033
2034fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002035echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2036cat >> confdefs.h <<EOF
2037#define SIZEOF_LONG $ac_cv_sizeof_long
2038EOF
2039
2040
Guido van Rossumad678af1998-10-02 14:42:15 +00002041echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002042echo "configure:2043: checking size of void *" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002043if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2044 echo $ac_n "(cached) $ac_c" 1>&6
2045else
2046 if test "$cross_compiling" = yes; then
2047 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2048else
2049 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002050#line 2051 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002051#include "confdefs.h"
2052#include <stdio.h>
2053main()
2054{
2055 FILE *f=fopen("conftestval", "w");
2056 if (!f) exit(1);
2057 fprintf(f, "%d\n", sizeof(void *));
2058 exit(0);
2059}
2060EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002061if { (eval echo configure:2062: \"$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 +00002062then
2063 ac_cv_sizeof_void_p=`cat conftestval`
2064else
2065 echo "configure: failed program was:" >&5
2066 cat conftest.$ac_ext >&5
2067 rm -fr conftest*
2068 ac_cv_sizeof_void_p=0
2069fi
2070rm -fr conftest*
2071fi
2072
2073fi
2074echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2075cat >> confdefs.h <<EOF
2076#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2077EOF
2078
2079
Guido van Rossumef2255b2000-03-10 22:30:29 +00002080echo $ac_n "checking size of char""... $ac_c" 1>&6
2081echo "configure:2082: checking size of char" >&5
2082if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
2084else
2085 if test "$cross_compiling" = yes; then
2086 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2087else
2088 cat > conftest.$ac_ext <<EOF
2089#line 2090 "configure"
2090#include "confdefs.h"
2091#include <stdio.h>
2092main()
2093{
2094 FILE *f=fopen("conftestval", "w");
2095 if (!f) exit(1);
2096 fprintf(f, "%d\n", sizeof(char));
2097 exit(0);
2098}
2099EOF
2100if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2101then
2102 ac_cv_sizeof_char=`cat conftestval`
2103else
2104 echo "configure: failed program was:" >&5
2105 cat conftest.$ac_ext >&5
2106 rm -fr conftest*
2107 ac_cv_sizeof_char=0
2108fi
2109rm -fr conftest*
2110fi
2111
2112fi
2113echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2114cat >> confdefs.h <<EOF
2115#define SIZEOF_CHAR $ac_cv_sizeof_char
2116EOF
2117
2118
2119echo $ac_n "checking size of short""... $ac_c" 1>&6
2120echo "configure:2121: checking size of short" >&5
2121if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2122 echo $ac_n "(cached) $ac_c" 1>&6
2123else
2124 if test "$cross_compiling" = yes; then
2125 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2126else
2127 cat > conftest.$ac_ext <<EOF
2128#line 2129 "configure"
2129#include "confdefs.h"
2130#include <stdio.h>
2131main()
2132{
2133 FILE *f=fopen("conftestval", "w");
2134 if (!f) exit(1);
2135 fprintf(f, "%d\n", sizeof(short));
2136 exit(0);
2137}
2138EOF
2139if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2140then
2141 ac_cv_sizeof_short=`cat conftestval`
2142else
2143 echo "configure: failed program was:" >&5
2144 cat conftest.$ac_ext >&5
2145 rm -fr conftest*
2146 ac_cv_sizeof_short=0
2147fi
2148rm -fr conftest*
2149fi
2150
2151fi
2152echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2153cat >> confdefs.h <<EOF
2154#define SIZEOF_SHORT $ac_cv_sizeof_short
2155EOF
2156
2157
2158echo $ac_n "checking size of float""... $ac_c" 1>&6
2159echo "configure:2160: checking size of float" >&5
2160if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2161 echo $ac_n "(cached) $ac_c" 1>&6
2162else
2163 if test "$cross_compiling" = yes; then
2164 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2165else
2166 cat > conftest.$ac_ext <<EOF
2167#line 2168 "configure"
2168#include "confdefs.h"
2169#include <stdio.h>
2170main()
2171{
2172 FILE *f=fopen("conftestval", "w");
2173 if (!f) exit(1);
2174 fprintf(f, "%d\n", sizeof(float));
2175 exit(0);
2176}
2177EOF
2178if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2179then
2180 ac_cv_sizeof_float=`cat conftestval`
2181else
2182 echo "configure: failed program was:" >&5
2183 cat conftest.$ac_ext >&5
2184 rm -fr conftest*
2185 ac_cv_sizeof_float=0
2186fi
2187rm -fr conftest*
2188fi
2189
2190fi
2191echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2192cat >> confdefs.h <<EOF
2193#define SIZEOF_FLOAT $ac_cv_sizeof_float
2194EOF
2195
2196
2197echo $ac_n "checking size of double""... $ac_c" 1>&6
2198echo "configure:2199: checking size of double" >&5
2199if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2200 echo $ac_n "(cached) $ac_c" 1>&6
2201else
2202 if test "$cross_compiling" = yes; then
2203 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2204else
2205 cat > conftest.$ac_ext <<EOF
2206#line 2207 "configure"
2207#include "confdefs.h"
2208#include <stdio.h>
2209main()
2210{
2211 FILE *f=fopen("conftestval", "w");
2212 if (!f) exit(1);
2213 fprintf(f, "%d\n", sizeof(double));
2214 exit(0);
2215}
2216EOF
2217if { (eval echo configure:2218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2218then
2219 ac_cv_sizeof_double=`cat conftestval`
2220else
2221 echo "configure: failed program was:" >&5
2222 cat conftest.$ac_ext >&5
2223 rm -fr conftest*
2224 ac_cv_sizeof_double=0
2225fi
2226rm -fr conftest*
2227fi
2228
2229fi
2230echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2231cat >> confdefs.h <<EOF
2232#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2233EOF
2234
2235
Guido van Rossum0a516c91994-09-12 10:58:40 +00002236
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002237echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002238echo "configure:2239: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002239have_long_long=no
2240cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002241#line 2242 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002242#include "confdefs.h"
2243
2244int main() {
2245long long x; x = (long long)0;
2246; return 0; }
2247EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002248if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002249 rm -rf conftest*
2250 cat >> confdefs.h <<\EOF
2251#define HAVE_LONG_LONG 1
2252EOF
2253 have_long_long=yes
2254else
2255 echo "configure: failed program was:" >&5
2256 cat conftest.$ac_ext >&5
2257fi
2258rm -f conftest*
2259echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002260if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002261echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002262echo "configure:2263: checking size of long long" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002263if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2264 echo $ac_n "(cached) $ac_c" 1>&6
2265else
2266 if test "$cross_compiling" = yes; then
2267 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2268else
2269 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002270#line 2271 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002271#include "confdefs.h"
2272#include <stdio.h>
2273main()
2274{
2275 FILE *f=fopen("conftestval", "w");
2276 if (!f) exit(1);
2277 fprintf(f, "%d\n", sizeof(long long));
2278 exit(0);
2279}
2280EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002281if { (eval echo configure:2282: \"$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 +00002282then
2283 ac_cv_sizeof_long_long=`cat conftestval`
2284else
2285 echo "configure: failed program was:" >&5
2286 cat conftest.$ac_ext >&5
2287 rm -fr conftest*
2288 ac_cv_sizeof_long_long=0
2289fi
2290rm -fr conftest*
2291fi
2292
2293fi
2294echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2295cat >> confdefs.h <<EOF
2296#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2297EOF
2298
2299
2300fi
2301
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002302# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2303echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002304echo "configure:2305: checking size of off_t" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002305if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2306 echo $ac_n "(cached) $ac_c" 1>&6
2307else
2308 if test "$cross_compiling" = yes; then
2309 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2310else
2311 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002312#line 2313 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002313#include "confdefs.h"
2314#include <stdio.h>
2315#include <sys/types.h>
2316main()
2317{
2318 FILE *f=fopen("conftestval", "w");
2319 if (!f) exit(1);
2320 fprintf(f, "%d\n", sizeof(off_t));
2321 exit(0);
2322}
2323EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002324if { (eval echo configure:2325: \"$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 +00002325then
2326 ac_cv_sizeof_off_t=`cat conftestval`
2327else
2328 echo "configure: failed program was:" >&5
2329 cat conftest.$ac_ext >&5
2330 rm -fr conftest*
2331 ac_cv_sizeof_off_t=0
2332fi
2333rm -fr conftest*
2334fi
2335
2336
2337fi
2338
2339echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2340cat >> confdefs.h <<EOF
2341#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2342EOF
2343
2344
2345echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002346echo "configure:2347: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002347if test "$have_long_long" = yes -a \
2348 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2349 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002350 cat >> confdefs.h <<\EOF
2351#define HAVE_LARGEFILE_SUPPORT 1
2352EOF
2353
2354 echo "$ac_t""yes" 1>&6
2355else
2356 echo "$ac_t""no" 1>&6
2357fi
2358
2359
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002360# Minor variations in building a framework between NextStep versions 4 and 5
2361
2362case $ac_sys_system/$ac_sys_release in
2363 next/4*)
2364 ns_undef_sym='__environ'
2365 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2366 next/5*)
2367 ns_undef_sym='_environ'
2368 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2369esac
2370
2371echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002372echo "configure:2373: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002373if test "$with_next_framework"
2374then
2375 OPT="$OPT -fno-common"
2376 # -U __environ is needed since bundles don't have access
2377 # to crt0 when built but will always be linked against it
2378 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2379 cat >> confdefs.h <<\EOF
2380#define WITH_NEXT_FRAMEWORK 1
2381EOF
2382
2383 echo "$ac_t""yes" 1>&6
2384else
2385 echo "$ac_t""no" 1>&6
2386fi
2387
2388echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002389echo "configure:2390: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002390if test "$with_next_framework" -o "$with_dyld"
2391then
2392 if test "$with_dyld"
2393 then
2394 echo "$ac_t""yes" 1>&6
2395 else
2396 echo "$ac_t""required for framework build" 1>&6
2397 fi
2398 cat >> confdefs.h <<\EOF
2399#define WITH_DYLD 1
2400EOF
2401
2402 ns_dyld='set'
2403else
2404 echo "$ac_t""no" 1>&6
2405fi
2406
Guido van Rossum0a516c91994-09-12 10:58:40 +00002407# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002408
2409
2410
2411
Guido van Rossum0a516c91994-09-12 10:58:40 +00002412# SO is the extension of shared libraries `(including the dot!)
2413# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002414echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002415echo "configure:2416: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002416if test -z "$SO"
2417then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002418 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002419 hp*|HP*) SO=.sl;;
2420 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002421 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002422fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002423echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002424# LDSHARED is the ld *command* used to create shared library
2425# -- "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 +00002426# (Shared libraries in this instance are shared modules to be loaded into
2427# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002428echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002429echo "configure:2430: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002430if test -z "$LDSHARED"
2431then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002432 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002433 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002434 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002435 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002436 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002437 SunOS/4*) LDSHARED="ld";;
2438 SunOS/5*) LDSHARED="ld -G";;
2439 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002440 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2441 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002442 next/*)
2443 if test "$ns_dyld"
2444 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2445 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2446 fi
2447 if test "$with_next_framework" ; then
2448 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2449 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002450 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002451 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002452 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002453 FreeBSD*/[34]*) LDSHARED="gcc -shared";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002454 FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
2455 NetBSD*)
2456 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2457 then
2458 LDSHARED="cc -shared"
2459 else
2460 LDSHARED="ld -Bshareable"
2461 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002462 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002463 *) LDSHARED="ld";;
2464 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002465fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002466echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002467# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002468# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002469echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002470echo "configure:2471: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002471if test -z "$CCSHARED"
2472then
Guido van Rossum07397971997-04-29 21:49:50 +00002473 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002474 hp*|HP*) if test "$GCC" = yes;
2475 then CCSHARED="-fpic";
2476 else CCSHARED="+z";
2477 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002478 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002479 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002480 FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
2481 NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002482 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002483 IRIX*/6*) case $CC in
2484 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002485 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002486 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002487 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002488fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002489echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002490# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002491# the python executable -- this is only needed for a few systems
2492echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002493echo "configure:2494: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002494if test -z "$LINKFORSHARED"
2495then
Guido van Rossum07397971997-04-29 21:49:50 +00002496 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002497 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002498 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002499 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002500 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002501 FreeBSD/[34]*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002502 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002503 # -u libsys_s pulls in all symbols in libsys
2504 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2505 # -u __dummy makes the linker aware of the objc runtime
2506 # in System.framework; otherwise, __objcInit (referenced in
2507 # crt1.o) gets erroneously defined as common, which breaks dynamic
2508 # loading of any modules which reference it in System.framework
2509 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002510 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002511 NetBSD*)
2512 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2513 then
2514 LINKFORSHARED="-Wl,--export-dynamic"
2515 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002516 SunOS/5*) case $CC in
2517 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002518 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002519 then
2520 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002521 fi;;
2522 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002523 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002524fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002525echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002526
Guido van Rossum627b2d71993-12-24 10:39:16 +00002527# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002528echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002529echo "configure:2530: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002530ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002531if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002532 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002533else
2534 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002535LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002536cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002537#line 2538 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002538#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002539/* Override any gcc2 internal prototype to avoid an error. */
2540/* We use char because int might match the return type of a gcc2
2541 builtin and then its argument prototype would still apply. */
2542char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002543
Guido van Rossumf78abae1997-01-21 22:02:36 +00002544int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002545dlopen()
2546; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002547EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002548if { (eval echo configure:2549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002549 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002550 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002551else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002552 echo "configure: failed program was:" >&5
2553 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002554 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002555 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002556fi
2557rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002558LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002559
Guido van Rossum627b2d71993-12-24 10:39:16 +00002560fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002561if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002562 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002563 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2564 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002565 cat >> confdefs.h <<EOF
2566#define $ac_tr_lib 1
2567EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002568
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002569 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002570
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002571else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002572 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002573fi
2574 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002575echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002576echo "configure:2577: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002577ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002578if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002579 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580else
2581 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002582LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002584#line 2585 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002585#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002586/* Override any gcc2 internal prototype to avoid an error. */
2587/* We use char because int might match the return type of a gcc2
2588 builtin and then its argument prototype would still apply. */
2589char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002590
Guido van Rossumf78abae1997-01-21 22:02:36 +00002591int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592shl_load()
2593; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002594EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002595if { (eval echo configure:2596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002596 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002597 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002599 echo "configure: failed program was:" >&5
2600 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002602 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002603fi
2604rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002606
Guido van Rossum627b2d71993-12-24 10:39:16 +00002607fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002608if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002609 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002610 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2611 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 cat >> confdefs.h <<EOF
2613#define $ac_tr_lib 1
2614EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002615
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002616 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617
2618else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002619 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002620fi
2621 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002622
2623# checks for system dependent C++ extensions support
2624case "$ac_sys_system" in
2625 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002626echo "configure:2627: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002627 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002628#line 2629 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002629#include "confdefs.h"
2630#include "/usr/lpp/xlC/include/load.h"
2631int main() {
2632loadAndInit("", 0, "")
2633; return 0; }
2634EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002635if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002636 rm -rf conftest*
2637 cat >> confdefs.h <<\EOF
2638#define AIX_GENUINE_CPLUSPLUS 1
2639EOF
2640
2641 echo "$ac_t""yes" 1>&6
2642else
2643 echo "configure: failed program was:" >&5
2644 cat conftest.$ac_ext >&5
2645 rm -rf conftest*
2646 echo "$ac_t""no" 1>&6
2647fi
2648rm -f conftest*;;
2649 *) ;;
2650esac
2651
Guido van Rossum70c7f481998-03-26 18:44:10 +00002652# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2653# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002654# BeOS' sockets are stashed in libnet.
2655case "$ac_sys_system" in
2656IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002657*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002658echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002659echo "configure:2660: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002660ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002661if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002662 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002663else
2664 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002665LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002666cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002667#line 2668 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002668#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002669/* Override any gcc2 internal prototype to avoid an error. */
2670/* We use char because int might match the return type of a gcc2
2671 builtin and then its argument prototype would still apply. */
2672char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002673
Guido van Rossumf78abae1997-01-21 22:02:36 +00002674int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002675t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002676; return 0; }
2677EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002678if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002679 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002680 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002681else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002682 echo "configure: failed program was:" >&5
2683 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002684 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002685 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002686fi
2687rm -f conftest*
2688LIBS="$ac_save_LIBS"
2689
2690fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002691if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002692 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002693 LIBS="-lnsl $LIBS"
2694else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002695 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002696fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002697 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002698echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002699echo "configure:2700: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002700ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002701if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002702 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002703else
2704 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002705LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002706cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002707#line 2708 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002708#include "confdefs.h"
2709/* Override any gcc2 internal prototype to avoid an error. */
2710/* We use char because int might match the return type of a gcc2
2711 builtin and then its argument prototype would still apply. */
2712char socket();
2713
2714int main() {
2715socket()
2716; return 0; }
2717EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002718if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002719 rm -rf conftest*
2720 eval "ac_cv_lib_$ac_lib_var=yes"
2721else
2722 echo "configure: failed program was:" >&5
2723 cat conftest.$ac_ext >&5
2724 rm -rf conftest*
2725 eval "ac_cv_lib_$ac_lib_var=no"
2726fi
2727rm -f conftest*
2728LIBS="$ac_save_LIBS"
2729
2730fi
2731if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2732 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002733 LIBS="-lsocket $LIBS"
2734else
2735 echo "$ac_t""no" 1>&6
2736fi
2737 # SVR4 sockets
2738echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002739echo "configure:2740: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002740ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
2741if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2742 echo $ac_n "(cached) $ac_c" 1>&6
2743else
2744 ac_save_LIBS="$LIBS"
2745LIBS="-lnet $LIBS $LIBS"
2746cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002747#line 2748 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002748#include "confdefs.h"
2749/* Override any gcc2 internal prototype to avoid an error. */
2750/* We use char because int might match the return type of a gcc2
2751 builtin and then its argument prototype would still apply. */
2752char socket();
2753
2754int main() {
2755socket()
2756; return 0; }
2757EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002758if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002759 rm -rf conftest*
2760 eval "ac_cv_lib_$ac_lib_var=yes"
2761else
2762 echo "configure: failed program was:" >&5
2763 cat conftest.$ac_ext >&5
2764 rm -rf conftest*
2765 eval "ac_cv_lib_$ac_lib_var=no"
2766fi
2767rm -f conftest*
2768LIBS="$ac_save_LIBS"
2769
2770fi
2771if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2772 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002773 LIBS="-lnet $LIBS"
2774else
2775 echo "$ac_t""no" 1>&6
2776fi
2777 # BeOS
2778;;
2779esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002780
Guido van Rossuma68acba1996-07-31 17:36:39 +00002781echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002782echo "configure:2783: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002783# Check whether --with-libs or --without-libs was given.
2784if test "${with_libs+set}" = set; then
2785 withval="$with_libs"
2786
2787echo "$ac_t""$withval" 1>&6
2788LIBS="$withval $LIBS"
2789
2790else
2791 echo "$ac_t""no" 1>&6
2792fi
2793
Guido van Rossum7f43da71994-08-01 12:15:30 +00002794
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002795echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002796echo "configure:2797: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002798if test "${with_readline+set}" = set; then
2799 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002800 echo "$ac_t""$withval" 1>&6
2801{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002802else
Guido van Rossumb06df271997-08-05 21:50:20 +00002803 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002804fi
2805
Guido van Rossum7f43da71994-08-01 12:15:30 +00002806
Guido van Rossum009f7871997-12-04 00:51:42 +00002807
2808USE_THREAD_MODULE="#"
2809
Guido van Rossumec2f0731997-01-22 20:54:01 +00002810echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002811echo "configure:2812: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002812
2813# Check whether --with-dec-threads or --without-dec-threads was given.
2814if test "${with_dec_threads+set}" = set; then
2815 withval="$with_dec_threads"
2816 echo "$ac_t""$withval" 1>&6
2817LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002818if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002819 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002820fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002821else
2822 echo "$ac_t""no" 1>&6
2823fi
2824
2825
2826echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002827echo "configure:2828: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002828# Check whether --with-threads or --without-threads was given.
2829if test "${with_threads+set}" = set; then
2830 withval="$with_threads"
2831 echo "$ac_t""$withval" 1>&6
2832if test "${with_thread+set}" != set; then
2833 with_thread="$withval";
2834fi
2835else
2836 echo "$ac_t""no" 1>&6
2837fi
2838
2839
2840echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002841echo "configure:2842: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002842# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002843if test "${with_thread+set}" = set; then
2844 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002845
Guido van Rossum009f7871997-12-04 00:51:42 +00002846USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002847echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002848if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002849then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002850fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002851cat >> confdefs.h <<\EOF
2852#define _REENTRANT 1
2853EOF
2854
Guido van Rossumf78abae1997-01-21 22:02:36 +00002855ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002856echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002857echo "configure:2858: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002858if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2859 echo $ac_n "(cached) $ac_c" 1>&6
2860else
2861 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002862#line 2863 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002863#include "confdefs.h"
2864#include <mach/cthreads.h>
2865EOF
2866ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002867{ (eval echo configure:2868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002868ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002869if test -z "$ac_err"; then
2870 rm -rf conftest*
2871 eval "ac_cv_header_$ac_safe=yes"
2872else
2873 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002874 echo "configure: failed program was:" >&5
2875 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002876 rm -rf conftest*
2877 eval "ac_cv_header_$ac_safe=no"
2878fi
2879rm -f conftest*
2880fi
2881if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2882 echo "$ac_t""yes" 1>&6
2883 cat >> confdefs.h <<\EOF
2884#define WITH_THREAD 1
2885EOF
2886
2887cat >> confdefs.h <<\EOF
2888#define C_THREADS 1
2889EOF
2890
2891LIBOBJS="$LIBOBJS thread.o"
2892else
2893 echo "$ac_t""no" 1>&6
2894
Guido van Rossum02a1c402000-02-25 19:26:31 +00002895echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002896echo "configure:2897: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00002897ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
2898if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2899 echo $ac_n "(cached) $ac_c" 1>&6
2900else
2901 ac_save_LIBS="$LIBS"
2902LIBS="-lpthread $LIBS"
2903cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002904#line 2905 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00002905#include "confdefs.h"
2906/* Override any gcc2 internal prototype to avoid an error. */
2907/* We use char because int might match the return type of a gcc2
2908 builtin and then its argument prototype would still apply. */
2909char pthread_create();
2910
2911int main() {
2912pthread_create()
2913; return 0; }
2914EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002915if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00002916 rm -rf conftest*
2917 eval "ac_cv_lib_$ac_lib_var=yes"
2918else
2919 echo "configure: failed program was:" >&5
2920 cat conftest.$ac_ext >&5
2921 rm -rf conftest*
2922 eval "ac_cv_lib_$ac_lib_var=no"
2923fi
2924rm -f conftest*
2925LIBS="$ac_save_LIBS"
2926
2927fi
2928if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2929 echo "$ac_t""yes" 1>&6
2930 cat >> confdefs.h <<\EOF
2931#define WITH_THREAD 1
2932EOF
2933
2934cat >> confdefs.h <<\EOF
2935#define _POSIX_THREADS 1
2936EOF
2937
2938LIBS="-lpthread $LIBS"
2939LIBOBJS="$LIBOBJS thread.o"
2940else
2941 echo "$ac_t""no" 1>&6
2942
Guido van Rossumea516321998-12-17 18:08:55 +00002943echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002944echo "configure:2945: checking for pthread_detach" >&5
Guido van Rossumea516321998-12-17 18:08:55 +00002945if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002946 echo $ac_n "(cached) $ac_c" 1>&6
2947else
2948 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002949#line 2950 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002950#include "confdefs.h"
2951/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00002952 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00002953#include <assert.h>
2954/* Override any gcc2 internal prototype to avoid an error. */
2955/* We use char because int might match the return type of a gcc2
2956 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00002957char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002958
2959int main() {
2960
2961/* The GNU C library defines this for functions which it implements
2962 to always fail with ENOSYS. Some functions are actually named
2963 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00002964#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00002965choke me
2966#else
Guido van Rossumea516321998-12-17 18:08:55 +00002967pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002968#endif
2969
2970; return 0; }
2971EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002972if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002973 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002974 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00002975else
2976 echo "configure: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002979 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00002980fi
2981rm -f conftest*
2982fi
2983
Guido van Rossumea516321998-12-17 18:08:55 +00002984if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002985 echo "$ac_t""yes" 1>&6
2986 cat >> confdefs.h <<\EOF
2987#define WITH_THREAD 1
2988EOF
2989
2990cat >> confdefs.h <<\EOF
2991#define _POSIX_THREADS 1
2992EOF
2993
2994LIBOBJS="$LIBOBJS thread.o"
2995else
2996 echo "$ac_t""no" 1>&6
2997
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002998ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
2999echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003000echo "configure:3001: checking for kernel/OS.h" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003001if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3002 echo $ac_n "(cached) $ac_c" 1>&6
3003else
3004 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003005#line 3006 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003006#include "confdefs.h"
3007#include <kernel/OS.h>
3008EOF
3009ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumef2255b2000-03-10 22:30:29 +00003010{ (eval echo configure:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003011ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003012if test -z "$ac_err"; then
3013 rm -rf conftest*
3014 eval "ac_cv_header_$ac_safe=yes"
3015else
3016 echo "$ac_err" >&5
3017 echo "configure: failed program was:" >&5
3018 cat conftest.$ac_ext >&5
3019 rm -rf conftest*
3020 eval "ac_cv_header_$ac_safe=no"
3021fi
3022rm -f conftest*
3023fi
3024if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3025 echo "$ac_t""yes" 1>&6
3026 cat >> confdefs.h <<\EOF
3027#define WITH_THREAD 1
3028EOF
3029
3030cat >> confdefs.h <<\EOF
3031#define BEOS_THREADS 1
3032EOF
3033
3034LIBOBJS="$LIBOBJS thread.o"
3035else
3036 echo "$ac_t""no" 1>&6
3037
Guido van Rossumf78abae1997-01-21 22:02:36 +00003038echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003039echo "configure:3040: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003040ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003041if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003042 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003043else
3044 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003045LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003046cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003047#line 3048 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003048#include "confdefs.h"
3049/* Override any gcc2 internal prototype to avoid an error. */
3050/* We use char because int might match the return type of a gcc2
3051 builtin and then its argument prototype would still apply. */
3052char pthread_create();
3053
Guido van Rossumf78abae1997-01-21 22:02:36 +00003054int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00003055pthread_create()
3056; return 0; }
3057EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003058if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00003059 rm -rf conftest*
3060 eval "ac_cv_lib_$ac_lib_var=yes"
3061else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003062 echo "configure: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00003064 rm -rf conftest*
3065 eval "ac_cv_lib_$ac_lib_var=no"
3066fi
3067rm -f conftest*
3068LIBS="$ac_save_LIBS"
3069
3070fi
3071if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3072 echo "$ac_t""yes" 1>&6
3073 cat >> confdefs.h <<\EOF
3074#define WITH_THREAD 1
3075EOF
3076
3077cat >> confdefs.h <<\EOF
3078#define _POSIX_THREADS 1
3079EOF
3080
Guido van Rossum02a1c402000-02-25 19:26:31 +00003081LIBS="$LIBS -lpthreads"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003082LIBOBJS="$LIBOBJS thread.o"
3083else
3084 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00003085
Guido van Rossum49545951997-12-02 19:28:29 +00003086echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003087echo "configure:3088: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00003088ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
3089if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3090 echo $ac_n "(cached) $ac_c" 1>&6
3091else
3092 ac_save_LIBS="$LIBS"
3093LIBS="-lc_r $LIBS"
3094cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003095#line 3096 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003096#include "confdefs.h"
3097/* Override any gcc2 internal prototype to avoid an error. */
3098/* We use char because int might match the return type of a gcc2
3099 builtin and then its argument prototype would still apply. */
3100char pthread_create();
3101
3102int main() {
3103pthread_create()
3104; return 0; }
3105EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003106if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003107 rm -rf conftest*
3108 eval "ac_cv_lib_$ac_lib_var=yes"
3109else
3110 echo "configure: failed program was:" >&5
3111 cat conftest.$ac_ext >&5
3112 rm -rf conftest*
3113 eval "ac_cv_lib_$ac_lib_var=no"
3114fi
3115rm -f conftest*
3116LIBS="$ac_save_LIBS"
3117
3118fi
3119if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3120 echo "$ac_t""yes" 1>&6
3121 cat >> confdefs.h <<\EOF
3122#define WITH_THREAD 1
3123EOF
3124
3125cat >> confdefs.h <<\EOF
3126#define _POSIX_THREADS 1
3127EOF
3128
3129LIBS="$LIBS -lc_r"
3130LIBOBJS="$LIBOBJS thread.o"
3131else
3132 echo "$ac_t""no" 1>&6
3133
Guido van Rossum0be3e491997-05-22 20:33:33 +00003134echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003135echo "configure:3136: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00003136ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
3137if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3138 echo $ac_n "(cached) $ac_c" 1>&6
3139else
3140 ac_save_LIBS="$LIBS"
3141LIBS="-lthread $LIBS"
3142cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003143#line 3144 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003144#include "confdefs.h"
3145/* Override any gcc2 internal prototype to avoid an error. */
3146/* We use char because int might match the return type of a gcc2
3147 builtin and then its argument prototype would still apply. */
3148char __d6_pthread_create();
3149
3150int main() {
3151__d6_pthread_create()
3152; return 0; }
3153EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003154if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003155 rm -rf conftest*
3156 eval "ac_cv_lib_$ac_lib_var=yes"
3157else
3158 echo "configure: failed program was:" >&5
3159 cat conftest.$ac_ext >&5
3160 rm -rf conftest*
3161 eval "ac_cv_lib_$ac_lib_var=no"
3162fi
3163rm -f conftest*
3164LIBS="$ac_save_LIBS"
3165
3166fi
3167if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3168 echo "$ac_t""yes" 1>&6
3169 cat >> confdefs.h <<\EOF
3170#define WITH_THREAD 1
3171EOF
3172
3173cat >> confdefs.h <<\EOF
3174#define _POSIX_THREADS 1
3175EOF
3176
3177LIBS="$LIBS -lthread"
3178LIBOBJS="$LIBOBJS thread.o"
3179else
3180 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003181
3182echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003183echo "configure:3184: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003184ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
3185if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3186 echo $ac_n "(cached) $ac_c" 1>&6
3187else
3188 ac_save_LIBS="$LIBS"
3189LIBS="-lcma $LIBS"
3190cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003191#line 3192 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003192#include "confdefs.h"
3193/* Override any gcc2 internal prototype to avoid an error. */
3194/* We use char because int might match the return type of a gcc2
3195 builtin and then its argument prototype would still apply. */
3196char pthread_create();
3197
3198int main() {
3199pthread_create()
3200; return 0; }
3201EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003202if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003203 rm -rf conftest*
3204 eval "ac_cv_lib_$ac_lib_var=yes"
3205else
3206 echo "configure: failed program was:" >&5
3207 cat conftest.$ac_ext >&5
3208 rm -rf conftest*
3209 eval "ac_cv_lib_$ac_lib_var=no"
3210fi
3211rm -f conftest*
3212LIBS="$ac_save_LIBS"
3213
3214fi
3215if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3216 echo "$ac_t""yes" 1>&6
3217 cat >> confdefs.h <<\EOF
3218#define WITH_THREAD 1
3219EOF
3220
3221cat >> confdefs.h <<\EOF
3222#define _POSIX_THREADS 1
3223EOF
3224
3225LIBS="$LIBS -lcma"
3226LIBOBJS="$LIBOBJS thread.o"
3227else
3228 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00003229fi
3230
3231
Guido van Rossum627b2d71993-12-24 10:39:16 +00003232fi
3233
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003234fi
3235
Guido van Rossum0be3e491997-05-22 20:33:33 +00003236fi
3237
Guido van Rossum49545951997-12-02 19:28:29 +00003238fi
3239
Guido van Rossumb93a8621998-05-07 13:27:32 +00003240fi
3241
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003242fi
3243
Guido van Rossumad678af1998-10-02 14:42:15 +00003244fi
3245
Guido van Rossum0be3e491997-05-22 20:33:33 +00003246
Guido van Rossumf78abae1997-01-21 22:02:36 +00003247echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003248echo "configure:3249: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003249ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003250if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003251 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003252else
3253 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003254LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003255cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003256#line 3257 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003257#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003258/* Override any gcc2 internal prototype to avoid an error. */
3259/* We use char because int might match the return type of a gcc2
3260 builtin and then its argument prototype would still apply. */
3261char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003262
Guido van Rossumf78abae1997-01-21 22:02:36 +00003263int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003264usconfig()
3265; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003266EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003267if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003268 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003269 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003270else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003271 echo "configure: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003273 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003274 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003275fi
3276rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003277LIBS="$ac_save_LIBS"
3278
3279fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003280if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003281 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003282 cat >> confdefs.h <<\EOF
3283#define WITH_THREAD 1
3284EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003285
Guido van Rossum7f43da71994-08-01 12:15:30 +00003286LIBS="$LIBS -lmpc"
3287LIBOBJS="$LIBOBJS thread.o"
3288else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003289 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003290fi
3291
Guido van Rossumf78abae1997-01-21 22:02:36 +00003292echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003293echo "configure:3294: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003294ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003295if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003296 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003297else
3298 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003299LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003300cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003301#line 3302 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003302#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003303/* Override any gcc2 internal prototype to avoid an error. */
3304/* We use char because int might match the return type of a gcc2
3305 builtin and then its argument prototype would still apply. */
3306char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003307
Guido van Rossumf78abae1997-01-21 22:02:36 +00003308int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003309thr_create()
3310; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003311EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003312if { (eval echo configure:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003313 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003314 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003315else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003316 echo "configure: failed program was:" >&5
3317 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003318 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003319 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003320fi
3321rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003322LIBS="$ac_save_LIBS"
3323
3324fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003326 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003327 cat >> confdefs.h <<\EOF
3328#define WITH_THREAD 1
3329EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003330
Guido van Rossum7f43da71994-08-01 12:15:30 +00003331LIBS="$LIBS -lthread"
3332LIBOBJS="$LIBOBJS thread.o"
3333else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003334 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003335fi
3336
Guido van Rossum7f43da71994-08-01 12:15:30 +00003337
Guido van Rossumda88dad1995-01-26 00:46:29 +00003338else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003339 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003340fi
3341
Guido van Rossum7f43da71994-08-01 12:15:30 +00003342
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003344
3345DLINCLDIR=/
3346
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003347echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003348echo "configure:3349: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003349# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003350if test "${with_sgi_dl+set}" = set; then
3351 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003352
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003353echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003354cat >> confdefs.h <<\EOF
3355#define WITH_SGI_DL 1
3356EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003357
Guido van Rossume97ee181999-12-20 21:27:22 +00003358DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003359dldir=$withval
3360if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003361then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003362else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003363fi
3364DLINCLDIR=${dldir}
3365LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003366else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003367 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003368fi
3369
3370
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003371echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003372echo "configure:3373: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003373# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003374if test "${with_dl_dld+set}" = set; then
3375 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003376
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003377echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378cat >> confdefs.h <<\EOF
3379#define WITH_DL_DLD 1
3380EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003381
Guido van Rossume97ee181999-12-20 21:27:22 +00003382DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003383dldir=`echo "$withval" | sed 's/,.*//'`
3384dlddir=`echo "$withval" | sed 's/.*,//'`
3385if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003386then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003387else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003388fi
3389DLINCLDIR=${dldir}
3390LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003391else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003392 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003393fi
3394
3395
Guido van Rossume97ee181999-12-20 21:27:22 +00003396# the dlopen() function means we might want to use dynload_shlib.o. some
3397# platforms, such as AIX, have dlopen(), but don't want to use it.
3398echo $ac_n "checking for dlopen""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003399echo "configure:3400: checking for dlopen" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003400if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
3401 echo $ac_n "(cached) $ac_c" 1>&6
3402else
3403 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003404#line 3405 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003405#include "confdefs.h"
3406/* System header to define __stub macros and hopefully few prototypes,
3407 which can conflict with char dlopen(); below. */
3408#include <assert.h>
3409/* Override any gcc2 internal prototype to avoid an error. */
3410/* We use char because int might match the return type of a gcc2
3411 builtin and then its argument prototype would still apply. */
3412char dlopen();
3413
3414int main() {
3415
3416/* The GNU C library defines this for functions which it implements
3417 to always fail with ENOSYS. Some functions are actually named
3418 something starting with __ and the normal name is an alias. */
3419#if defined (__stub_dlopen) || defined (__stub___dlopen)
3420choke me
3421#else
3422dlopen();
3423#endif
3424
3425; return 0; }
3426EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003427if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003428 rm -rf conftest*
3429 eval "ac_cv_func_dlopen=yes"
3430else
3431 echo "configure: failed program was:" >&5
3432 cat conftest.$ac_ext >&5
3433 rm -rf conftest*
3434 eval "ac_cv_func_dlopen=no"
3435fi
3436rm -f conftest*
3437fi
3438
3439if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
3440 echo "$ac_t""yes" 1>&6
3441 :
3442else
3443 echo "$ac_t""no" 1>&6
3444fi
3445
3446
3447# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3448# loading of modules.
3449
3450echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003451echo "configure:3452: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003452if test -z "$DYNLOADFILE"
3453then
3454 case $ac_sys_system/$ac_sys_release in
3455 AIX*) DYNLOADFILE="dynload_aix.o";;
3456 BeOS*) DYNLOADFILE="dynload_beos.o";;
3457 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3458 next/*) DYNLOADFILE="dynload_next.o";;
3459 *)
3460 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3461 # out any dynamic loading
3462 if test "$ac_cv_func_dlopen" = yes
3463 then DYNLOADFILE="dynload_shlib.o"
3464 else DYNLOADFILE="dynload_stub.o"
3465 fi
3466 ;;
3467 esac
3468fi
3469echo "$ac_t""$DYNLOADFILE" 1>&6
3470if test "$DYNLOADFILE" != "dynload_stub.o"
3471then
3472 cat >> confdefs.h <<\EOF
3473#define HAVE_DYNAMIC_LOADING 1
3474EOF
3475
3476fi
3477
Guido van Rossum627b2d71993-12-24 10:39:16 +00003478# checks for library functions
Fred Drake35a092f1999-12-13 16:23:35 +00003479for ac_func in alarm chown clock confstr ctermid ctermid_r dlopen execv \
3480 flock fork fsync fdatasync fpathconf ftime ftruncate \
Fred Drakef581db11999-12-14 21:11:47 +00003481 getgroups getlogin getpeername getpgrp getpid getpwent gettimeofday getwd \
Fred Drake35a092f1999-12-13 16:23:35 +00003482 kill link lstat mkfifo mktime nice pathconf pause plock pthread_init \
3483 putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00003484 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003485 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003486 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
3487 truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00003488do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003489echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003490echo "configure:3491: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003491if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3492 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003493else
3494 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003495#line 3496 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003496#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003497/* System header to define __stub macros and hopefully few prototypes,
3498 which can conflict with char $ac_func(); below. */
3499#include <assert.h>
3500/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003501/* We use char because int might match the return type of a gcc2
3502 builtin and then its argument prototype would still apply. */
3503char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003504
Guido van Rossumf78abae1997-01-21 22:02:36 +00003505int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003506
Guido van Rossum627b2d71993-12-24 10:39:16 +00003507/* The GNU C library defines this for functions which it implements
3508 to always fail with ENOSYS. Some functions are actually named
3509 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003510#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003511choke me
3512#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003513$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003514#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003515
Guido van Rossum7f43da71994-08-01 12:15:30 +00003516; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003517EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003518if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003519 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003520 eval "ac_cv_func_$ac_func=yes"
3521else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003522 echo "configure: failed program was:" >&5
3523 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003524 rm -rf conftest*
3525 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003526fi
3527rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003528fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003529
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003530if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003531 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003532 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003533 cat >> confdefs.h <<EOF
3534#define $ac_tr_func 1
3535EOF
3536
3537else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003538 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003539fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003540done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003541
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003542
3543# check for long file support functions
3544for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003545do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003546echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003547echo "configure:3548: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003548if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3549 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550else
3551 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003552#line 3553 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003553#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003554/* System header to define __stub macros and hopefully few prototypes,
3555 which can conflict with char $ac_func(); below. */
3556#include <assert.h>
3557/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003558/* We use char because int might match the return type of a gcc2
3559 builtin and then its argument prototype would still apply. */
3560char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003561
Guido van Rossumf78abae1997-01-21 22:02:36 +00003562int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003563
Guido van Rossum627b2d71993-12-24 10:39:16 +00003564/* The GNU C library defines this for functions which it implements
3565 to always fail with ENOSYS. Some functions are actually named
3566 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003567#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003568choke me
3569#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003570$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003571#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003572
Guido van Rossum7f43da71994-08-01 12:15:30 +00003573; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003574EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003575if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003576 rm -rf conftest*
3577 eval "ac_cv_func_$ac_func=yes"
3578else
3579 echo "configure: failed program was:" >&5
3580 cat conftest.$ac_ext >&5
3581 rm -rf conftest*
3582 eval "ac_cv_func_$ac_func=no"
3583fi
3584rm -f conftest*
3585fi
3586
3587if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3588 echo "$ac_t""yes" 1>&6
3589 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3590 cat >> confdefs.h <<EOF
3591#define $ac_tr_func 1
3592EOF
3593
3594else
3595 echo "$ac_t""no" 1>&6
3596fi
3597done
3598
3599
3600for ac_func in dup2 getcwd strdup strerror memmove
3601do
3602echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003603echo "configure:3604: checking for $ac_func" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003604if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3605 echo $ac_n "(cached) $ac_c" 1>&6
3606else
3607 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003608#line 3609 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003609#include "confdefs.h"
3610/* System header to define __stub macros and hopefully few prototypes,
3611 which can conflict with char $ac_func(); below. */
3612#include <assert.h>
3613/* Override any gcc2 internal prototype to avoid an error. */
3614/* We use char because int might match the return type of a gcc2
3615 builtin and then its argument prototype would still apply. */
3616char $ac_func();
3617
3618int main() {
3619
3620/* The GNU C library defines this for functions which it implements
3621 to always fail with ENOSYS. Some functions are actually named
3622 something starting with __ and the normal name is an alias. */
3623#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3624choke me
3625#else
3626$ac_func();
3627#endif
3628
3629; return 0; }
3630EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003631if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003632 rm -rf conftest*
3633 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003634else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003635 echo "configure: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003637 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003638 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003639fi
3640rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003641fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003642
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003643if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003644 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003645 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3646 cat >> confdefs.h <<EOF
3647#define $ac_tr_func 1
3648EOF
3649
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003650else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003651 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003652LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003653fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003654done
3655
Guido van Rossumf78abae1997-01-21 22:02:36 +00003656
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003657echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003658echo "configure:3659: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003659if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
3660 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003661else
3662 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003663#line 3664 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003664#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003665/* System header to define __stub macros and hopefully few prototypes,
3666 which can conflict with char getpgrp(); below. */
3667#include <assert.h>
3668/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003669/* We use char because int might match the return type of a gcc2
3670 builtin and then its argument prototype would still apply. */
3671char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003672
Guido van Rossumf78abae1997-01-21 22:02:36 +00003673int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003674
Guido van Rossum627b2d71993-12-24 10:39:16 +00003675/* The GNU C library defines this for functions which it implements
3676 to always fail with ENOSYS. Some functions are actually named
3677 something starting with __ and the normal name is an alias. */
3678#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
3679choke me
3680#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003681getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003682#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003683
3684; return 0; }
3685EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003686if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003687 rm -rf conftest*
3688 eval "ac_cv_func_getpgrp=yes"
3689else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003690 echo "configure: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003692 rm -rf conftest*
3693 eval "ac_cv_func_getpgrp=no"
3694fi
3695rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003696fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003697
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003698if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003699 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003700 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003701#line 3702 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003702#include "confdefs.h"
3703#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003704int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003705getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003706; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003707EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003708if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003709 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003710 cat >> confdefs.h <<\EOF
3711#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003712EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003713
Guido van Rossumf78abae1997-01-21 22:02:36 +00003714else
3715 echo "configure: failed program was:" >&5
3716 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003717fi
3718rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003719else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003720 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003721fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003722
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003723echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003724echo "configure:3725: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003725if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
3726 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003727else
3728 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003729#line 3730 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003730#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003731/* System header to define __stub macros and hopefully few prototypes,
3732 which can conflict with char setpgrp(); below. */
3733#include <assert.h>
3734/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735/* We use char because int might match the return type of a gcc2
3736 builtin and then its argument prototype would still apply. */
3737char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003738
Guido van Rossumf78abae1997-01-21 22:02:36 +00003739int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003740
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003741/* The GNU C library defines this for functions which it implements
3742 to always fail with ENOSYS. Some functions are actually named
3743 something starting with __ and the normal name is an alias. */
3744#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
3745choke me
3746#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003747setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003748#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003749
3750; return 0; }
3751EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003752if { (eval echo configure:3753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003753 rm -rf conftest*
3754 eval "ac_cv_func_setpgrp=yes"
3755else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003756 echo "configure: failed program was:" >&5
3757 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758 rm -rf conftest*
3759 eval "ac_cv_func_setpgrp=no"
3760fi
3761rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003762fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003763
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003764if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003765 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003766 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003767#line 3768 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768#include "confdefs.h"
3769#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003770int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003771setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003772; return 0; }
3773EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003774if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003775 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003776 cat >> confdefs.h <<\EOF
3777#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003778EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003779
Guido van Rossumf78abae1997-01-21 22:02:36 +00003780else
3781 echo "configure: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003783fi
3784rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003785else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003786 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003787fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003789echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003790echo "configure:3791: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003791if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3792 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003793else
3794 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003795#line 3796 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003796#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003797/* System header to define __stub macros and hopefully few prototypes,
3798 which can conflict with char gettimeofday(); below. */
3799#include <assert.h>
3800/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003801/* We use char because int might match the return type of a gcc2
3802 builtin and then its argument prototype would still apply. */
3803char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003804
Guido van Rossumf78abae1997-01-21 22:02:36 +00003805int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003806
3807/* The GNU C library defines this for functions which it implements
3808 to always fail with ENOSYS. Some functions are actually named
3809 something starting with __ and the normal name is an alias. */
3810#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3811choke me
3812#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003813gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003814#endif
3815
3816; return 0; }
3817EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003818if { (eval echo configure:3819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003819 rm -rf conftest*
3820 eval "ac_cv_func_gettimeofday=yes"
3821else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003822 echo "configure: failed program was:" >&5
3823 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003824 rm -rf conftest*
3825 eval "ac_cv_func_gettimeofday=no"
3826fi
3827rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003828fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003829
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003830if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003831 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003832 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003833#line 3834 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003835#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003836int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003837gettimeofday((struct timeval*)0,(struct timezone*)0);
3838; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003839EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003840if { (eval echo configure:3841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003841 :
3842else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003843 echo "configure: failed program was:" >&5
3844 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003845 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003846 cat >> confdefs.h <<\EOF
3847#define GETTIMEOFDAY_NO_TZ 1
3848EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003849
3850fi
3851rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003852else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003853 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003854fi
3855
3856
3857# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003858echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003859echo "configure:3860: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003860if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3861 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862else
3863 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003864#line 3865 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003865#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866#include <sys/types.h>
3867#include <sys/time.h>
3868#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003869int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003870struct tm *tp;
3871; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003872EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003873if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003874 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003875 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003876else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003877 echo "configure: failed program was:" >&5
3878 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003879 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003881fi
3882rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003883fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003884
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003885echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003886if test $ac_cv_header_time = yes; then
3887 cat >> confdefs.h <<\EOF
3888#define TIME_WITH_SYS_TIME 1
3889EOF
3890
3891fi
3892
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003893echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003894echo "configure:3895: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003895if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3896 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003897else
3898 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003899#line 3900 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003900#include "confdefs.h"
3901#include <sys/types.h>
3902#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003903int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003904struct tm *tp; tp->tm_sec;
3905; return 0; }
3906EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003907if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003908 rm -rf conftest*
3909 ac_cv_struct_tm=time.h
3910else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003911 echo "configure: failed program was:" >&5
3912 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003913 rm -rf conftest*
3914 ac_cv_struct_tm=sys/time.h
3915fi
3916rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003917fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003919echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920if test $ac_cv_struct_tm = sys/time.h; then
3921 cat >> confdefs.h <<\EOF
3922#define TM_IN_SYS_TIME 1
3923EOF
3924
3925fi
3926
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003927echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003928echo "configure:3929: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003929if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3930 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003931else
3932 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003933#line 3934 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934#include "confdefs.h"
3935#include <sys/types.h>
3936#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003937int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003938struct tm tm; tm.tm_zone;
3939; return 0; }
3940EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003941if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942 rm -rf conftest*
3943 ac_cv_struct_tm_zone=yes
3944else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003945 echo "configure: failed program was:" >&5
3946 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003947 rm -rf conftest*
3948 ac_cv_struct_tm_zone=no
3949fi
3950rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003951fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003952
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003953echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954if test "$ac_cv_struct_tm_zone" = yes; then
3955 cat >> confdefs.h <<\EOF
3956#define HAVE_TM_ZONE 1
3957EOF
3958
3959else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003960 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003961echo "configure:3962: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003962if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3963 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003964else
3965 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003966#line 3967 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003967#include "confdefs.h"
3968#include <time.h>
3969#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003971#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003972int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003973atoi(*tzname);
3974; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003975EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00003976if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003977 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003978 ac_cv_var_tzname=yes
3979else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003980 echo "configure: failed program was:" >&5
3981 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003982 rm -rf conftest*
3983 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003984fi
3985rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003986fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003987
3988echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989 if test $ac_cv_var_tzname = yes; then
3990 cat >> confdefs.h <<\EOF
3991#define HAVE_TZNAME 1
3992EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003993
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994 fi
3995fi
3996
3997
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003998echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00003999echo "configure:4000: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004000if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
4001 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004002else
4003 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004004#line 4005 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004005#include "confdefs.h"
4006#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004007int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004008return altzone;
4009; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004010EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004011if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004012 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004013 ac_cv_header_time_altzone=yes
4014else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017 rm -rf conftest*
4018 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004019fi
4020rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004021fi
4022
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004023echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024if test $ac_cv_header_time_altzone = yes; then
4025 cat >> confdefs.h <<\EOF
4026#define HAVE_ALTZONE 1
4027EOF
4028
4029fi
4030
Guido van Rossumda88dad1995-01-26 00:46:29 +00004031was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004032echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004033echo "configure:4034: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004034cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004035#line 4036 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004036#include "confdefs.h"
4037
4038#include <sys/types.h>
4039#include <sys/select.h>
4040#include <sys/time.h>
4041
Guido van Rossumf78abae1997-01-21 22:02:36 +00004042int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004043;
4044; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004045EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004046if { (eval echo configure:4047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004047 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048 cat >> confdefs.h <<\EOF
4049#define SYS_SELECT_WITH_SYS_TIME 1
4050EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004051 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004052else
4053 echo "configure: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004055fi
4056rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004057echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004058
4059# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004060
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004061echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004062echo "configure:4063: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004063if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
4064 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065else
4066 if test "$GCC" = yes; then
4067 # GCC predefines this symbol on systems where it applies.
4068cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004069#line 4070 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070#include "confdefs.h"
4071#ifdef __CHAR_UNSIGNED__
4072 yes
4073#endif
4074
4075EOF
4076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4077 egrep "yes" >/dev/null 2>&1; then
4078 rm -rf conftest*
4079 ac_cv_c_char_unsigned=yes
4080else
4081 rm -rf conftest*
4082 ac_cv_c_char_unsigned=no
4083fi
4084rm -f conftest*
4085
4086else
4087if test "$cross_compiling" = yes; then
4088 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4089else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004090 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004091#line 4092 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004092#include "confdefs.h"
4093/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004095#define volatile
4096#endif
4097main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004098 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004099}
4100EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004101if { (eval echo configure:4102: \"$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 +00004102then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004103 ac_cv_c_char_unsigned=yes
4104else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004105 echo "configure: failed program was:" >&5
4106 cat conftest.$ac_ext >&5
4107 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004108 ac_cv_c_char_unsigned=no
4109fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004110rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004111fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004112
4113fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004114fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004115
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004116echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004117if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4118 cat >> confdefs.h <<\EOF
4119#define __CHAR_UNSIGNED__ 1
4120EOF
4121
4122fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004123
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004124echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004125echo "configure:4126: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004126if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4127 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004128else
4129 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004130#line 4131 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131#include "confdefs.h"
4132
Guido van Rossumf78abae1997-01-21 22:02:36 +00004133int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134
4135/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004136typedef int charset[2]; const charset x;
4137/* SunOS 4.1.1 cc rejects this. */
4138char const *const *ccp;
4139char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004140/* NEC SVR4.0.2 mips cc rejects this. */
4141struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004142static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004143/* AIX XL C 1.02.0.0 rejects this.
4144 It does not let you subtract one const X* pointer from another in an arm
4145 of an if-expression whose if-part is not a constant expression */
4146const char *g = "string";
4147ccp = &g + (g ? g-g : 0);
4148/* HPUX 7.0 cc rejects these. */
4149++ccp;
4150p = (char**) ccp;
4151ccp = (char const *const *) p;
4152{ /* SCO 3.2v4 cc rejects this. */
4153 char *t;
4154 char const *s = 0 ? (char *) 0 : (char const *) 0;
4155
4156 *t++ = 0;
4157}
4158{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004160 const int *foo = &x[0];
4161 ++foo;
4162}
4163{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4164 typedef const int *iptr;
4165 iptr p = 0;
4166 ++p;
4167}
4168{ /* AIX XL C 1.02.0.0 rejects this saying
4169 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4170 struct s { int j; const int *ap[3]; };
4171 struct s *b; b->j = 5;
4172}
4173{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4174 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175}
4176
4177; return 0; }
4178EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +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_c_const=yes
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_c_const=no
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_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192if test $ac_cv_c_const = no; then
4193 cat >> confdefs.h <<\EOF
4194#define const
4195EOF
4196
4197fi
4198
Guido van Rossumef2255b2000-03-10 22:30:29 +00004199echo $ac_n "checking for inline""... $ac_c" 1>&6
4200echo "configure:4201: checking for inline" >&5
4201if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4202 echo $ac_n "(cached) $ac_c" 1>&6
4203else
4204 ac_cv_c_inline=no
4205for ac_kw in inline __inline__ __inline; do
4206 cat > conftest.$ac_ext <<EOF
4207#line 4208 "configure"
4208#include "confdefs.h"
4209
4210int main() {
4211} $ac_kw foo() {
4212; return 0; }
4213EOF
4214if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4215 rm -rf conftest*
4216 ac_cv_c_inline=$ac_kw; break
4217else
4218 echo "configure: failed program was:" >&5
4219 cat conftest.$ac_ext >&5
4220fi
4221rm -f conftest*
4222done
4223
4224fi
4225
4226echo "$ac_t""$ac_cv_c_inline" 1>&6
4227case "$ac_cv_c_inline" in
4228 inline | yes) ;;
4229 no) cat >> confdefs.h <<\EOF
4230#define inline
4231EOF
4232 ;;
4233 *) cat >> confdefs.h <<EOF
4234#define inline $ac_cv_c_inline
4235EOF
4236 ;;
4237esac
4238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239
Guido van Rossumda88dad1995-01-26 00:46:29 +00004240works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004241echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004242echo "configure:4243: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004244#line 4245 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245#include "confdefs.h"
4246
Guido van Rossumf78abae1997-01-21 22:02:36 +00004247int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248volatile int x; x = 0;
4249; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004251if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004252 rm -rf conftest*
4253 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004254else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 echo "configure: failed program was:" >&5
4256 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258 cat >> confdefs.h <<\EOF
4259#define volatile
4260EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261
4262fi
4263rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004264echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004265
Guido van Rossumda88dad1995-01-26 00:46:29 +00004266works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004267echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004268echo "configure:4269: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004270#line 4271 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004271#include "confdefs.h"
4272
Guido van Rossumf78abae1997-01-21 22:02:36 +00004273int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274signed char c;
4275; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004276EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004277if { (eval echo configure:4278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004278 rm -rf conftest*
4279 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004280else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004281 echo "configure: failed program was:" >&5
4282 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004283 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284 cat >> confdefs.h <<\EOF
4285#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004286EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004287
4288fi
4289rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004290echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004291
Guido van Rossumda88dad1995-01-26 00:46:29 +00004292have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004293echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004294echo "configure:4295: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004296#line 4297 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004297#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004298int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004299int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300return foo(10);
4301; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004302EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004303if { (eval echo configure:4304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304 rm -rf conftest*
4305 cat >> confdefs.h <<\EOF
4306#define HAVE_PROTOTYPES 1
4307EOF
4308 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004309else
4310 echo "configure: failed program was:" >&5
4311 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004312fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004313rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004314echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004315
Guido van Rossumda88dad1995-01-26 00:46:29 +00004316works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004317echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004318echo "configure:4319: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004319cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004320#line 4321 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004321#include "confdefs.h"
4322
4323#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004324int foo(int x, ...) {
4325 va_list va;
4326 va_start(va, x);
4327 va_arg(va, int);
4328 va_arg(va, char *);
4329 va_arg(va, double);
4330 return 0;
4331}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004332
Guido van Rossumf78abae1997-01-21 22:02:36 +00004333int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004334return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004335; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004336EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004337if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004338 rm -rf conftest*
4339 cat >> confdefs.h <<\EOF
4340#define HAVE_STDARG_PROTOTYPES 1
4341EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004342 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004343else
4344 echo "configure: failed program was:" >&5
4345 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004346fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004348echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004349
Guido van Rossumda88dad1995-01-26 00:46:29 +00004350if test "$have_prototypes" = yes; then
4351bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004352echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004353echo "configure:4354: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004354cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004355#line 4356 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004356#include "confdefs.h"
4357#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004358int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359char **t;execve("@",t,t);
4360; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004361EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004362if { (eval echo configure:4363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363 :
4364else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004365 echo "configure: failed program was:" >&5
4366 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004367 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004368 cat >> confdefs.h <<\EOF
4369#define BAD_EXEC_PROTOTYPES 1
4370EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004371 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004372fi
4373rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004374echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004375fi
4376
Guido van Rossumda88dad1995-01-26 00:46:29 +00004377bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004378echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004379echo "configure:4380: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380if test "$cross_compiling" = yes; then
4381 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4382else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004383 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004384#line 4385 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004385#include "confdefs.h"
4386
4387struct s { int a; int b; };
4388static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389int foobar() {
4390 static int random;
4391 random = (int) &foo;
4392 return random;
4393}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004394static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395main() {
4396 exit(!((int)&foo == foobar()));
4397}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004398
4399EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004400if { (eval echo configure:4401: \"$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 +00004401then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004402 :
4403else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004404 echo "configure: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407 cat >> confdefs.h <<\EOF
4408#define BAD_STATIC_FORWARD 1
4409EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004410 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004411fi
4412rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004413fi
4414
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004415echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004416
Guido van Rossumda88dad1995-01-26 00:46:29 +00004417va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004418echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004419echo "configure:4420: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004421#line 4422 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004422#include "confdefs.h"
4423
4424#ifdef HAVE_STDARG_PROTOTYPES
4425#include <stdarg.h>
4426#else
4427#include <varargs.h>
4428#endif
4429
Guido van Rossumf78abae1997-01-21 22:02:36 +00004430int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004431va_list list1, list2; list1 = list2;
4432; return 0; }
4433EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004434if { (eval echo configure:4435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004435 :
4436else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004437 echo "configure: failed program was:" >&5
4438 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004439 rm -rf conftest*
4440 cat >> confdefs.h <<\EOF
4441#define VA_LIST_IS_ARRAY 1
4442EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004443 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444fi
4445rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004446echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004447
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004448# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4449echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004450echo "configure:4451: checking for gethostbyname_r" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004451if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
4452 echo $ac_n "(cached) $ac_c" 1>&6
4453else
4454 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004455#line 4456 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004456#include "confdefs.h"
4457/* System header to define __stub macros and hopefully few prototypes,
4458 which can conflict with char gethostbyname_r(); below. */
4459#include <assert.h>
4460/* Override any gcc2 internal prototype to avoid an error. */
4461/* We use char because int might match the return type of a gcc2
4462 builtin and then its argument prototype would still apply. */
4463char gethostbyname_r();
4464
4465int main() {
4466
4467/* The GNU C library defines this for functions which it implements
4468 to always fail with ENOSYS. Some functions are actually named
4469 something starting with __ and the normal name is an alias. */
4470#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
4471choke me
4472#else
4473gethostbyname_r();
4474#endif
4475
4476; return 0; }
4477EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004478if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004479 rm -rf conftest*
4480 eval "ac_cv_func_gethostbyname_r=yes"
4481else
4482 echo "configure: failed program was:" >&5
4483 cat conftest.$ac_ext >&5
4484 rm -rf conftest*
4485 eval "ac_cv_func_gethostbyname_r=no"
4486fi
4487rm -f conftest*
4488fi
4489
4490if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
4491 echo "$ac_t""yes" 1>&6
4492
4493 cat >> confdefs.h <<\EOF
4494#define HAVE_GETHOSTBYNAME_R 1
4495EOF
4496
4497 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004498echo "configure:4499: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004499 OLD_CFLAGS=$CFLAGS
4500 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
4501 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004502#line 4503 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004503#include "confdefs.h"
4504
4505# include <netdb.h>
4506
4507int main() {
4508
4509 char *name;
4510 struct hostent *he, *res;
4511 char buffer[2048];
4512 int buflen = 2048;
4513 int h_errnop;
4514
4515 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
4516
4517; return 0; }
4518EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004519if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004520 rm -rf conftest*
4521
4522 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004523#define HAVE_GETHOSTBYNAME_R 1
4524EOF
4525
4526 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004527#define HAVE_GETHOSTBYNAME_R_6_ARG 1
4528EOF
4529
4530 echo "$ac_t""yes" 1>&6
4531
4532else
4533 echo "configure: failed program was:" >&5
4534 cat conftest.$ac_ext >&5
4535 rm -rf conftest*
4536
4537 echo "$ac_t""no" 1>&6
4538 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004539echo "configure:4540: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004540 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004541#line 4542 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004542#include "confdefs.h"
4543
4544# include <netdb.h>
4545
4546int main() {
4547
4548 char *name;
4549 struct hostent *he;
4550 char buffer[2048];
4551 int buflen = 2048;
4552 int h_errnop;
4553
4554 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
4555
4556; return 0; }
4557EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004558if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004559 rm -rf conftest*
4560
4561 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004562#define HAVE_GETHOSTBYNAME_R 1
4563EOF
4564
4565 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004566#define HAVE_GETHOSTBYNAME_R_5_ARG 1
4567EOF
4568
4569 echo "$ac_t""yes" 1>&6
4570
4571else
4572 echo "configure: failed program was:" >&5
4573 cat conftest.$ac_ext >&5
4574 rm -rf conftest*
4575
4576 echo "$ac_t""no" 1>&6
4577 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004578echo "configure:4579: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004579 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004580#line 4581 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004581#include "confdefs.h"
4582
4583# include <netdb.h>
4584
4585int main() {
4586
4587 char *name;
4588 struct hostent *he;
4589 struct hostent_data data;
4590
4591 (void) gethostbyname_r(name, he, &data);
4592
4593; return 0; }
4594EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004595if { (eval echo configure:4596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004596 rm -rf conftest*
4597
4598 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004599#define HAVE_GETHOSTBYNAME_R 1
4600EOF
4601
4602 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004603#define HAVE_GETHOSTBYNAME_R_3_ARG 1
4604EOF
4605
4606 echo "$ac_t""yes" 1>&6
4607
4608else
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612
4613 echo "$ac_t""no" 1>&6
4614
4615fi
4616rm -f conftest*
4617
4618fi
4619rm -f conftest*
4620
4621fi
4622rm -f conftest*
4623 CFLAGS=$OLD_CFLAGS
4624
4625else
4626 echo "$ac_t""no" 1>&6
4627
4628 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004629echo "configure:4630: checking for gethostbyname" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004630if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4631 echo $ac_n "(cached) $ac_c" 1>&6
4632else
4633 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004634#line 4635 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004635#include "confdefs.h"
4636/* System header to define __stub macros and hopefully few prototypes,
4637 which can conflict with char gethostbyname(); below. */
4638#include <assert.h>
4639/* Override any gcc2 internal prototype to avoid an error. */
4640/* We use char because int might match the return type of a gcc2
4641 builtin and then its argument prototype would still apply. */
4642char gethostbyname();
4643
4644int main() {
4645
4646/* The GNU C library defines this for functions which it implements
4647 to always fail with ENOSYS. Some functions are actually named
4648 something starting with __ and the normal name is an alias. */
4649#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4650choke me
4651#else
4652gethostbyname();
4653#endif
4654
4655; return 0; }
4656EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004657if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004658 rm -rf conftest*
4659 eval "ac_cv_func_gethostbyname=yes"
4660else
4661 echo "configure: failed program was:" >&5
4662 cat conftest.$ac_ext >&5
4663 rm -rf conftest*
4664 eval "ac_cv_func_gethostbyname=no"
4665fi
4666rm -f conftest*
4667fi
4668
4669if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4670 echo "$ac_t""yes" 1>&6
4671 cat >> confdefs.h <<\EOF
4672#define HAVE_GETHOSTBYNAME 1
4673EOF
4674
4675else
4676 echo "$ac_t""no" 1>&6
4677fi
4678
4679
4680fi
4681
4682
4683
4684
4685
4686
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004687
Guido van Rossum627b2d71993-12-24 10:39:16 +00004688# checks for system services
4689# (none yet)
4690
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004691# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00004692echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004693echo "configure:4694: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004694ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004695if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004696 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004697else
4698 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004699LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004700cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004701#line 4702 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004702#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004703/* Override any gcc2 internal prototype to avoid an error. */
4704/* We use char because int might match the return type of a gcc2
4705 builtin and then its argument prototype would still apply. */
4706char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004707
Guido van Rossumf78abae1997-01-21 22:02:36 +00004708int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004709__fpu_control()
4710; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004711EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004712if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004713 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004714 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004715else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004716 echo "configure: failed program was:" >&5
4717 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004718 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004719 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004720fi
4721rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004722LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004723
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004724fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004725if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004726 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004727 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4728 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729 cat >> confdefs.h <<EOF
4730#define $ac_tr_lib 1
4731EOF
4732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004733 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004734
4735else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004736 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004737fi
4738
4739
Guido van Rossum7f253911997-05-09 02:42:48 +00004740# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00004741echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004742echo "configure:4743: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00004743# Check whether --with-fpectl or --without-fpectl was given.
4744if test "${with_fpectl+set}" = set; then
4745 withval="$with_fpectl"
4746
4747if test "$withval" != no
4748then cat >> confdefs.h <<\EOF
4749#define WANT_SIGFPE_HANDLER 1
4750EOF
4751 echo "$ac_t""yes" 1>&6
4752else echo "$ac_t""no" 1>&6
4753fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00004754else
4755 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00004756fi
4757
4758
Guido van Rossum7f43da71994-08-01 12:15:30 +00004759# check for --with-libm=...
4760
Guido van Rossum563e7081996-09-10 18:20:48 +00004761case $ac_sys_system in
4762next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004763BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00004764*) LIBM=-lm
4765esac
Guido van Rossum7f253911997-05-09 02:42:48 +00004766echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004767echo "configure:4768: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004768# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004769if test "${with_libm+set}" = set; then
4770 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004771
Guido van Rossum7f253911997-05-09 02:42:48 +00004772if test "$withval" = no
4773then LIBM=
4774 echo "$ac_t""force LIBM empty" 1>&6
4775elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004776then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004777 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004779fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004780else
4781 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004782fi
4783
4784
4785# check for --with-libc=...
4786
Guido van Rossum7f253911997-05-09 02:42:48 +00004787echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004788echo "configure:4789: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004789# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004790if test "${with_libc+set}" = set; then
4791 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004792
Guido van Rossum7f253911997-05-09 02:42:48 +00004793if test "$withval" = no
4794then LIBC=
4795 echo "$ac_t""force LIBC empty" 1>&6
4796elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004797then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004798 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004799else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004800fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004801else
4802 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004803fi
4804
4805
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004806# check for hypot() in math library
4807LIBS_SAVE=$LIBS
4808LIBS="$LIBS $LIBM"
4809for ac_func in hypot
4810do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004811echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004812echo "configure:4813: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004813if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4814 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004815else
4816 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004817#line 4818 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004818#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004819/* System header to define __stub macros and hopefully few prototypes,
4820 which can conflict with char $ac_func(); below. */
4821#include <assert.h>
4822/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004823/* We use char because int might match the return type of a gcc2
4824 builtin and then its argument prototype would still apply. */
4825char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004826
Guido van Rossumf78abae1997-01-21 22:02:36 +00004827int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004828
4829/* The GNU C library defines this for functions which it implements
4830 to always fail with ENOSYS. Some functions are actually named
4831 something starting with __ and the normal name is an alias. */
4832#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4833choke me
4834#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004835$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004836#endif
4837
4838; return 0; }
4839EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004840if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004841 rm -rf conftest*
4842 eval "ac_cv_func_$ac_func=yes"
4843else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004844 echo "configure: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004846 rm -rf conftest*
4847 eval "ac_cv_func_$ac_func=no"
4848fi
4849rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004850fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004851
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004852if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004853 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004854 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004855 cat >> confdefs.h <<EOF
4856#define $ac_tr_func 1
4857EOF
4858
4859else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004860 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004861fi
4862done
4863
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004864for ac_func in hypot
4865do
4866echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004867echo "configure:4868: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004868if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4869 echo $ac_n "(cached) $ac_c" 1>&6
4870else
4871 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004872#line 4873 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004873#include "confdefs.h"
4874/* System header to define __stub macros and hopefully few prototypes,
4875 which can conflict with char $ac_func(); below. */
4876#include <assert.h>
4877/* Override any gcc2 internal prototype to avoid an error. */
4878/* We use char because int might match the return type of a gcc2
4879 builtin and then its argument prototype would still apply. */
4880char $ac_func();
4881
Guido van Rossumf78abae1997-01-21 22:02:36 +00004882int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004883
4884/* The GNU C library defines this for functions which it implements
4885 to always fail with ENOSYS. Some functions are actually named
4886 something starting with __ and the normal name is an alias. */
4887#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4888choke me
4889#else
4890$ac_func();
4891#endif
4892
4893; return 0; }
4894EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004895if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004896 rm -rf conftest*
4897 eval "ac_cv_func_$ac_func=yes"
4898else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004899 echo "configure: failed program was:" >&5
4900 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004901 rm -rf conftest*
4902 eval "ac_cv_func_$ac_func=no"
4903fi
4904rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004905fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004906
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004907if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4908 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004909 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4910 cat >> confdefs.h <<EOF
4911#define $ac_tr_func 1
4912EOF
4913
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004914else
4915 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004916LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004917fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004918done
4919
Guido van Rossumf78abae1997-01-21 22:02:36 +00004920
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004921LIBS=$LIBS_SAVE
4922
Guido van Rossumda88dad1995-01-26 00:46:29 +00004923# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004924echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004925echo "configure:4926: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004926if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
4927 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004928else
4929 if test "$cross_compiling" = yes; then
4930 ac_cv_func_getopt=no
4931else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004932 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004933#line 4934 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004934#include "confdefs.h"
4935#include <stdio.h>
4936extern int optind, opterr, getopt();
4937extern char* optarg;
4938int main() {
4939 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
4940 opterr = 0;
4941 if (getopt(3, av, "f:") == 'f') { exit(1); }
4942 exit(0);
4943}
4944EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004945if { (eval echo configure:4946: \"$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 +00004946then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004947 ac_cv_func_getopt=yes
4948else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004949 echo "configure: failed program was:" >&5
4950 cat conftest.$ac_ext >&5
4951 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00004952 ac_cv_func_getopt=no
4953fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004954rm -fr conftest*
4955fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004956
4957fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004958echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004959test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
4960
Guido van Rossumad713701997-07-10 22:42:38 +00004961# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00004962echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00004963echo "configure:4964: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00004964if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
4965 echo $ac_n "(cached) $ac_c" 1>&6
4966else
4967 if test "$cross_compiling" = yes; then
4968 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4969else
4970 cat > conftest.$ac_ext <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004971#line 4972 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00004972#include "confdefs.h"
4973#include <stdio.h>
4974#ifdef HAVE_STDLIB
4975#include <stdlib.h>
4976#else
4977char *malloc(), *realloc();
4978int *free();
4979#endif
4980main() {
4981 char *p;
4982 p = malloc(0);
4983 if (p == NULL) exit(1);
4984 p = realloc(p, 0);
4985 if (p == NULL) exit(1);
4986 free(p);
4987 exit(0);
4988}
4989EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00004990if { (eval echo configure:4991: \"$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 +00004991then
4992 ac_cv_malloc_zero=nonnull
4993else
4994 echo "configure: failed program was:" >&5
4995 cat conftest.$ac_ext >&5
4996 rm -fr conftest*
4997 ac_cv_malloc_zero=null
4998fi
4999rm -fr conftest*
5000fi
5001
5002fi
5003
5004echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5005if test "$ac_cv_malloc_zero" = null
5006then
5007 cat >> confdefs.h <<\EOF
5008#define MALLOC_ZERO_RETURNS_NULL 1
5009EOF
5010
5011fi
5012
Guido van Rossumef2255b2000-03-10 22:30:29 +00005013# check for wchar.h
5014ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5015echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
5016echo "configure:5017: checking for wchar.h" >&5
5017if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5018 echo $ac_n "(cached) $ac_c" 1>&6
5019else
5020 cat > conftest.$ac_ext <<EOF
5021#line 5022 "configure"
5022#include "confdefs.h"
5023#include <wchar.h>
5024EOF
5025ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5026{ (eval echo configure:5027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5027ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5028if test -z "$ac_err"; then
5029 rm -rf conftest*
5030 eval "ac_cv_header_$ac_safe=yes"
5031else
5032 echo "$ac_err" >&5
5033 echo "configure: failed program was:" >&5
5034 cat conftest.$ac_ext >&5
5035 rm -rf conftest*
5036 eval "ac_cv_header_$ac_safe=no"
5037fi
5038rm -f conftest*
5039fi
5040if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5041 echo "$ac_t""yes" 1>&6
5042 cat >> confdefs.h <<\EOF
5043#define HAVE_WCHAR_H 1
5044EOF
5045 wchar_h="yes"
5046else
5047 echo "$ac_t""no" 1>&6
5048wchar_h="no"
5049
5050fi
5051
5052
5053# check for usable wchar_t
5054usable_wchar_t="unkown"
5055echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
5056echo "configure:5057: checking for usable wchar_t" >&5
5057if test "$cross_compiling" = yes; then
5058 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5059else
5060 cat > conftest.$ac_ext <<EOF
5061#line 5062 "configure"
5062#include "confdefs.h"
5063
5064#include "wchar.h"
5065#include "wctype.h"
5066main() {
5067 wchar_t s;
5068 if (sizeof(s) == 2)
5069 exit(0);
5070 else
5071 exit(1);
5072}
5073
5074EOF
5075if { (eval echo configure:5076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5076then
5077 cat >> confdefs.h <<\EOF
5078#define HAVE_USABLE_WCHAR_T 1
5079EOF
5080 usable_wchar_t="yes"
5081else
5082 echo "configure: failed program was:" >&5
5083 cat conftest.$ac_ext >&5
5084 rm -fr conftest*
5085 usable_wchar_t="no"
5086fi
5087rm -fr conftest*
5088fi
5089
5090echo "$ac_t""$usable_wchar_t" 1>&6
5091
5092# check for endianness
5093echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
5094echo "configure:5095: checking whether byte ordering is bigendian" >&5
5095if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
5096 echo $ac_n "(cached) $ac_c" 1>&6
5097else
5098 ac_cv_c_bigendian=unknown
5099# See if sys/param.h defines the BYTE_ORDER macro.
5100cat > conftest.$ac_ext <<EOF
5101#line 5102 "configure"
5102#include "confdefs.h"
5103#include <sys/types.h>
5104#include <sys/param.h>
5105int main() {
5106
5107#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5108 bogus endian macros
5109#endif
5110; return 0; }
5111EOF
5112if { (eval echo configure:5113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5113 rm -rf conftest*
5114 # It does; now see whether it defined to BIG_ENDIAN or not.
5115cat > conftest.$ac_ext <<EOF
5116#line 5117 "configure"
5117#include "confdefs.h"
5118#include <sys/types.h>
5119#include <sys/param.h>
5120int main() {
5121
5122#if BYTE_ORDER != BIG_ENDIAN
5123 not big endian
5124#endif
5125; return 0; }
5126EOF
5127if { (eval echo configure:5128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5128 rm -rf conftest*
5129 ac_cv_c_bigendian=yes
5130else
5131 echo "configure: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
5133 rm -rf conftest*
5134 ac_cv_c_bigendian=no
5135fi
5136rm -f conftest*
5137else
5138 echo "configure: failed program was:" >&5
5139 cat conftest.$ac_ext >&5
5140fi
5141rm -f conftest*
5142if test $ac_cv_c_bigendian = unknown; then
5143if test "$cross_compiling" = yes; then
5144 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5145else
5146 cat > conftest.$ac_ext <<EOF
5147#line 5148 "configure"
5148#include "confdefs.h"
5149main () {
5150 /* Are we little or big endian? From Harbison&Steele. */
5151 union
5152 {
5153 long l;
5154 char c[sizeof (long)];
5155 } u;
5156 u.l = 1;
5157 exit (u.c[sizeof (long) - 1] == 1);
5158}
5159EOF
5160if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5161then
5162 ac_cv_c_bigendian=no
5163else
5164 echo "configure: failed program was:" >&5
5165 cat conftest.$ac_ext >&5
5166 rm -fr conftest*
5167 ac_cv_c_bigendian=yes
5168fi
5169rm -fr conftest*
5170fi
5171
5172fi
5173fi
5174
5175echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5176if test $ac_cv_c_bigendian = yes; then
5177 cat >> confdefs.h <<\EOF
5178#define WORDS_BIGENDIAN 1
5179EOF
5180
5181fi
5182
5183
5184# Check for --with-wctype-functions
5185echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
5186echo "configure:5187: checking for --with-wctype-functions" >&5
5187# Check whether --with-wctype-functions or --without-wctype-functions was given.
5188if test "${with_wctype_functions+set}" = set; then
5189 withval="$with_wctype_functions"
5190
5191if test "$withval" != no
5192then cat >> confdefs.h <<\EOF
5193#define WANT_WCTYPE_FUNCTIONS 1
5194EOF
5195 echo "$ac_t""yes" 1>&6
5196else echo "$ac_t""no" 1>&6
5197fi
5198else
5199 echo "$ac_t""no" 1>&6
5200fi
5201
5202
Guido van Rossum627b2d71993-12-24 10:39:16 +00005203# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005204trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005205cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005206# This file is a shell script that caches the results of configure
5207# tests run on this system so they can be shared between configure
5208# scripts and configure runs. It is not useful on other systems.
5209# If it contains results you don't want to keep, you may remove or edit it.
5210#
5211# By default, configure uses ./config.cache as the cache file,
5212# creating it if it does not exist already. You can give configure
5213# the --cache-file=FILE option to use a different cache file; that is
5214# what configure does when it calls configure scripts in
5215# subdirectories, so they share the cache.
5216# Giving --cache-file=/dev/null disables caching, for debugging configure.
5217# config.status only pays attention to the cache file if you give it the
5218# --recheck option to rerun configure.
5219#
5220EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005221# The following way of writing the cache mishandles newlines in values,
5222# but we know of no workaround that is simple, portable, and efficient.
5223# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005224# Ultrix sh set writes to stderr and can't be redirected directly,
5225# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005226(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005227 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005228 *ac_space=\ *)
5229 # `set' does not quote correctly, so add quotes (double-quote substitution
5230 # turns \\\\ into \\, and sed turns \\ into \).
5231 sed -n \
5232 -e "s/'/'\\\\''/g" \
5233 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5234 ;;
5235 *)
5236 # `set' quotes correctly as required by POSIX, so do not add quotes.
5237 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5238 ;;
5239 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005240if cmp -s $cache_file confcache; then
5241 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005242else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005243 if test -w $cache_file; then
5244 echo "updating cache $cache_file"
5245 cat confcache > $cache_file
5246 else
5247 echo "not updating unwritable cache $cache_file"
5248 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005249fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005250rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005251
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005252trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005253
5254test "x$prefix" = xNONE && prefix=$ac_default_prefix
5255# Let make expand exec_prefix.
5256test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005257
Guido van Rossum7f43da71994-08-01 12:15:30 +00005258# Any assignment to VPATH causes Sun make to only execute
5259# the first set of double-colon rules, so remove it if not needed.
5260# If there is a colon in the path, we need to keep it.
5261if test "x$srcdir" = x.; then
5262 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5263fi
5264
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005265trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005266
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005267DEFS=-DHAVE_CONFIG_H
5268
5269# Without the "./", some shells look in PATH for config.status.
5270: ${CONFIG_STATUS=./config.status}
5271
5272echo creating $CONFIG_STATUS
5273rm -f $CONFIG_STATUS
5274cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005275#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005276# Generated automatically by configure.
5277# Run this file to recreate the current configuration.
5278# This directory was configured as follows,
5279# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5280#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005281# $0 $ac_configure_args
5282#
5283# Compiler output produced by configure, useful for debugging
5284# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005286ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005287for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00005288do
Guido van Rossum7f43da71994-08-01 12:15:30 +00005289 case "\$ac_option" in
5290 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005291 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5292 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00005293 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005294 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005295 exit 0 ;;
5296 -help | --help | --hel | --he | --h)
5297 echo "\$ac_cs_usage"; exit 0 ;;
5298 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005299 esac
5300done
5301
Guido van Rossum7f43da71994-08-01 12:15:30 +00005302ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00005303
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005304trap 'rm -fr `echo "Makefile \
5305 Objects/Makefile \
5306 Parser/Makefile \
5307 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005308 Modules/Makefile.pre \
5309 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005310EOF
5311cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005312
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005313# Protect against being on the right side of a sed subst in config.status.
5314sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5315 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005316$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00005317$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005318s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005319s%@CFLAGS@%$CFLAGS%g
5320s%@CPPFLAGS@%$CPPFLAGS%g
5321s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005322s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005323s%@DEFS@%$DEFS%g
5324s%@LDFLAGS@%$LDFLAGS%g
5325s%@LIBS@%$LIBS%g
5326s%@exec_prefix@%$exec_prefix%g
5327s%@prefix@%$prefix%g
5328s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005329s%@bindir@%$bindir%g
5330s%@sbindir@%$sbindir%g
5331s%@libexecdir@%$libexecdir%g
5332s%@datadir@%$datadir%g
5333s%@sysconfdir@%$sysconfdir%g
5334s%@sharedstatedir@%$sharedstatedir%g
5335s%@localstatedir@%$localstatedir%g
5336s%@libdir@%$libdir%g
5337s%@includedir@%$includedir%g
5338s%@oldincludedir@%$oldincludedir%g
5339s%@infodir@%$infodir%g
5340s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00005341s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005342s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00005343s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00005344s%@SET_CXX@%$SET_CXX%g
5345s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005346s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005347s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
5348s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00005349s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005350s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005351s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005352s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00005353s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5354s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005355s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005356s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005357s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005358s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00005359s%@SO@%$SO%g
5360s%@LDSHARED@%$LDSHARED%g
5361s%@CCSHARED@%$CCSHARED%g
5362s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00005363s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00005364s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005365s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00005366s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005367s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005368s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
5369s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
5370s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005371s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005372s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005373s%@LIBM@%$LIBM%g
5374s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375
5376CEOF
5377EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005378
5379cat >> $CONFIG_STATUS <<\EOF
5380
5381# Split the substitutions into bite-sized pieces for seds with
5382# small command number limits, like on Digital OSF/1 and HP-UX.
5383ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5384ac_file=1 # Number of current file.
5385ac_beg=1 # First line for current file.
5386ac_end=$ac_max_sed_cmds # Line after last line for current file.
5387ac_more_lines=:
5388ac_sed_cmds=""
5389while $ac_more_lines; do
5390 if test $ac_beg -gt 1; then
5391 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5392 else
5393 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5394 fi
5395 if test ! -s conftest.s$ac_file; then
5396 ac_more_lines=false
5397 rm -f conftest.s$ac_file
5398 else
5399 if test -z "$ac_sed_cmds"; then
5400 ac_sed_cmds="sed -f conftest.s$ac_file"
5401 else
5402 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5403 fi
5404 ac_file=`expr $ac_file + 1`
5405 ac_beg=$ac_end
5406 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5407 fi
5408done
5409if test -z "$ac_sed_cmds"; then
5410 ac_sed_cmds=cat
5411fi
5412EOF
5413
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005414cat >> $CONFIG_STATUS <<EOF
5415
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005416CONFIG_FILES=\${CONFIG_FILES-"Makefile \
5417 Objects/Makefile \
5418 Parser/Makefile \
5419 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005420 Modules/Makefile.pre \
5421 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005422EOF
5423cat >> $CONFIG_STATUS <<\EOF
5424for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005425 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005426 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005427 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005428 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5429 *) ac_file_in="${ac_file}.in" ;;
5430 esac
5431
Guido van Rossumf78abae1997-01-21 22:02:36 +00005432 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005433
5434 # Remove last slash and all that follows it. Not all systems have dirname.
5435 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5436 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5437 # The file is in a subdirectory.
5438 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005439 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005440 # A "../" for each directory in $ac_dir_suffix.
5441 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5442 else
5443 ac_dir_suffix= ac_dots=
5444 fi
5445
5446 case "$ac_given_srcdir" in
5447 .) srcdir=.
5448 if test -z "$ac_dots"; then top_srcdir=.
5449 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5450 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5451 *) # Relative path.
5452 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5453 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5454 esac
5455
Guido van Rossumf78abae1997-01-21 22:02:36 +00005456
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005457 echo creating "$ac_file"
5458 rm -f "$ac_file"
5459 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5460 case "$ac_file" in
5461 *Makefile*) ac_comsub="1i\\
5462# $configure_input" ;;
5463 *) ac_comsub= ;;
5464 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00005465
5466 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 +00005467 sed -e "$ac_comsub
5468s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005469s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005470s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00005471" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00005473rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005475# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5476# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00005477#
5478# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005479ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5480ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005481ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005482ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005483# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5485ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005486ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005487ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005488# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005489ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5490ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005491ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005492ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005493
Guido van Rossumf78abae1997-01-21 22:02:36 +00005494if test "${CONFIG_HEADERS+set}" != set; then
5495EOF
5496cat >> $CONFIG_STATUS <<EOF
5497 CONFIG_HEADERS="config.h"
5498EOF
5499cat >> $CONFIG_STATUS <<\EOF
5500fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005501for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005502 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005503 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005504 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005505 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5506 *) ac_file_in="${ac_file}.in" ;;
5507 esac
5508
Guido van Rossum7f43da71994-08-01 12:15:30 +00005509 echo creating $ac_file
5510
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005511 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00005512 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5513 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005514
5515EOF
5516
5517# Transform confdefs.h into a sed script conftest.vals that substitutes
5518# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005519# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005520# Protect against being in an unquoted here document in config.status.
5521rm -f conftest.vals
5522cat > conftest.hdr <<\EOF
5523s/[\\&%]/\\&/g
5524s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005525s%#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 +00005526s%ac_d%ac_u%gp
5527s%ac_u%ac_e%gp
5528EOF
5529sed -n -f conftest.hdr confdefs.h > conftest.vals
5530rm -f conftest.hdr
5531
5532# This sed command replaces #undef with comments. This is necessary, for
5533# example, in the case of _POSIX_SOURCE, which is predefined and required
5534# on some systems where configure will not decide to define it.
5535cat >> conftest.vals <<\EOF
5536s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5537EOF
5538
5539# Break up conftest.vals because some shells have a limit on
5540# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005541
5542rm -f conftest.tail
5543while :
5544do
5545 ac_lines=`grep -c . conftest.vals`
5546 # grep -c gives empty output for an empty file on some AIX systems.
5547 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5548 # Write a limited-size here document to conftest.frag.
5549 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5550 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5551 echo 'CEOF
5552 sed -f conftest.frag conftest.in > conftest.out
5553 rm -f conftest.in
5554 mv conftest.out conftest.in
5555' >> $CONFIG_STATUS
5556 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5557 rm -f conftest.vals
5558 mv conftest.tail conftest.vals
5559done
5560rm -f conftest.vals
5561
5562cat >> $CONFIG_STATUS <<\EOF
5563 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00005564 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005565 cat conftest.in >> conftest.h
5566 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00005567 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005568 echo "$ac_file is unchanged"
5569 rm -f conftest.h
5570 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005571 # Remove last slash and all that follows it. Not all systems have dirname.
5572 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5573 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5574 # The file is in a subdirectory.
5575 test ! -d "$ac_dir" && mkdir "$ac_dir"
5576 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005577 rm -f $ac_file
5578 mv conftest.h $ac_file
5579 fi
5580fi; done
5581
Guido van Rossumf78abae1997-01-21 22:02:36 +00005582EOF
5583cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005584
Guido van Rossumf78abae1997-01-21 22:02:36 +00005585EOF
5586cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005587
5588exit 0
5589EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005590chmod +x $CONFIG_STATUS
5591rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005592test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005593