blob: c6ad7a5a7dc12aa64f28d324764545587c4f11b6 [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 Rossumff484182000-02-03 13:50:24 +00003# From configure.in Revision: 1.115
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 Rossum627b2d71993-12-24 10:39:16 +000046
Guido van Rossum7f43da71994-08-01 12:15:30 +000047# Initialize some variables set by options.
48# The variables have the same names as the options, with
49# dashes changed to underlines.
50build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000051cache_file=./config.cache
52exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000053host=NONE
54no_create=
55nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056no_recursion=
57prefix=NONE
58program_prefix=NONE
59program_suffix=NONE
60program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000061silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000062site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000063srcdir=
64target=NONE
65verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066x_includes=NONE
67x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000068bindir='${exec_prefix}/bin'
69sbindir='${exec_prefix}/sbin'
70libexecdir='${exec_prefix}/libexec'
71datadir='${prefix}/share'
72sysconfdir='${prefix}/etc'
73sharedstatedir='${prefix}/com'
74localstatedir='${prefix}/var'
75libdir='${exec_prefix}/lib'
76includedir='${prefix}/include'
77oldincludedir='/usr/include'
78infodir='${prefix}/info'
79mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000080
81# Initialize some other variables.
82subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000083MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000084SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000085# Maximum number of lines to put in a shell here document.
86ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000087
88ac_prev=
89for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000090do
Guido van Rossum627b2d71993-12-24 10:39:16 +000091
Guido van Rossum7f43da71994-08-01 12:15:30 +000092 # If the previous option needs an argument, assign it.
93 if test -n "$ac_prev"; then
94 eval "$ac_prev=\$ac_option"
95 ac_prev=
96 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000097 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000098
Guido van Rossum7f43da71994-08-01 12:15:30 +000099 case "$ac_option" in
100 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
101 *) ac_optarg= ;;
102 esac
103
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000104 # Accept the important Cygnus configure options, so we can diagnose typos.
105
Guido van Rossum7f43da71994-08-01 12:15:30 +0000106 case "$ac_option" in
107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000108 -bindir | --bindir | --bindi | --bind | --bin | --bi)
109 ac_prev=bindir ;;
110 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
111 bindir="$ac_optarg" ;;
112
113 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000114 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000115 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 build="$ac_optarg" ;;
117
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000118 -cache-file | --cache-file | --cache-fil | --cache-fi \
119 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
120 ac_prev=cache_file ;;
121 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
122 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
123 cache_file="$ac_optarg" ;;
124
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
126 ac_prev=datadir ;;
127 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
128 | --da=*)
129 datadir="$ac_optarg" ;;
130
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 -disable-* | --disable-*)
132 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000133 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000134 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000136 fi
137 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
138 eval "enable_${ac_feature}=no" ;;
139
140 -enable-* | --enable-*)
141 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000142 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000143 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000144 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000145 fi
146 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
147 case "$ac_option" in
148 *=*) ;;
149 *) ac_optarg=yes ;;
150 esac
151 eval "enable_${ac_feature}='$ac_optarg'" ;;
152
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
154 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
155 | --exec | --exe | --ex)
156 ac_prev=exec_prefix ;;
157 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
158 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
159 | --exec=* | --exe=* | --ex=*)
160 exec_prefix="$ac_optarg" ;;
161
162 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000163 # Obsolete; use --with-gas.
164 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000165
166 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000167 # Omit some internal or obsolete options to make the list less imposing.
168 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000169 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000170Usage: configure [options] [host]
171Options: [defaults in brackets after descriptions]
172Configuration:
173 --cache-file=FILE cache test results in FILE
174 --help print this message
175 --no-create do not create output files
176 --quiet, --silent do not print \`checking...' messages
177 --version print the version of autoconf that created configure
178Directory and file names:
179 --prefix=PREFIX install architecture-independent files in PREFIX
180 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000181 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000183 --bindir=DIR user executables in DIR [EPREFIX/bin]
184 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
185 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
186 --datadir=DIR read-only architecture-independent data in DIR
187 [PREFIX/share]
188 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
189 --sharedstatedir=DIR modifiable architecture-independent data in DIR
190 [PREFIX/com]
191 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
192 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
193 --includedir=DIR C header files in DIR [PREFIX/include]
194 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
195 --infodir=DIR info documentation in DIR [PREFIX/info]
196 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197 --srcdir=DIR find the sources in DIR [configure dir or ..]
198 --program-prefix=PREFIX prepend PREFIX to installed program names
199 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000200 --program-transform-name=PROGRAM
201 run sed PROGRAM on installed program names
202EOF
203 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000204Host type:
205 --build=BUILD configure for building on BUILD [BUILD=HOST]
206 --host=HOST configure for HOST [guessed]
207 --target=TARGET configure for TARGET [TARGET=HOST]
208Features and packages:
209 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
210 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
211 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
212 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
213 --x-includes=DIR X include files are in DIR
214 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000215EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000216 if test -n "$ac_help"; then
217 echo "--enable and --with options recognized:$ac_help"
218 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000219 exit 0 ;;
220
221 -host | --host | --hos | --ho)
222 ac_prev=host ;;
223 -host=* | --host=* | --hos=* | --ho=*)
224 host="$ac_optarg" ;;
225
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000226 -includedir | --includedir | --includedi | --included | --include \
227 | --includ | --inclu | --incl | --inc)
228 ac_prev=includedir ;;
229 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
230 | --includ=* | --inclu=* | --incl=* | --inc=*)
231 includedir="$ac_optarg" ;;
232
233 -infodir | --infodir | --infodi | --infod | --info | --inf)
234 ac_prev=infodir ;;
235 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
236 infodir="$ac_optarg" ;;
237
238 -libdir | --libdir | --libdi | --libd)
239 ac_prev=libdir ;;
240 -libdir=* | --libdir=* | --libdi=* | --libd=*)
241 libdir="$ac_optarg" ;;
242
243 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
244 | --libexe | --libex | --libe)
245 ac_prev=libexecdir ;;
246 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
247 | --libexe=* | --libex=* | --libe=*)
248 libexecdir="$ac_optarg" ;;
249
250 -localstatedir | --localstatedir | --localstatedi | --localstated \
251 | --localstate | --localstat | --localsta | --localst \
252 | --locals | --local | --loca | --loc | --lo)
253 ac_prev=localstatedir ;;
254 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
255 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
256 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
257 localstatedir="$ac_optarg" ;;
258
259 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
260 ac_prev=mandir ;;
261 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
262 mandir="$ac_optarg" ;;
263
Guido van Rossum7f43da71994-08-01 12:15:30 +0000264 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000265 # Obsolete; use --without-fp.
266 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000267
268 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
269 | --no-cr | --no-c)
270 no_create=yes ;;
271
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000272 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
273 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
274 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000275
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000276 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
277 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
278 | --oldin | --oldi | --old | --ol | --o)
279 ac_prev=oldincludedir ;;
280 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
281 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
282 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
283 oldincludedir="$ac_optarg" ;;
284
Guido van Rossum7f43da71994-08-01 12:15:30 +0000285 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
286 ac_prev=prefix ;;
287 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
288 prefix="$ac_optarg" ;;
289
290 -program-prefix | --program-prefix | --program-prefi | --program-pref \
291 | --program-pre | --program-pr | --program-p)
292 ac_prev=program_prefix ;;
293 -program-prefix=* | --program-prefix=* | --program-prefi=* \
294 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
295 program_prefix="$ac_optarg" ;;
296
297 -program-suffix | --program-suffix | --program-suffi | --program-suff \
298 | --program-suf | --program-su | --program-s)
299 ac_prev=program_suffix ;;
300 -program-suffix=* | --program-suffix=* | --program-suffi=* \
301 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
302 program_suffix="$ac_optarg" ;;
303
304 -program-transform-name | --program-transform-name \
305 | --program-transform-nam | --program-transform-na \
306 | --program-transform-n | --program-transform- \
307 | --program-transform | --program-transfor \
308 | --program-transfo | --program-transf \
309 | --program-trans | --program-tran \
310 | --progr-tra | --program-tr | --program-t)
311 ac_prev=program_transform_name ;;
312 -program-transform-name=* | --program-transform-name=* \
313 | --program-transform-nam=* | --program-transform-na=* \
314 | --program-transform-n=* | --program-transform-=* \
315 | --program-transform=* | --program-transfor=* \
316 | --program-transfo=* | --program-transf=* \
317 | --program-trans=* | --program-tran=* \
318 | --progr-tra=* | --program-tr=* | --program-t=*)
319 program_transform_name="$ac_optarg" ;;
320
321 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
322 | -silent | --silent | --silen | --sile | --sil)
323 silent=yes ;;
324
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000325 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
326 ac_prev=sbindir ;;
327 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
328 | --sbi=* | --sb=*)
329 sbindir="$ac_optarg" ;;
330
331 -sharedstatedir | --sharedstatedir | --sharedstatedi \
332 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
333 | --sharedst | --shareds | --shared | --share | --shar \
334 | --sha | --sh)
335 ac_prev=sharedstatedir ;;
336 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
337 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
338 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
339 | --sha=* | --sh=*)
340 sharedstatedir="$ac_optarg" ;;
341
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000342 -site | --site | --sit)
343 ac_prev=site ;;
344 -site=* | --site=* | --sit=*)
345 site="$ac_optarg" ;;
346
Guido van Rossum7f43da71994-08-01 12:15:30 +0000347 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
348 ac_prev=srcdir ;;
349 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
350 srcdir="$ac_optarg" ;;
351
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000352 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
353 | --syscon | --sysco | --sysc | --sys | --sy)
354 ac_prev=sysconfdir ;;
355 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
356 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
357 sysconfdir="$ac_optarg" ;;
358
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 -target | --target | --targe | --targ | --tar | --ta | --t)
360 ac_prev=target ;;
361 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
362 target="$ac_optarg" ;;
363
364 -v | -verbose | --verbose | --verbos | --verbo | --verb)
365 verbose=yes ;;
366
367 -version | --version | --versio | --versi | --vers)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000368 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 exit 0 ;;
370
371 -with-* | --with-*)
372 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000373 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000375 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000376 fi
377 ac_package=`echo $ac_package| sed 's/-/_/g'`
378 case "$ac_option" in
379 *=*) ;;
380 *) ac_optarg=yes ;;
381 esac
382 eval "with_${ac_package}='$ac_optarg'" ;;
383
384 -without-* | --without-*)
385 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000386 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000387 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389 fi
390 ac_package=`echo $ac_package| sed 's/-/_/g'`
391 eval "with_${ac_package}=no" ;;
392
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000393 --x)
394 # Obsolete; use --with-x.
395 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000396
397 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
398 | --x-incl | --x-inc | --x-in | --x-i)
399 ac_prev=x_includes ;;
400 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
401 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
402 x_includes="$ac_optarg" ;;
403
404 -x-libraries | --x-libraries | --x-librarie | --x-librari \
405 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
406 ac_prev=x_libraries ;;
407 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
408 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
409 x_libraries="$ac_optarg" ;;
410
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000411 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000412 ;;
413
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000414 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000415 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000416 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000418 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000419 { 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 +0000420 fi
421 nonopt="$ac_option"
422 ;;
423
424 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000425done
426
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429fi
430
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000431trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000434# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000435# 1 file creation
436# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000437# 3 some systems may open it to /dev/tty
438# 4 used on the Kubota Titan
439# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000440# 5 compiler messages saved in config.log
441if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000442 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000444 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445fi
446exec 5>./config.log
447
448echo "\
449This file contains any messages produced by compilers while
450running configure, to aid debugging if configure makes a mistake.
451" 1>&5
452
453# Strip out --no-create and --no-recursion so they do not pile up.
454# Also quote any args containing shell metacharacters.
455ac_configure_args=
456for ac_arg
457do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000458 case "$ac_arg" in
459 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
460 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000461 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
462 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
463 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
464 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
465 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 esac
467done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000468
469# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000470# Only set these to C if already set. These must not be set unconditionally
471# because not all systems understand e.g. LANG=C (notably SCO).
472# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
473# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000475if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
476if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
477if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000478
Guido van Rossum7f43da71994-08-01 12:15:30 +0000479# confdefs.h avoids OS command line length limits that DEFS can exceed.
480rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000481# AIX cpp loses on an empty file, so make sure it contains at least a newline.
482echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483
484# A filename unique to this package, relative to the directory that
485# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487
488# Find the source files, if location was not specified.
489if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000490 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000492 ac_prog=$0
493 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
494 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
495 srcdir=$ac_confdir
496 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000497 srcdir=..
498 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000499else
500 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000503 if test "$ac_srcdir_defaulted" = yes; then
504 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000505 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000506 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000507 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000508fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000509srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
510
511# Prefer explicitly selected file to automatically selected ones.
512if test -z "$CONFIG_SITE"; then
513 if test "x$prefix" != xNONE; then
514 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
515 else
516 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
517 fi
518fi
519for ac_site_file in $CONFIG_SITE; do
520 if test -r "$ac_site_file"; then
521 echo "loading site script $ac_site_file"
522 . "$ac_site_file"
523 fi
524done
525
526if test -r "$cache_file"; then
527 echo "loading cache $cache_file"
528 . $cache_file
529else
530 echo "creating cache $cache_file"
531 > $cache_file
532fi
533
Guido van Rossum7f43da71994-08-01 12:15:30 +0000534ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000535# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000536ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000537ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000538ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000539cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000540
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000541ac_exeext=
542ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000543if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
544 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
545 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
546 ac_n= ac_c='
547' ac_t=' '
548 else
549 ac_n=-n ac_c= ac_t=
550 fi
551else
552 ac_n= ac_c='\c' ac_t=
553fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000554
Guido van Rossum0a516c91994-09-12 10:58:40 +0000555
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000556
Guido van Rossum627b2d71993-12-24 10:39:16 +0000557
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000558# Set VERSION so we only need to edit in one place (i.e., here)
559
560VERSION=1.5
561
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000562# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000563if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000564
565 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000566echo "configure:567: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000567 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000568if test "${with_next_archs+set}" = set; then
569 withval="$with_next_archs"
570
Guido van Rossum563e7081996-09-10 18:20:48 +0000571 if test -n "$withval"; then
572 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
573 # GCC does not currently support multi archs on the NeXT
574 with_gcc=no
575 fi
576 echo "$ac_t""$with_next_archs" 1>&6
577
578else
579 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000580fi
581
Guido van Rossum563e7081996-09-10 18:20:48 +0000582
583 if test -z "$MACHDEP"
584 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000585 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000586 sed -e 's/://' -e 's/\./_/'` && \
587 ac_sys_system=next && ac_sys_release=$4
588
Guido van Rossumb97ef171997-09-28 05:44:03 +0000589 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000590 fi
591fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000592
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000593# Check whether --with-next-framework or --without-next-framework was given.
594if test "${with_next_framework+set}" = set; then
595 withval="$with_next_framework"
596 :
597fi
598
599# Check whether --with-dyld or --without-dyld was given.
600if test "${with_dyld+set}" = set; then
601 withval="$with_dyld"
602 :
603fi
604
Guido van Rossum91922671997-10-09 20:24:13 +0000605
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000606# Set name for machine-dependent library files
607
608echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000609echo "configure:610: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000610if test -z "$MACHDEP"
611then
Guido van Rossum563e7081996-09-10 18:20:48 +0000612 ac_sys_system=`uname -s`
613 if test "$ac_sys_system" = "AIX" ; then
614 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000615 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000616 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000617 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000618 ac_md_system=`echo $ac_sys_system |
619 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
620 ac_md_release=`echo $ac_sys_release |
621 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000622 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000623
Guido van Rossum07397971997-04-29 21:49:50 +0000624 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000625 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000626 esac
627fi
Guido van Rossum91922671997-10-09 20:24:13 +0000628
629#
630# SGI compilers allow the specification of the both the ABI and the
631# ISA on the command line. Depending on the values of these switches,
632# different and often incompatable code will be generated.
633#
634# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
635# thus supply support for various ABI/ISA combinations. The MACHDEP
636# variable is also adjusted.
637#
638
639if test ! -z "$SGI_ABI"
640then
641 CC="cc $SGI_ABI"
642 LDFLAGS="$SGI_ABI $LDFLAGS"
643 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
644fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000645echo "$ac_t""$MACHDEP" 1>&6
646
Guido van Rossum91922671997-10-09 20:24:13 +0000647#
648# CCC is the command that compiles C++ programs
649#
650# Not all make programs have this predefined.
651#
Guido van Rossum95012191999-12-16 17:50:52 +0000652#AC_SUBST(SET_CCC)
653#AC_MSG_CHECKING(CCC)
654#if test -z "$CCC"
655#then
656# case $ac_sys_system in
657# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
658# Linux*) SET_CCC="CCC= g++";;
659# *) SET_CCC=""
660# esac
661#else
662# SET_CCC="CCC= ${CCC}"
663#fi
664#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000665
666
Guido van Rossum627b2d71993-12-24 10:39:16 +0000667# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000668echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000669echo "configure:670: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000670# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000671if test "${with_gcc+set}" = set; then
672 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000673
674 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000675 no) CC=cc
676 without_gcc=yes;;
677 yes) CC=gcc
678 without_gcc=no;;
679 *) CC=$withval
680 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000681 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000682else
Guido van Rossume77438c1995-09-13 18:59:59 +0000683
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000684 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000685 OSF1) CC=cc
686 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 BeOS*)
688 # Dunno if it's a good idea to get this over with all at once, or
689 # to handle it in with the other goodies.
690 MACHDEP=beos
691
692 case $BE_HOST_CPU in
693 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000694 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000696 case `uname -r` in
697 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
698 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
699 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000700 CCSHARED=-UUSE_DL_EXPORT
701 LDFLAGS="$LDFLAGS -nodup"
702
703 AR="$PWD/BeOS/ar-fake"
704 RANLIB=:
705
706 cat >> confdefs.h <<\EOF
707#define DL_EXPORT_HEADER "dl_export.h"
708EOF
709
710 ;;
711 x86)
712 CC="gcc -I$PWD/BeOS"
713 without_gcc=no
714 OPT="-DUSE_DL_EXPORT -O3 -mpentiumpro"
715 CCSHARED=-UUSE_DL_EXPORT
716
717 AR="$PWD/BeOS/ar-fake"
718 RANLIB=:
719
720 cat >> confdefs.h <<\EOF
721#define DL_EXPORT_HEADER "dl_export.h"
722EOF
723
724 ;;
725 *)
726 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
727 ;;
728 esac
729 ;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000730 *) without_gcc=no;;
731 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000732fi
733
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000734echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000735
Guido van Rossum95012191999-12-16 17:50:52 +0000736
737
738MAINOBJ=python.o
739echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
740echo "configure:741: checking for --with-cxx=<compiler>" >&5
741# Check whether --with-cxx or --without-cxx was given.
742if test "${with_cxx+set}" = set; then
743 withval="$with_cxx"
744
745 case $withval in
746 no) CXX=
747 with_cxx=no;;
748 *) CXX=$withval
749 MAINOBJ=ccpython.o
750 with_cxx=$withval;;
751 esac
752else
753
754 with_cxx=no
755
756fi
757
758echo "$ac_t""$with_cxx" 1>&6
759SET_CXX="CXX = $CXX"
760
761#AC_MSG_CHECKING(CCC)
762#if test -z "$CCC"
763#then
764# case $ac_sys_system in
765# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
766# Linux*) SET_CCC="CCC= g++";;
767# *) SET_CCC=""
768# esac
769#else
770# SET_CCC="CCC= ${CCC}"
771#fi
772#AC_MSG_RESULT($SET_CCC)
773
Guido van Rossum8b131c51995-03-09 14:10:13 +0000774# If the user switches compilers, we can't believe the cache
775if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
776then
777 { echo "configure: error: cached CC is different -- throw away $cache_file
778(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
779fi
780
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000781# Extract the first word of "gcc", so it can be a program name with args.
782set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000783echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000784echo "configure:785: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000785if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787else
788 if test -n "$CC"; then
789 ac_cv_prog_CC="$CC" # Let the user override the test.
790else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000791 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
792 ac_dummy="$PATH"
793 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794 test -z "$ac_dir" && ac_dir=.
795 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000797 break
798 fi
799 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802fi
803CC="$ac_cv_prog_CC"
804if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000805 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000807 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000809
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000810if test -z "$CC"; then
811 # Extract the first word of "cc", so it can be a program name with args.
812set dummy cc; ac_word=$2
813echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000814echo "configure:815: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
816 echo $ac_n "(cached) $ac_c" 1>&6
817else
818 if test -n "$CC"; then
819 ac_cv_prog_CC="$CC" # Let the user override the test.
820else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000821 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000823 ac_dummy="$PATH"
824 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 test -z "$ac_dir" && ac_dir=.
826 if test -f $ac_dir/$ac_word; then
827 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
828 ac_prog_rejected=yes
829 continue
830 fi
831 ac_cv_prog_CC="cc"
832 break
833 fi
834 done
835 IFS="$ac_save_ifs"
836if test $ac_prog_rejected = yes; then
837 # We found a bogon in the path, so make sure we never use it.
838 set dummy $ac_cv_prog_CC
839 shift
840 if test $# -gt 0; then
841 # We chose a different compiler from the bogus one.
842 # However, it has the same basename, so the bogon will be chosen
843 # first if we set CC to just the basename; use the full file name.
844 shift
845 set dummy "$ac_dir/$ac_word" "$@"
846 shift
847 ac_cv_prog_CC="$@"
848 fi
849fi
850fi
851fi
852CC="$ac_cv_prog_CC"
853if test -n "$CC"; then
854 echo "$ac_t""$CC" 1>&6
855else
856 echo "$ac_t""no" 1>&6
857fi
858
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000859 if test -z "$CC"; then
860 case "`uname -s`" in
861 *win32* | *WIN32*)
862 # Extract the first word of "cl", so it can be a program name with args.
863set dummy cl; ac_word=$2
864echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000865echo "configure:866: checking for $ac_word" >&5
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000866if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
867 echo $ac_n "(cached) $ac_c" 1>&6
868else
869 if test -n "$CC"; then
870 ac_cv_prog_CC="$CC" # Let the user override the test.
871else
872 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
873 ac_dummy="$PATH"
874 for ac_dir in $ac_dummy; do
875 test -z "$ac_dir" && ac_dir=.
876 if test -f $ac_dir/$ac_word; then
877 ac_cv_prog_CC="cl"
878 break
879 fi
880 done
881 IFS="$ac_save_ifs"
882fi
883fi
884CC="$ac_cv_prog_CC"
885if test -n "$CC"; then
886 echo "$ac_t""$CC" 1>&6
887else
888 echo "$ac_t""no" 1>&6
889fi
890 ;;
891 esac
892 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
894fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895
Guido van Rossumf78abae1997-01-21 22:02:36 +0000896echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000897echo "configure:898: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000898
899ac_ext=c
900# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
901ac_cpp='$CPP $CPPFLAGS'
902ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000903ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000904cross_compiling=$ac_cv_prog_cc_cross
905
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000906cat > conftest.$ac_ext << EOF
907
Guido van Rossum95012191999-12-16 17:50:52 +0000908#line 909 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000909#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000910
Guido van Rossumf78abae1997-01-21 22:02:36 +0000911main(){return(0);}
912EOF
Guido van Rossum95012191999-12-16 17:50:52 +0000913if { (eval echo configure:914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000914 ac_cv_prog_cc_works=yes
915 # If we can't run a trivial program, we are probably using a cross compiler.
916 if (./conftest; exit) 2>/dev/null; then
917 ac_cv_prog_cc_cross=no
918 else
919 ac_cv_prog_cc_cross=yes
920 fi
921else
922 echo "configure: failed program was:" >&5
923 cat conftest.$ac_ext >&5
924 ac_cv_prog_cc_works=no
925fi
926rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000927ac_ext=c
928# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
929ac_cpp='$CPP $CPPFLAGS'
930ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
931ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
932cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000933
934echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
935if test $ac_cv_prog_cc_works = no; then
936 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
937fi
938echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000939echo "configure:940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000940echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
941cross_compiling=$ac_cv_prog_cc_cross
942
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000943echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000944echo "configure:945: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000945if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
946 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947else
948 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000949#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000951#endif
952EOF
Guido van Rossum95012191999-12-16 17:50:52 +0000953if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 ac_cv_prog_gcc=yes
955else
956 ac_cv_prog_gcc=no
957fi
958fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000960echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000961
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962if test $ac_cv_prog_gcc = yes; then
963 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000964else
965 GCC=
966fi
967
968ac_test_CFLAGS="${CFLAGS+set}"
969ac_save_CFLAGS="$CFLAGS"
970CFLAGS=
971echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +0000972echo "configure:973: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000973if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000974 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975else
976 echo 'void f(){}' > conftest.c
977if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000978 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000979else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000980 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000981fi
982rm -f conftest*
983
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985
Guido van Rossumf78abae1997-01-21 22:02:36 +0000986echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000987if test "$ac_test_CFLAGS" = set; then
988 CFLAGS="$ac_save_CFLAGS"
989elif test $ac_cv_prog_cc_g = yes; then
990 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000991 CFLAGS="-g -O2"
992 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000993 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 fi
995else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000996 if test "$GCC" = yes; then
997 CFLAGS="-O2"
998 else
999 CFLAGS=
1000 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001fi
1002
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001003
Guido van Rossumdd997f71998-10-07 19:58:26 +00001004case $MACHDEP in
1005bsdos*)
1006 case $CC in
1007 gcc) CC="$CC -D_HAVE_BSDI";;
1008 esac;;
1009esac
1010
Guido van Rossum24b1e751997-08-21 02:29:16 +00001011case $ac_sys_system in
1012hp*|HP*)
1013 case $CC in
1014 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1015 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001016BeOS*)
1017 case $CC in
1018 cc) CC=cc;;
1019 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001020esac
1021
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001022# LDLIBRARY is the name of the library to link against (as opposed to the
1023# name of the library into which to insert object files). On systems
1024# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1025# the Makefiles).
1026
1027
1028LDLIBRARY=''
1029
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001030# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001031# This is altered for AIX and BeOS in order to build the export list before
1032# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001033
1034echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001035echo "configure:1036: checking LINKCC" >&5
1036if test -z "$LINKCC" -a ! -z "$CXX"
1037then
1038 LINKCC="$CXX"
1039fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001040if test -z "$LINKCC"
1041then
1042 case $ac_sys_system in
1043 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001044 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001045 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001046 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001047 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001048 dgux*)
1049 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001050 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001051 esac
1052fi
1053echo "$ac_t""$LINKCC" 1>&6
1054
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001055echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001056echo "configure:1057: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001057
1058# NeXT framework builds require that the 'ar' library be converted into
1059# a bundle using libtool.
1060if test "$with_next_framework"
1061then
1062 LDLIBRARY='libpython$(VERSION).dylib'
1063fi
1064
1065# DG/UX requires some fancy ld contortions to produce a .so from an .a
1066if test "$MACHDEP" = "dguxR4"
1067then
1068 LDLIBRARY='libpython$(VERSION).so'
1069 OPT="$OPT -pic"
1070fi
1071echo "$ac_t""$LDLIBRARY" 1>&6
1072
1073# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1074if test -z "$LDLIBRARY"
1075then
1076 LDLIBRARY='libpython$(VERSION).a'
1077 MAKE_LDLIBRARY="true"
1078else
1079 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1080fi
1081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082# Extract the first word of "ranlib", so it can be a program name with args.
1083set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001084echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001085echo "configure:1086: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001086if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1087 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088else
1089 if test -n "$RANLIB"; then
1090 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1091else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001092 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1093 ac_dummy="$PATH"
1094 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 test -z "$ac_dir" && ac_dir=.
1096 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001098 break
1099 fi
1100 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001102 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001103fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104fi
1105RANLIB="$ac_cv_prog_RANLIB"
1106if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001107 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001109 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001111
1112
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113for ac_prog in ar aal
1114do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115# Extract the first word of "$ac_prog", so it can be a program name with args.
1116set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001117echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001118echo "configure:1119: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001119if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1120 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121else
1122 if test -n "$AR"; then
1123 ac_cv_prog_AR="$AR" # Let the user override the test.
1124else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001125 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1126 ac_dummy="$PATH"
1127 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 test -z "$ac_dir" && ac_dir=.
1129 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131 break
1132 fi
1133 done
1134 IFS="$ac_save_ifs"
1135fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136fi
1137AR="$ac_cv_prog_AR"
1138if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001139 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001141 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144test -n "$AR" && break
1145done
1146test -n "$AR" || AR="ar"
1147
1148
Guido van Rossumda88dad1995-01-26 00:46:29 +00001149
1150
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001151# Install just never works :-(
1152if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001153then
1154 INSTALL=cp
1155 INSTALL_PROGRAM=cp
1156 INSTALL_DATA=cp
1157else
1158 INSTALL_PROGRAM="$INSTALL"
1159 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001160fi
1161
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001162# Not every filesystem supports hard links
1163
1164if test -z "$LN" ; then
1165 case $ac_sys_system in
1166 BeOS*) LN="ln -s";;
1167 *) LN=ln;;
1168 esac
1169fi
1170
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001171# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001172
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001173if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001174then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001175 case $GCC in
1176 yes)
1177 case $ac_cv_prog_cc_g in
1178 yes) OPT="-g -O2";;
1179 *) OPT="-O2";;
1180 esac
1181 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001182 *) OPT="-O";;
1183 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001184fi
1185
Guido van Rossum563e7081996-09-10 18:20:48 +00001186if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001187then
1188 OPT="$OPT $ac_arch_flags"
1189fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001191echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001192echo "configure:1193: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193# On Suns, sometimes $CPP names a directory.
1194if test -n "$CPP" && test -d "$CPP"; then
1195 CPP=
1196fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001197if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001198if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1199 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200else
1201 # This must be in double quotes, not single quotes, because CPP may get
1202 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001203 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 # On the NeXT, cc -E runs the code through the compiler's parser,
1205 # not just through cpp.
1206 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001207#line 1208 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210Syntax Error
1211EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001212ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum95012191999-12-16 17:50:52 +00001213{ (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001214ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215if test -z "$ac_err"; then
1216 :
1217else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001219 echo "configure: failed program was:" >&5
1220 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 rm -rf conftest*
1222 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001224#line 1225 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227Syntax Error
1228EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001229ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum95012191999-12-16 17:50:52 +00001230{ (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001231ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1232if test -z "$ac_err"; then
1233 :
1234else
1235 echo "$ac_err" >&5
1236 echo "configure: failed program was:" >&5
1237 cat conftest.$ac_ext >&5
1238 rm -rf conftest*
1239 CPP="${CC-cc} -nologo -E"
1240 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001241#line 1242 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001242#include "confdefs.h"
1243#include <assert.h>
1244Syntax Error
1245EOF
1246ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum95012191999-12-16 17:50:52 +00001247{ (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001248ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250 :
1251else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001252 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001253 echo "configure: failed program was:" >&5
1254 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001255 rm -rf conftest*
1256 CPP=/lib/cpp
1257fi
1258rm -f conftest*
1259fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001261fi
1262rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001263 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001265 CPP="$ac_cv_prog_CPP"
1266else
1267 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001269echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001271echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001272echo "configure:1273: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001274#line 1275 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275#include "confdefs.h"
1276#ifdef _AIX
1277 yes
1278#endif
1279
1280EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1282 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001284 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285#define _ALL_SOURCE 1
1286EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288else
1289 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001290 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
1292rm -f conftest*
1293
1294
Guido van Rossumf78abae1997-01-21 22:02:36 +00001295ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001296echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001297echo "configure:1298: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001298if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1299 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300else
1301 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001302#line 1303 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303#include "confdefs.h"
1304#include <minix/config.h>
1305EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001306ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum95012191999-12-16 17:50:52 +00001307{ (eval echo configure:1308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001308ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001314 echo "configure: failed program was:" >&5
1315 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316 rm -rf conftest*
1317 eval "ac_cv_header_$ac_safe=no"
1318fi
1319rm -f conftest*
1320fi
1321if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001322 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323 MINIX=yes
1324else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001325 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001326MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327fi
1328
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001329if test "$MINIX" = yes; then
1330 cat >> confdefs.h <<\EOF
1331#define _POSIX_SOURCE 1
1332EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334 cat >> confdefs.h <<\EOF
1335#define _POSIX_1_SOURCE 2
1336EOF
1337
1338 cat >> confdefs.h <<\EOF
1339#define _MINIX 1
1340EOF
1341
1342fi
1343
Guido van Rossumda88dad1995-01-26 00:46:29 +00001344
Guido van Rossum91922671997-10-09 20:24:13 +00001345echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001346echo "configure:1347: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum91922671997-10-09 20:24:13 +00001347if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1348 echo $ac_n "(cached) $ac_c" 1>&6
1349else
1350 ac_save_cc="$CC"
1351CC="$CC -OPT:Olimit=0"
1352if test "$cross_compiling" = yes; then
1353 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1354else
1355 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001356#line 1357 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001357#include "confdefs.h"
1358int main() { return 0; }
1359EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001360if { (eval echo configure:1361: \"$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 +00001361then
1362 ac_cv_opt_olimit_ok=yes
1363else
1364 echo "configure: failed program was:" >&5
1365 cat conftest.$ac_ext >&5
1366 rm -fr conftest*
1367 ac_cv_opt_olimit_ok=no
1368fi
1369rm -fr conftest*
1370fi
1371
1372CC="$ac_save_cc"
1373fi
1374
1375echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001376if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001377 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001378else
1379 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001380echo "configure:1381: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001381 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1382 echo $ac_n "(cached) $ac_c" 1>&6
1383else
1384 ac_save_cc="$CC"
1385 CC="$CC -Olimit 1500"
1386 if test "$cross_compiling" = yes; then
1387 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1388else
1389 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001390#line 1391 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001391#include "confdefs.h"
1392int main() { return 0; }
1393EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001394if { (eval echo configure:1395: \"$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 +00001395then
1396 ac_cv_olimit_ok=yes
1397else
1398 echo "configure: failed program was:" >&5
1399 cat conftest.$ac_ext >&5
1400 rm -fr conftest*
1401 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001402fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001403rm -fr conftest*
1404fi
1405
1406 CC="$ac_save_cc"
1407fi
1408
1409 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1410 if test $ac_cv_olimit_ok = yes; then
1411 OPT="$OPT -Olimit 1500"
1412 fi
1413fi
1414
Guido van Rossum84e7b241996-08-19 21:59:00 +00001415# check for ANSI or K&R ("traditional") preprocessor
1416echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001417echo "configure:1418: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001418cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001419#line 1420 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001420#include "confdefs.h"
1421
1422#define spam(name, doc) {#name, &name, #name "() -- " doc}
1423int foo;
1424struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1425
Guido van Rossumf78abae1997-01-21 22:02:36 +00001426int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001427;
1428; return 0; }
1429EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001430if { (eval echo configure:1431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001431 rm -rf conftest*
1432 cpp_type=ansi
1433else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001434 echo "configure: failed program was:" >&5
1435 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001436 rm -rf conftest*
1437 cat >> confdefs.h <<\EOF
1438#define HAVE_OLD_CPP 1
1439EOF
1440 cpp_type=traditional
1441fi
1442rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001443echo "$ac_t""$cpp_type" 1>&6
1444
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001445# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001446echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001447echo "configure:1448: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001448if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1449 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450else
1451 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001452#line 1453 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001453#include "confdefs.h"
1454#include <stdlib.h>
1455#include <stdarg.h>
1456#include <string.h>
1457#include <float.h>
1458EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001459ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum95012191999-12-16 17:50:52 +00001460{ (eval echo configure:1461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001461ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001462if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001463 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001464 ac_cv_header_stdc=yes
1465else
1466 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001467 echo "configure: failed program was:" >&5
1468 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001469 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001470 ac_cv_header_stdc=no
1471fi
1472rm -f conftest*
1473
1474if test $ac_cv_header_stdc = yes; then
1475 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1476cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001477#line 1478 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001478#include "confdefs.h"
1479#include <string.h>
1480EOF
1481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1482 egrep "memchr" >/dev/null 2>&1; then
1483 :
1484else
1485 rm -rf conftest*
1486 ac_cv_header_stdc=no
1487fi
1488rm -f conftest*
1489
1490fi
1491
1492if test $ac_cv_header_stdc = yes; then
1493 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1494cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001495#line 1496 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001496#include "confdefs.h"
1497#include <stdlib.h>
1498EOF
1499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1500 egrep "free" >/dev/null 2>&1; then
1501 :
1502else
1503 rm -rf conftest*
1504 ac_cv_header_stdc=no
1505fi
1506rm -f conftest*
1507
1508fi
1509
1510if test $ac_cv_header_stdc = yes; then
1511 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1512if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001513 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001514else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001515 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001516#line 1517 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001517#include "confdefs.h"
1518#include <ctype.h>
1519#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1520#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001521#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001522int main () { int i; for (i = 0; i < 256; i++)
1523if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1524exit (0); }
1525
1526EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001527if { (eval echo configure:1528: \"$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 +00001528then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001529 :
1530else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001531 echo "configure: failed program was:" >&5
1532 cat conftest.$ac_ext >&5
1533 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001534 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001535fi
1536rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001537fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001538
1539fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001540fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001541
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001542echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543if test $ac_cv_header_stdc = yes; then
1544 cat >> confdefs.h <<\EOF
1545#define STDC_HEADERS 1
1546EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001547
1548fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001549
Guido van Rossum96013151997-10-08 22:47:52 +00001550for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001551signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001552sys/audioio.h sys/file.h sys/lock.h \
1553sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001554sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001555do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001556ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001557echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001558echo "configure:1559: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001559if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1560 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001561else
1562 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001563#line 1564 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001565#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001567ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum95012191999-12-16 17:50:52 +00001568{ (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001569ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001570if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001571 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572 eval "ac_cv_header_$ac_safe=yes"
1573else
1574 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001575 echo "configure: failed program was:" >&5
1576 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577 rm -rf conftest*
1578 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001579fi
1580rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581fi
1582if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001583 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001584 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001585 cat >> confdefs.h <<EOF
1586#define $ac_tr_hdr 1
1587EOF
1588
1589else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001591fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001592done
1593
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594ac_header_dirent=no
1595for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1596do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001597ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001598echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001599echo "configure:1600: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001600if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1601 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001602else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001603 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001604#line 1605 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001605#include "confdefs.h"
1606#include <sys/types.h>
1607#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001608int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609DIR *dirp = 0;
1610; return 0; }
1611EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001612if { (eval echo configure:1613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001613 rm -rf conftest*
1614 eval "ac_cv_header_dirent_$ac_safe=yes"
1615else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001616 echo "configure: failed program was:" >&5
1617 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001618 rm -rf conftest*
1619 eval "ac_cv_header_dirent_$ac_safe=no"
1620fi
1621rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001622fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001623if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001624 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001625 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001626 cat >> confdefs.h <<EOF
1627#define $ac_tr_hdr 1
1628EOF
1629 ac_header_dirent=$ac_hdr; break
1630else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001631 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632fi
1633done
1634# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1635if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001636echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001637echo "configure:1638: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001638ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001639if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001640 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001641else
1642 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001643LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001645#line 1646 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001646#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001647/* Override any gcc2 internal prototype to avoid an error. */
1648/* We use char because int might match the return type of a gcc2
1649 builtin and then its argument prototype would still apply. */
1650char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651
Guido van Rossumf78abae1997-01-21 22:02:36 +00001652int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653opendir()
1654; return 0; }
1655EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001656if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001658 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001659else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001660 echo "configure: failed program was:" >&5
1661 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001663 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001664fi
1665rm -f conftest*
1666LIBS="$ac_save_LIBS"
1667
1668fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001669if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001670 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671 LIBS="$LIBS -ldir"
1672else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001673 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001674fi
1675
1676else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001677echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001678echo "configure:1679: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001679ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001680if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001681 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001682else
1683 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001684LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001686#line 1687 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001687#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001688/* Override any gcc2 internal prototype to avoid an error. */
1689/* We use char because int might match the return type of a gcc2
1690 builtin and then its argument prototype would still apply. */
1691char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692
Guido van Rossumf78abae1997-01-21 22:02:36 +00001693int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694opendir()
1695; return 0; }
1696EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001697if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001699 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001701 echo "configure: failed program was:" >&5
1702 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001704 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705fi
1706rm -f conftest*
1707LIBS="$ac_save_LIBS"
1708
1709fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001710if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001711 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 LIBS="$LIBS -lx"
1713else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001714 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715fi
1716
1717fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001718
1719
1720# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001721was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001722echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001723echo "configure:1724: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001725#line 1726 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726#include "confdefs.h"
1727#include <time.h>
1728EOF
1729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1730 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001731 rm -rf conftest*
1732 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001733else
1734 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001735 cat >> confdefs.h <<\EOF
1736#define clock_t long
1737EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001738
1739fi
1740rm -f conftest*
1741
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001742echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001743
Guido van Rossum84e7b241996-08-19 21:59:00 +00001744# Add some code to confdefs.h so that the test for off_t works on SCO
1745cat >> confdefs.h <<\EOF
1746#if defined(SCO_DS)
1747#undef _OFF_T
1748#endif
1749EOF
1750
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001751echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001752echo "configure:1753: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001753if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1754 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755else
1756 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001757#line 1758 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001758#include "confdefs.h"
1759#include <sys/types.h>
1760#if STDC_HEADERS
1761#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001762#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001763#endif
1764EOF
1765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001766 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 +00001767 rm -rf conftest*
1768 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001769else
1770 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001771 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001772fi
1773rm -f conftest*
1774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001776echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001777if test $ac_cv_type_mode_t = no; then
1778 cat >> confdefs.h <<\EOF
1779#define mode_t int
1780EOF
1781
1782fi
1783
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001784echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001785echo "configure:1786: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001786if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1787 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788else
1789 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001790#line 1791 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791#include "confdefs.h"
1792#include <sys/types.h>
1793#if STDC_HEADERS
1794#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001795#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796#endif
1797EOF
1798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001799 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 +00001800 rm -rf conftest*
1801 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001802else
1803 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001805fi
1806rm -f conftest*
1807
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001809echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810if test $ac_cv_type_off_t = no; then
1811 cat >> confdefs.h <<\EOF
1812#define off_t long
1813EOF
1814
1815fi
1816
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001817echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001818echo "configure:1819: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001819if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1820 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001821else
1822 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001823#line 1824 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824#include "confdefs.h"
1825#include <sys/types.h>
1826#if STDC_HEADERS
1827#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001828#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001829#endif
1830EOF
1831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001832 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 +00001833 rm -rf conftest*
1834 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001835else
1836 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001838fi
1839rm -f conftest*
1840
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001841fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001842echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001843if test $ac_cv_type_pid_t = no; then
1844 cat >> confdefs.h <<\EOF
1845#define pid_t int
1846EOF
1847
1848fi
1849
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001850echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001851echo "configure:1852: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001852if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1853 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001854else
1855 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001856#line 1857 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001857#include "confdefs.h"
1858#include <sys/types.h>
1859#include <signal.h>
1860#ifdef signal
1861#undef signal
1862#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001863#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001864extern "C" void (*signal (int, void (*)(int)))(int);
1865#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001866void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001867#endif
1868
Guido van Rossumf78abae1997-01-21 22:02:36 +00001869int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001870int i;
1871; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001872EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001873if { (eval echo configure:1874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001874 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001876else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001877 echo "configure: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001879 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001880 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001881fi
1882rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001883fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001884
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001885echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001886cat >> confdefs.h <<EOF
1887#define RETSIGTYPE $ac_cv_type_signal
1888EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001889
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001891echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001892echo "configure:1893: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001893if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1894 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001895else
1896 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001897#line 1898 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898#include "confdefs.h"
1899#include <sys/types.h>
1900#if STDC_HEADERS
1901#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001902#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001903#endif
1904EOF
1905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001906 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 +00001907 rm -rf conftest*
1908 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001909else
1910 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001911 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001912fi
1913rm -f conftest*
1914
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001915fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001916echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001917if test $ac_cv_type_size_t = no; then
1918 cat >> confdefs.h <<\EOF
1919#define size_t unsigned
1920EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001921
1922fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001924echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001925echo "configure:1926: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001926if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1927 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928else
1929 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001930#line 1931 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001931#include "confdefs.h"
1932#include <sys/types.h>
1933EOF
1934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1935 egrep "uid_t" >/dev/null 2>&1; then
1936 rm -rf conftest*
1937 ac_cv_type_uid_t=yes
1938else
1939 rm -rf conftest*
1940 ac_cv_type_uid_t=no
1941fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001942rm -f conftest*
1943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001944fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001945
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001946echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001947if test $ac_cv_type_uid_t = no; then
1948 cat >> confdefs.h <<\EOF
1949#define uid_t int
1950EOF
1951
1952 cat >> confdefs.h <<\EOF
1953#define gid_t int
1954EOF
1955
1956fi
1957
Guido van Rossum627b2d71993-12-24 10:39:16 +00001958
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001959echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001960echo "configure:1961: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001961if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1962 echo $ac_n "(cached) $ac_c" 1>&6
1963else
1964 if test "$cross_compiling" = yes; then
1965 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1966else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001967 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001968#line 1969 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001969#include "confdefs.h"
1970#include <stdio.h>
1971main()
1972{
1973 FILE *f=fopen("conftestval", "w");
1974 if (!f) exit(1);
1975 fprintf(f, "%d\n", sizeof(int));
1976 exit(0);
1977}
1978EOF
Guido van Rossum95012191999-12-16 17:50:52 +00001979if { (eval echo configure:1980: \"$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 +00001980then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001981 ac_cv_sizeof_int=`cat conftestval`
1982else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001983 echo "configure: failed program was:" >&5
1984 cat conftest.$ac_ext >&5
1985 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001986 ac_cv_sizeof_int=0
1987fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001988rm -fr conftest*
1989fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001990
1991fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001992echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1993cat >> confdefs.h <<EOF
1994#define SIZEOF_INT $ac_cv_sizeof_int
1995EOF
1996
1997
1998echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00001999echo "configure:2000: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002000if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2001 echo $ac_n "(cached) $ac_c" 1>&6
2002else
2003 if test "$cross_compiling" = yes; then
2004 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2005else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002006 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002007#line 2008 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002008#include "confdefs.h"
2009#include <stdio.h>
2010main()
2011{
2012 FILE *f=fopen("conftestval", "w");
2013 if (!f) exit(1);
2014 fprintf(f, "%d\n", sizeof(long));
2015 exit(0);
2016}
2017EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002018if { (eval echo configure:2019: \"$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 +00002019then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002020 ac_cv_sizeof_long=`cat conftestval`
2021else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002022 echo "configure: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2024 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002025 ac_cv_sizeof_long=0
2026fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002027rm -fr conftest*
2028fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002029
2030fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002031echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2032cat >> confdefs.h <<EOF
2033#define SIZEOF_LONG $ac_cv_sizeof_long
2034EOF
2035
2036
Guido van Rossumad678af1998-10-02 14:42:15 +00002037echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002038echo "configure:2039: checking size of void *" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002039if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041else
2042 if test "$cross_compiling" = yes; then
2043 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2044else
2045 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002046#line 2047 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002047#include "confdefs.h"
2048#include <stdio.h>
2049main()
2050{
2051 FILE *f=fopen("conftestval", "w");
2052 if (!f) exit(1);
2053 fprintf(f, "%d\n", sizeof(void *));
2054 exit(0);
2055}
2056EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002057if { (eval echo configure:2058: \"$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 +00002058then
2059 ac_cv_sizeof_void_p=`cat conftestval`
2060else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -fr conftest*
2064 ac_cv_sizeof_void_p=0
2065fi
2066rm -fr conftest*
2067fi
2068
2069fi
2070echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2071cat >> confdefs.h <<EOF
2072#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2073EOF
2074
2075
Guido van Rossum0a516c91994-09-12 10:58:40 +00002076
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002077echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002078echo "configure:2079: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002079have_long_long=no
2080cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002081#line 2082 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002082#include "confdefs.h"
2083
2084int main() {
2085long long x; x = (long long)0;
2086; return 0; }
2087EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002088if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002089 rm -rf conftest*
2090 cat >> confdefs.h <<\EOF
2091#define HAVE_LONG_LONG 1
2092EOF
2093 have_long_long=yes
2094else
2095 echo "configure: failed program was:" >&5
2096 cat conftest.$ac_ext >&5
2097fi
2098rm -f conftest*
2099echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002100if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002101echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002102echo "configure:2103: checking size of long long" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002103if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2104 echo $ac_n "(cached) $ac_c" 1>&6
2105else
2106 if test "$cross_compiling" = yes; then
2107 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2108else
2109 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002110#line 2111 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002111#include "confdefs.h"
2112#include <stdio.h>
2113main()
2114{
2115 FILE *f=fopen("conftestval", "w");
2116 if (!f) exit(1);
2117 fprintf(f, "%d\n", sizeof(long long));
2118 exit(0);
2119}
2120EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002121if { (eval echo configure:2122: \"$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 +00002122then
2123 ac_cv_sizeof_long_long=`cat conftestval`
2124else
2125 echo "configure: failed program was:" >&5
2126 cat conftest.$ac_ext >&5
2127 rm -fr conftest*
2128 ac_cv_sizeof_long_long=0
2129fi
2130rm -fr conftest*
2131fi
2132
2133fi
2134echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2135cat >> confdefs.h <<EOF
2136#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2137EOF
2138
2139
2140fi
2141
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002142# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2143echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002144echo "configure:2145: checking size of off_t" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002145if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2146 echo $ac_n "(cached) $ac_c" 1>&6
2147else
2148 if test "$cross_compiling" = yes; then
2149 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2150else
2151 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002152#line 2153 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002153#include "confdefs.h"
2154#include <stdio.h>
2155#include <sys/types.h>
2156main()
2157{
2158 FILE *f=fopen("conftestval", "w");
2159 if (!f) exit(1);
2160 fprintf(f, "%d\n", sizeof(off_t));
2161 exit(0);
2162}
2163EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002164if { (eval echo configure:2165: \"$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 +00002165then
2166 ac_cv_sizeof_off_t=`cat conftestval`
2167else
2168 echo "configure: failed program was:" >&5
2169 cat conftest.$ac_ext >&5
2170 rm -fr conftest*
2171 ac_cv_sizeof_off_t=0
2172fi
2173rm -fr conftest*
2174fi
2175
2176
2177fi
2178
2179echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2180cat >> confdefs.h <<EOF
2181#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2182EOF
2183
2184
2185echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002186echo "configure:2187: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002187if test "$have_long_long" = yes -a \
2188 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2189 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002190 cat >> confdefs.h <<\EOF
2191#define HAVE_LARGEFILE_SUPPORT 1
2192EOF
2193
2194 echo "$ac_t""yes" 1>&6
2195else
2196 echo "$ac_t""no" 1>&6
2197fi
2198
2199
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002200# Minor variations in building a framework between NextStep versions 4 and 5
2201
2202case $ac_sys_system/$ac_sys_release in
2203 next/4*)
2204 ns_undef_sym='__environ'
2205 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2206 next/5*)
2207 ns_undef_sym='_environ'
2208 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2209esac
2210
2211echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002212echo "configure:2213: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002213if test "$with_next_framework"
2214then
2215 OPT="$OPT -fno-common"
2216 # -U __environ is needed since bundles don't have access
2217 # to crt0 when built but will always be linked against it
2218 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2219 cat >> confdefs.h <<\EOF
2220#define WITH_NEXT_FRAMEWORK 1
2221EOF
2222
2223 echo "$ac_t""yes" 1>&6
2224else
2225 echo "$ac_t""no" 1>&6
2226fi
2227
2228echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002229echo "configure:2230: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002230if test "$with_next_framework" -o "$with_dyld"
2231then
2232 if test "$with_dyld"
2233 then
2234 echo "$ac_t""yes" 1>&6
2235 else
2236 echo "$ac_t""required for framework build" 1>&6
2237 fi
2238 cat >> confdefs.h <<\EOF
2239#define WITH_DYLD 1
2240EOF
2241
2242 ns_dyld='set'
2243else
2244 echo "$ac_t""no" 1>&6
2245fi
2246
Guido van Rossum0a516c91994-09-12 10:58:40 +00002247# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002248
2249
2250
2251
Guido van Rossum0a516c91994-09-12 10:58:40 +00002252# SO is the extension of shared libraries `(including the dot!)
2253# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002254echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002255echo "configure:2256: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002256if test -z "$SO"
2257then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002258 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002259 hp*|HP*) SO=.sl;;
2260 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002261 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002262fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002263echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002264# LDSHARED is the ld *command* used to create shared library
2265# -- "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 +00002266# (Shared libraries in this instance are shared modules to be loaded into
2267# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002268echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002269echo "configure:2270: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002270if test -z "$LDSHARED"
2271then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002272 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002273 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002274 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002275 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002276 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002277 SunOS/4*) LDSHARED="ld";;
2278 SunOS/5*) LDSHARED="ld -G";;
2279 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002280 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2281 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002282 next/*)
2283 if test "$ns_dyld"
2284 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2285 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2286 fi
2287 if test "$with_next_framework" ; then
2288 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2289 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002290 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002291 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002292 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002293 FreeBSD*/[34]*) LDSHARED="gcc -shared";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002294 FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
2295 NetBSD*)
2296 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2297 then
2298 LDSHARED="cc -shared"
2299 else
2300 LDSHARED="ld -Bshareable"
2301 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002302 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002303 *) LDSHARED="ld";;
2304 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002305fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002306echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002307# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002308# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002309echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002310echo "configure:2311: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002311if test -z "$CCSHARED"
2312then
Guido van Rossum07397971997-04-29 21:49:50 +00002313 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002314 hp*|HP*) if test "$GCC" = yes;
2315 then CCSHARED="-fpic";
2316 else CCSHARED="+z";
2317 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002318 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002319 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002320 FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
2321 NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002322 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002323 IRIX*/6*) case $CC in
2324 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002325 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002326 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002327 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002328fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002329echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002330# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002331# the python executable -- this is only needed for a few systems
2332echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002333echo "configure:2334: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002334if test -z "$LINKFORSHARED"
2335then
Guido van Rossum07397971997-04-29 21:49:50 +00002336 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002337 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002338 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002339 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002340 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002341 FreeBSD/[34]*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002342 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002343 # -u libsys_s pulls in all symbols in libsys
2344 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2345 # -u __dummy makes the linker aware of the objc runtime
2346 # in System.framework; otherwise, __objcInit (referenced in
2347 # crt1.o) gets erroneously defined as common, which breaks dynamic
2348 # loading of any modules which reference it in System.framework
2349 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002350 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002351 NetBSD*)
2352 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2353 then
2354 LINKFORSHARED="-Wl,--export-dynamic"
2355 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002356 SunOS/5*) case $CC in
2357 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002358 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002359 then
2360 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002361 fi;;
2362 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002363 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002364fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002365echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002366
Guido van Rossum627b2d71993-12-24 10:39:16 +00002367# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002368echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002369echo "configure:2370: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002370ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002372 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002373else
2374 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002375LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002377#line 2378 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002378#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002379/* Override any gcc2 internal prototype to avoid an error. */
2380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002383
Guido van Rossumf78abae1997-01-21 22:02:36 +00002384int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002385dlopen()
2386; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002387EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002389 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002390 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002391else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002394 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002395 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002396fi
2397rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002398LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002399
Guido van Rossum627b2d71993-12-24 10:39:16 +00002400fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002402 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002403 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2404 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002405 cat >> confdefs.h <<EOF
2406#define $ac_tr_lib 1
2407EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002408
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002409 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002410
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002411else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002412 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002413fi
2414 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002415echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002416echo "configure:2417: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002417ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002418if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002419 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002420else
2421 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002422LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002423cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002424#line 2425 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002425#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002426/* Override any gcc2 internal prototype to avoid an error. */
2427/* We use char because int might match the return type of a gcc2
2428 builtin and then its argument prototype would still apply. */
2429char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002430
Guido van Rossumf78abae1997-01-21 22:02:36 +00002431int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002432shl_load()
2433; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002434EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002435if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002436 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002437 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002438else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002439 echo "configure: failed program was:" >&5
2440 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002441 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002442 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002443fi
2444rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002445LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002446
Guido van Rossum627b2d71993-12-24 10:39:16 +00002447fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002448if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002449 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002450 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2451 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002452 cat >> confdefs.h <<EOF
2453#define $ac_tr_lib 1
2454EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002455
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002456 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002457
2458else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002459 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002460fi
2461 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002462
2463# checks for system dependent C++ extensions support
2464case "$ac_sys_system" in
2465 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002466echo "configure:2467: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002467 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002468#line 2469 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002469#include "confdefs.h"
2470#include "/usr/lpp/xlC/include/load.h"
2471int main() {
2472loadAndInit("", 0, "")
2473; return 0; }
2474EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002475if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002476 rm -rf conftest*
2477 cat >> confdefs.h <<\EOF
2478#define AIX_GENUINE_CPLUSPLUS 1
2479EOF
2480
2481 echo "$ac_t""yes" 1>&6
2482else
2483 echo "configure: failed program was:" >&5
2484 cat conftest.$ac_ext >&5
2485 rm -rf conftest*
2486 echo "$ac_t""no" 1>&6
2487fi
2488rm -f conftest*;;
2489 *) ;;
2490esac
2491
Guido van Rossum70c7f481998-03-26 18:44:10 +00002492# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2493# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002494# BeOS' sockets are stashed in libnet.
2495case "$ac_sys_system" in
2496IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002497*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002498echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002499echo "configure:2500: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002500ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002502 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002503else
2504 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002505LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002506cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002507#line 2508 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002508#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002509/* Override any gcc2 internal prototype to avoid an error. */
2510/* We use char because int might match the return type of a gcc2
2511 builtin and then its argument prototype would still apply. */
2512char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002513
Guido van Rossumf78abae1997-01-21 22:02:36 +00002514int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002515t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002516; return 0; }
2517EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002518if { (eval echo configure:2519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002519 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002520 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002521else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002522 echo "configure: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002524 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002525 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002526fi
2527rm -f conftest*
2528LIBS="$ac_save_LIBS"
2529
2530fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002531if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002532 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002533 LIBS="-lnsl $LIBS"
2534else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002535 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002536fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002537 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002538echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002539echo "configure:2540: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002540ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002541if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002542 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002543else
2544 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002545LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002546cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002547#line 2548 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002548#include "confdefs.h"
2549/* Override any gcc2 internal prototype to avoid an error. */
2550/* We use char because int might match the return type of a gcc2
2551 builtin and then its argument prototype would still apply. */
2552char socket();
2553
2554int main() {
2555socket()
2556; return 0; }
2557EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002558if { (eval echo configure:2559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002559 rm -rf conftest*
2560 eval "ac_cv_lib_$ac_lib_var=yes"
2561else
2562 echo "configure: failed program was:" >&5
2563 cat conftest.$ac_ext >&5
2564 rm -rf conftest*
2565 eval "ac_cv_lib_$ac_lib_var=no"
2566fi
2567rm -f conftest*
2568LIBS="$ac_save_LIBS"
2569
2570fi
2571if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2572 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002573 LIBS="-lsocket $LIBS"
2574else
2575 echo "$ac_t""no" 1>&6
2576fi
2577 # SVR4 sockets
2578echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002579echo "configure:2580: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002580ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
2581if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2582 echo $ac_n "(cached) $ac_c" 1>&6
2583else
2584 ac_save_LIBS="$LIBS"
2585LIBS="-lnet $LIBS $LIBS"
2586cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002587#line 2588 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002588#include "confdefs.h"
2589/* Override any gcc2 internal prototype to avoid an error. */
2590/* We use char because int might match the return type of a gcc2
2591 builtin and then its argument prototype would still apply. */
2592char socket();
2593
2594int main() {
2595socket()
2596; return 0; }
2597EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002598if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002599 rm -rf conftest*
2600 eval "ac_cv_lib_$ac_lib_var=yes"
2601else
2602 echo "configure: failed program was:" >&5
2603 cat conftest.$ac_ext >&5
2604 rm -rf conftest*
2605 eval "ac_cv_lib_$ac_lib_var=no"
2606fi
2607rm -f conftest*
2608LIBS="$ac_save_LIBS"
2609
2610fi
2611if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2612 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002613 LIBS="-lnet $LIBS"
2614else
2615 echo "$ac_t""no" 1>&6
2616fi
2617 # BeOS
2618;;
2619esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002620
Guido van Rossuma68acba1996-07-31 17:36:39 +00002621echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002622echo "configure:2623: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002623# Check whether --with-libs or --without-libs was given.
2624if test "${with_libs+set}" = set; then
2625 withval="$with_libs"
2626
2627echo "$ac_t""$withval" 1>&6
2628LIBS="$withval $LIBS"
2629
2630else
2631 echo "$ac_t""no" 1>&6
2632fi
2633
Guido van Rossum7f43da71994-08-01 12:15:30 +00002634
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002635echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002636echo "configure:2637: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002637# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002638if test "${with_readline+set}" = set; then
2639 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002640 echo "$ac_t""$withval" 1>&6
2641{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002642else
Guido van Rossumb06df271997-08-05 21:50:20 +00002643 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002644fi
2645
Guido van Rossum7f43da71994-08-01 12:15:30 +00002646
Guido van Rossum009f7871997-12-04 00:51:42 +00002647
2648USE_THREAD_MODULE="#"
2649
Guido van Rossumec2f0731997-01-22 20:54:01 +00002650echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002651echo "configure:2652: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002652
2653# Check whether --with-dec-threads or --without-dec-threads was given.
2654if test "${with_dec_threads+set}" = set; then
2655 withval="$with_dec_threads"
2656 echo "$ac_t""$withval" 1>&6
2657LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002658if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002659 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002660fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002661else
2662 echo "$ac_t""no" 1>&6
2663fi
2664
2665
2666echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002667echo "configure:2668: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002668# Check whether --with-threads or --without-threads was given.
2669if test "${with_threads+set}" = set; then
2670 withval="$with_threads"
2671 echo "$ac_t""$withval" 1>&6
2672if test "${with_thread+set}" != set; then
2673 with_thread="$withval";
2674fi
2675else
2676 echo "$ac_t""no" 1>&6
2677fi
2678
2679
2680echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002681echo "configure:2682: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002683if test "${with_thread+set}" = set; then
2684 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685
Guido van Rossum009f7871997-12-04 00:51:42 +00002686USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002687echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002688if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002689then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002690fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002691cat >> confdefs.h <<\EOF
2692#define _REENTRANT 1
2693EOF
2694
Guido van Rossumf78abae1997-01-21 22:02:36 +00002695ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002696echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002697echo "configure:2698: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002698if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2699 echo $ac_n "(cached) $ac_c" 1>&6
2700else
2701 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002702#line 2703 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002703#include "confdefs.h"
2704#include <mach/cthreads.h>
2705EOF
2706ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum95012191999-12-16 17:50:52 +00002707{ (eval echo configure:2708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002708ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002709if test -z "$ac_err"; then
2710 rm -rf conftest*
2711 eval "ac_cv_header_$ac_safe=yes"
2712else
2713 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002716 rm -rf conftest*
2717 eval "ac_cv_header_$ac_safe=no"
2718fi
2719rm -f conftest*
2720fi
2721if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2722 echo "$ac_t""yes" 1>&6
2723 cat >> confdefs.h <<\EOF
2724#define WITH_THREAD 1
2725EOF
2726
2727cat >> confdefs.h <<\EOF
2728#define C_THREADS 1
2729EOF
2730
2731LIBOBJS="$LIBOBJS thread.o"
2732else
2733 echo "$ac_t""no" 1>&6
2734
Guido van Rossumea516321998-12-17 18:08:55 +00002735echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002736echo "configure:2737: checking for pthread_detach" >&5
Guido van Rossumea516321998-12-17 18:08:55 +00002737if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002738 echo $ac_n "(cached) $ac_c" 1>&6
2739else
2740 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002741#line 2742 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002742#include "confdefs.h"
2743/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00002744 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00002745#include <assert.h>
2746/* Override any gcc2 internal prototype to avoid an error. */
2747/* We use char because int might match the return type of a gcc2
2748 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00002749char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002750
2751int main() {
2752
2753/* The GNU C library defines this for functions which it implements
2754 to always fail with ENOSYS. Some functions are actually named
2755 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00002756#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00002757choke me
2758#else
Guido van Rossumea516321998-12-17 18:08:55 +00002759pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002760#endif
2761
2762; return 0; }
2763EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002764if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002765 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002766 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00002767else
2768 echo "configure: failed program was:" >&5
2769 cat conftest.$ac_ext >&5
2770 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002771 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00002772fi
2773rm -f conftest*
2774fi
2775
Guido van Rossumea516321998-12-17 18:08:55 +00002776if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002777 echo "$ac_t""yes" 1>&6
2778 cat >> confdefs.h <<\EOF
2779#define WITH_THREAD 1
2780EOF
2781
2782cat >> confdefs.h <<\EOF
2783#define _POSIX_THREADS 1
2784EOF
2785
2786LIBOBJS="$LIBOBJS thread.o"
2787else
2788 echo "$ac_t""no" 1>&6
2789
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002790ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
2791echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002792echo "configure:2793: checking for kernel/OS.h" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002793if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2794 echo $ac_n "(cached) $ac_c" 1>&6
2795else
2796 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002797#line 2798 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002798#include "confdefs.h"
2799#include <kernel/OS.h>
2800EOF
2801ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum95012191999-12-16 17:50:52 +00002802{ (eval echo configure:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002803ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002804if test -z "$ac_err"; then
2805 rm -rf conftest*
2806 eval "ac_cv_header_$ac_safe=yes"
2807else
2808 echo "$ac_err" >&5
2809 echo "configure: failed program was:" >&5
2810 cat conftest.$ac_ext >&5
2811 rm -rf conftest*
2812 eval "ac_cv_header_$ac_safe=no"
2813fi
2814rm -f conftest*
2815fi
2816if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2817 echo "$ac_t""yes" 1>&6
2818 cat >> confdefs.h <<\EOF
2819#define WITH_THREAD 1
2820EOF
2821
2822cat >> confdefs.h <<\EOF
2823#define BEOS_THREADS 1
2824EOF
2825
2826LIBOBJS="$LIBOBJS thread.o"
2827else
2828 echo "$ac_t""no" 1>&6
2829
Guido van Rossumf78abae1997-01-21 22:02:36 +00002830echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002831echo "configure:2832: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002832ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002833if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002834 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835else
2836 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002837LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002838cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002839#line 2840 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002840#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002841/* Override any gcc2 internal prototype to avoid an error. */
2842/* We use char because int might match the return type of a gcc2
2843 builtin and then its argument prototype would still apply. */
2844char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002845
Guido van Rossumf78abae1997-01-21 22:02:36 +00002846int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847pthread_create()
2848; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002849EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002850if { (eval echo configure:2851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002851 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002852 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002853else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002854 echo "configure: failed program was:" >&5
2855 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002856 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002857 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002858fi
2859rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002860LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002861
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002863if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002864 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002865 cat >> confdefs.h <<\EOF
2866#define WITH_THREAD 1
2867EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002868
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002869cat >> confdefs.h <<\EOF
2870#define _POSIX_THREADS 1
2871EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002872
2873LIBS="$LIBS -lpthreads"
2874LIBOBJS="$LIBOBJS thread.o"
2875else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002876 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002877
Guido van Rossumf78abae1997-01-21 22:02:36 +00002878echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002879echo "configure:2880: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002880ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002881if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2882 echo $ac_n "(cached) $ac_c" 1>&6
2883else
2884 ac_save_LIBS="$LIBS"
2885LIBS="-lpthread $LIBS"
2886cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002887#line 2888 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002888#include "confdefs.h"
2889/* Override any gcc2 internal prototype to avoid an error. */
2890/* We use char because int might match the return type of a gcc2
2891 builtin and then its argument prototype would still apply. */
2892char pthread_create();
2893
Guido van Rossumf78abae1997-01-21 22:02:36 +00002894int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002895pthread_create()
2896; return 0; }
2897EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002898if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002899 rm -rf conftest*
2900 eval "ac_cv_lib_$ac_lib_var=yes"
2901else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002902 echo "configure: failed program was:" >&5
2903 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002904 rm -rf conftest*
2905 eval "ac_cv_lib_$ac_lib_var=no"
2906fi
2907rm -f conftest*
2908LIBS="$ac_save_LIBS"
2909
2910fi
2911if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2912 echo "$ac_t""yes" 1>&6
2913 cat >> confdefs.h <<\EOF
2914#define WITH_THREAD 1
2915EOF
2916
2917cat >> confdefs.h <<\EOF
2918#define _POSIX_THREADS 1
2919EOF
2920
2921LIBS="$LIBS -lpthread"
2922LIBOBJS="$LIBOBJS thread.o"
2923else
2924 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002925
Guido van Rossum49545951997-12-02 19:28:29 +00002926echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002927echo "configure:2928: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00002928ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2929if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2930 echo $ac_n "(cached) $ac_c" 1>&6
2931else
2932 ac_save_LIBS="$LIBS"
2933LIBS="-lc_r $LIBS"
2934cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002935#line 2936 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00002936#include "confdefs.h"
2937/* Override any gcc2 internal prototype to avoid an error. */
2938/* We use char because int might match the return type of a gcc2
2939 builtin and then its argument prototype would still apply. */
2940char pthread_create();
2941
2942int main() {
2943pthread_create()
2944; return 0; }
2945EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002946if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00002947 rm -rf conftest*
2948 eval "ac_cv_lib_$ac_lib_var=yes"
2949else
2950 echo "configure: failed program was:" >&5
2951 cat conftest.$ac_ext >&5
2952 rm -rf conftest*
2953 eval "ac_cv_lib_$ac_lib_var=no"
2954fi
2955rm -f conftest*
2956LIBS="$ac_save_LIBS"
2957
2958fi
2959if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2960 echo "$ac_t""yes" 1>&6
2961 cat >> confdefs.h <<\EOF
2962#define WITH_THREAD 1
2963EOF
2964
2965cat >> confdefs.h <<\EOF
2966#define _POSIX_THREADS 1
2967EOF
2968
2969LIBS="$LIBS -lc_r"
2970LIBOBJS="$LIBOBJS thread.o"
2971else
2972 echo "$ac_t""no" 1>&6
2973
Guido van Rossum0be3e491997-05-22 20:33:33 +00002974echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00002975echo "configure:2976: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002976ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2977if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2978 echo $ac_n "(cached) $ac_c" 1>&6
2979else
2980 ac_save_LIBS="$LIBS"
2981LIBS="-lthread $LIBS"
2982cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002983#line 2984 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002984#include "confdefs.h"
2985/* Override any gcc2 internal prototype to avoid an error. */
2986/* We use char because int might match the return type of a gcc2
2987 builtin and then its argument prototype would still apply. */
2988char __d6_pthread_create();
2989
2990int main() {
2991__d6_pthread_create()
2992; return 0; }
2993EOF
Guido van Rossum95012191999-12-16 17:50:52 +00002994if { (eval echo configure:2995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002995 rm -rf conftest*
2996 eval "ac_cv_lib_$ac_lib_var=yes"
2997else
2998 echo "configure: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 rm -rf conftest*
3001 eval "ac_cv_lib_$ac_lib_var=no"
3002fi
3003rm -f conftest*
3004LIBS="$ac_save_LIBS"
3005
3006fi
3007if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3008 echo "$ac_t""yes" 1>&6
3009 cat >> confdefs.h <<\EOF
3010#define WITH_THREAD 1
3011EOF
3012
3013cat >> confdefs.h <<\EOF
3014#define _POSIX_THREADS 1
3015EOF
3016
3017LIBS="$LIBS -lthread"
3018LIBOBJS="$LIBOBJS thread.o"
3019else
3020 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003021
3022echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003023echo "configure:3024: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003024ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
3025if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3026 echo $ac_n "(cached) $ac_c" 1>&6
3027else
3028 ac_save_LIBS="$LIBS"
3029LIBS="-lcma $LIBS"
3030cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003031#line 3032 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003032#include "confdefs.h"
3033/* Override any gcc2 internal prototype to avoid an error. */
3034/* We use char because int might match the return type of a gcc2
3035 builtin and then its argument prototype would still apply. */
3036char pthread_create();
3037
3038int main() {
3039pthread_create()
3040; return 0; }
3041EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003042if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003043 rm -rf conftest*
3044 eval "ac_cv_lib_$ac_lib_var=yes"
3045else
3046 echo "configure: failed program was:" >&5
3047 cat conftest.$ac_ext >&5
3048 rm -rf conftest*
3049 eval "ac_cv_lib_$ac_lib_var=no"
3050fi
3051rm -f conftest*
3052LIBS="$ac_save_LIBS"
3053
3054fi
3055if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3056 echo "$ac_t""yes" 1>&6
3057 cat >> confdefs.h <<\EOF
3058#define WITH_THREAD 1
3059EOF
3060
3061cat >> confdefs.h <<\EOF
3062#define _POSIX_THREADS 1
3063EOF
3064
3065LIBS="$LIBS -lcma"
3066LIBOBJS="$LIBOBJS thread.o"
3067else
3068 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00003069fi
3070
3071
Guido van Rossum627b2d71993-12-24 10:39:16 +00003072fi
3073
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003074fi
3075
Guido van Rossum0be3e491997-05-22 20:33:33 +00003076fi
3077
Guido van Rossum49545951997-12-02 19:28:29 +00003078fi
3079
Guido van Rossumb93a8621998-05-07 13:27:32 +00003080fi
3081
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003082fi
3083
Guido van Rossumad678af1998-10-02 14:42:15 +00003084fi
3085
Guido van Rossum0be3e491997-05-22 20:33:33 +00003086
Guido van Rossumf78abae1997-01-21 22:02:36 +00003087echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003088echo "configure:3089: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003089ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003090if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003091 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003092else
3093 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003094LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003095cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003096#line 3097 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003097#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003098/* Override any gcc2 internal prototype to avoid an error. */
3099/* We use char because int might match the return type of a gcc2
3100 builtin and then its argument prototype would still apply. */
3101char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003102
Guido van Rossumf78abae1997-01-21 22:02:36 +00003103int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104usconfig()
3105; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003106EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003107if { (eval echo configure:3108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003108 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003109 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003110else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003111 echo "configure: failed program was:" >&5
3112 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003113 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003114 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003115fi
3116rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003117LIBS="$ac_save_LIBS"
3118
3119fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003120if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003121 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122 cat >> confdefs.h <<\EOF
3123#define WITH_THREAD 1
3124EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003125
Guido van Rossum7f43da71994-08-01 12:15:30 +00003126LIBS="$LIBS -lmpc"
3127LIBOBJS="$LIBOBJS thread.o"
3128else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003129 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003130fi
3131
Guido van Rossumf78abae1997-01-21 22:02:36 +00003132echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003133echo "configure:3134: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003134ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003135if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003136 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003137else
3138 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003139LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003140cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003141#line 3142 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003142#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003143/* Override any gcc2 internal prototype to avoid an error. */
3144/* We use char because int might match the return type of a gcc2
3145 builtin and then its argument prototype would still apply. */
3146char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003147
Guido van Rossumf78abae1997-01-21 22:02:36 +00003148int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003149thr_create()
3150; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003151EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003152if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003153 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003154 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003155else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003156 echo "configure: failed program was:" >&5
3157 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003158 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003159 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003160fi
3161rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003162LIBS="$ac_save_LIBS"
3163
3164fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003165if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003166 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003167 cat >> confdefs.h <<\EOF
3168#define WITH_THREAD 1
3169EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003170
Guido van Rossum7f43da71994-08-01 12:15:30 +00003171LIBS="$LIBS -lthread"
3172LIBOBJS="$LIBOBJS thread.o"
3173else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003174 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003175fi
3176
Guido van Rossum7f43da71994-08-01 12:15:30 +00003177
Guido van Rossumda88dad1995-01-26 00:46:29 +00003178else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003179 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003180fi
3181
Guido van Rossum7f43da71994-08-01 12:15:30 +00003182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003183# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003184
3185DLINCLDIR=/
3186
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003187echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003188echo "configure:3189: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003189# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003190if test "${with_sgi_dl+set}" = set; then
3191 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003192
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003193echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194cat >> confdefs.h <<\EOF
3195#define WITH_SGI_DL 1
3196EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003197
Guido van Rossume97ee181999-12-20 21:27:22 +00003198DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003199dldir=$withval
3200if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003201then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003202else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003203fi
3204DLINCLDIR=${dldir}
3205LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003206else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003207 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003208fi
3209
3210
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003211echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003212echo "configure:3213: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003213# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003214if test "${with_dl_dld+set}" = set; then
3215 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003216
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003217echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218cat >> confdefs.h <<\EOF
3219#define WITH_DL_DLD 1
3220EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003221
Guido van Rossume97ee181999-12-20 21:27:22 +00003222DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003223dldir=`echo "$withval" | sed 's/,.*//'`
3224dlddir=`echo "$withval" | sed 's/.*,//'`
3225if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003226then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003227else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003228fi
3229DLINCLDIR=${dldir}
3230LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003231else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003232 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003233fi
3234
3235
Guido van Rossume97ee181999-12-20 21:27:22 +00003236# the dlopen() function means we might want to use dynload_shlib.o. some
3237# platforms, such as AIX, have dlopen(), but don't want to use it.
3238echo $ac_n "checking for dlopen""... $ac_c" 1>&6
3239echo "configure:3240: checking for dlopen" >&5
3240if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
3241 echo $ac_n "(cached) $ac_c" 1>&6
3242else
3243 cat > conftest.$ac_ext <<EOF
3244#line 3245 "configure"
3245#include "confdefs.h"
3246/* System header to define __stub macros and hopefully few prototypes,
3247 which can conflict with char dlopen(); below. */
3248#include <assert.h>
3249/* Override any gcc2 internal prototype to avoid an error. */
3250/* We use char because int might match the return type of a gcc2
3251 builtin and then its argument prototype would still apply. */
3252char dlopen();
3253
3254int main() {
3255
3256/* The GNU C library defines this for functions which it implements
3257 to always fail with ENOSYS. Some functions are actually named
3258 something starting with __ and the normal name is an alias. */
3259#if defined (__stub_dlopen) || defined (__stub___dlopen)
3260choke me
3261#else
3262dlopen();
3263#endif
3264
3265; return 0; }
3266EOF
3267if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3268 rm -rf conftest*
3269 eval "ac_cv_func_dlopen=yes"
3270else
3271 echo "configure: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
3273 rm -rf conftest*
3274 eval "ac_cv_func_dlopen=no"
3275fi
3276rm -f conftest*
3277fi
3278
3279if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
3280 echo "$ac_t""yes" 1>&6
3281 :
3282else
3283 echo "$ac_t""no" 1>&6
3284fi
3285
3286
3287# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3288# loading of modules.
3289
3290echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
3291echo "configure:3292: checking DYNLOADFILE" >&5
3292if test -z "$DYNLOADFILE"
3293then
3294 case $ac_sys_system/$ac_sys_release in
3295 AIX*) DYNLOADFILE="dynload_aix.o";;
3296 BeOS*) DYNLOADFILE="dynload_beos.o";;
3297 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3298 next/*) DYNLOADFILE="dynload_next.o";;
3299 *)
3300 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3301 # out any dynamic loading
3302 if test "$ac_cv_func_dlopen" = yes
3303 then DYNLOADFILE="dynload_shlib.o"
3304 else DYNLOADFILE="dynload_stub.o"
3305 fi
3306 ;;
3307 esac
3308fi
3309echo "$ac_t""$DYNLOADFILE" 1>&6
3310if test "$DYNLOADFILE" != "dynload_stub.o"
3311then
3312 cat >> confdefs.h <<\EOF
3313#define HAVE_DYNAMIC_LOADING 1
3314EOF
3315
3316fi
3317
Guido van Rossum627b2d71993-12-24 10:39:16 +00003318# checks for library functions
Fred Drake35a092f1999-12-13 16:23:35 +00003319for ac_func in alarm chown clock confstr ctermid ctermid_r dlopen execv \
3320 flock fork fsync fdatasync fpathconf ftime ftruncate \
Fred Drakef581db11999-12-14 21:11:47 +00003321 getgroups getlogin getpeername getpgrp getpid getpwent gettimeofday getwd \
Fred Drake35a092f1999-12-13 16:23:35 +00003322 kill link lstat mkfifo mktime nice pathconf pause plock pthread_init \
3323 putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00003324 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003325 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003326 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
3327 truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00003328do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003329echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003330echo "configure:3331: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003331if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3332 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003333else
3334 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003335#line 3336 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003336#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003337/* System header to define __stub macros and hopefully few prototypes,
3338 which can conflict with char $ac_func(); below. */
3339#include <assert.h>
3340/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003341/* We use char because int might match the return type of a gcc2
3342 builtin and then its argument prototype would still apply. */
3343char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003344
Guido van Rossumf78abae1997-01-21 22:02:36 +00003345int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003346
Guido van Rossum627b2d71993-12-24 10:39:16 +00003347/* The GNU C library defines this for functions which it implements
3348 to always fail with ENOSYS. Some functions are actually named
3349 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003351choke me
3352#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003353$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003354#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003355
Guido van Rossum7f43da71994-08-01 12:15:30 +00003356; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003357EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003358if { (eval echo configure:3359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003359 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360 eval "ac_cv_func_$ac_func=yes"
3361else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003362 echo "configure: failed program was:" >&5
3363 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003364 rm -rf conftest*
3365 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003366fi
3367rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003368fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003370if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003371 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003373 cat >> confdefs.h <<EOF
3374#define $ac_tr_func 1
3375EOF
3376
3377else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003378 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003379fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003380done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003381
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003382
3383# check for long file support functions
3384for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003385do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003386echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003387echo "configure:3388: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003388if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3389 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003390else
3391 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003392#line 3393 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003393#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003394/* System header to define __stub macros and hopefully few prototypes,
3395 which can conflict with char $ac_func(); below. */
3396#include <assert.h>
3397/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003398/* We use char because int might match the return type of a gcc2
3399 builtin and then its argument prototype would still apply. */
3400char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003401
Guido van Rossumf78abae1997-01-21 22:02:36 +00003402int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003403
Guido van Rossum627b2d71993-12-24 10:39:16 +00003404/* The GNU C library defines this for functions which it implements
3405 to always fail with ENOSYS. Some functions are actually named
3406 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003407#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003408choke me
3409#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003410$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003411#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412
Guido van Rossum7f43da71994-08-01 12:15:30 +00003413; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003414EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003415if { (eval echo configure:3416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003416 rm -rf conftest*
3417 eval "ac_cv_func_$ac_func=yes"
3418else
3419 echo "configure: failed program was:" >&5
3420 cat conftest.$ac_ext >&5
3421 rm -rf conftest*
3422 eval "ac_cv_func_$ac_func=no"
3423fi
3424rm -f conftest*
3425fi
3426
3427if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3428 echo "$ac_t""yes" 1>&6
3429 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3430 cat >> confdefs.h <<EOF
3431#define $ac_tr_func 1
3432EOF
3433
3434else
3435 echo "$ac_t""no" 1>&6
3436fi
3437done
3438
3439
3440for ac_func in dup2 getcwd strdup strerror memmove
3441do
3442echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003443echo "configure:3444: checking for $ac_func" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003444if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3445 echo $ac_n "(cached) $ac_c" 1>&6
3446else
3447 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003448#line 3449 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003449#include "confdefs.h"
3450/* System header to define __stub macros and hopefully few prototypes,
3451 which can conflict with char $ac_func(); below. */
3452#include <assert.h>
3453/* Override any gcc2 internal prototype to avoid an error. */
3454/* We use char because int might match the return type of a gcc2
3455 builtin and then its argument prototype would still apply. */
3456char $ac_func();
3457
3458int main() {
3459
3460/* The GNU C library defines this for functions which it implements
3461 to always fail with ENOSYS. Some functions are actually named
3462 something starting with __ and the normal name is an alias. */
3463#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3464choke me
3465#else
3466$ac_func();
3467#endif
3468
3469; return 0; }
3470EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003471if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003472 rm -rf conftest*
3473 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003474else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003475 echo "configure: failed program was:" >&5
3476 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003477 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003478 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003479fi
3480rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003481fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003482
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003483if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003484 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003485 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3486 cat >> confdefs.h <<EOF
3487#define $ac_tr_func 1
3488EOF
3489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003490else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003491 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003492LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003493fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003494done
3495
Guido van Rossumf78abae1997-01-21 22:02:36 +00003496
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003497echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003498echo "configure:3499: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003499if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
3500 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003501else
3502 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003503#line 3504 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003504#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003505/* System header to define __stub macros and hopefully few prototypes,
3506 which can conflict with char getpgrp(); below. */
3507#include <assert.h>
3508/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003509/* We use char because int might match the return type of a gcc2
3510 builtin and then its argument prototype would still apply. */
3511char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003512
Guido van Rossumf78abae1997-01-21 22:02:36 +00003513int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003514
Guido van Rossum627b2d71993-12-24 10:39:16 +00003515/* The GNU C library defines this for functions which it implements
3516 to always fail with ENOSYS. Some functions are actually named
3517 something starting with __ and the normal name is an alias. */
3518#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
3519choke me
3520#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003521getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003522#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003523
3524; return 0; }
3525EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003526if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003527 rm -rf conftest*
3528 eval "ac_cv_func_getpgrp=yes"
3529else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003530 echo "configure: failed program was:" >&5
3531 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003532 rm -rf conftest*
3533 eval "ac_cv_func_getpgrp=no"
3534fi
3535rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003536fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003537
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003538if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003539 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003540 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003541#line 3542 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003542#include "confdefs.h"
3543#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003544int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003545getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003546; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003547EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003548if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003549 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550 cat >> confdefs.h <<\EOF
3551#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003552EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003553
Guido van Rossumf78abae1997-01-21 22:02:36 +00003554else
3555 echo "configure: failed program was:" >&5
3556 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003557fi
3558rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003560 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003561fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003562
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003563echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003564echo "configure:3565: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003565if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
3566 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003567else
3568 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003569#line 3570 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003570#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003571/* System header to define __stub macros and hopefully few prototypes,
3572 which can conflict with char setpgrp(); below. */
3573#include <assert.h>
3574/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003575/* We use char because int might match the return type of a gcc2
3576 builtin and then its argument prototype would still apply. */
3577char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003578
Guido van Rossumf78abae1997-01-21 22:02:36 +00003579int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003580
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003581/* The GNU C library defines this for functions which it implements
3582 to always fail with ENOSYS. Some functions are actually named
3583 something starting with __ and the normal name is an alias. */
3584#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
3585choke me
3586#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003587setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003588#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003589
3590; return 0; }
3591EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003592if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003593 rm -rf conftest*
3594 eval "ac_cv_func_setpgrp=yes"
3595else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003596 echo "configure: failed program was:" >&5
3597 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003598 rm -rf conftest*
3599 eval "ac_cv_func_setpgrp=no"
3600fi
3601rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003602fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003603
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003604if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003605 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003606 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003607#line 3608 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003608#include "confdefs.h"
3609#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003610int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003611setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003612; return 0; }
3613EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003614if { (eval echo configure:3615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003615 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003616 cat >> confdefs.h <<\EOF
3617#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003618EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003619
Guido van Rossumf78abae1997-01-21 22:02:36 +00003620else
3621 echo "configure: failed program was:" >&5
3622 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003623fi
3624rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003625else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003626 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003627fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003628
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003629echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003630echo "configure:3631: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003631if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3632 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003633else
3634 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003635#line 3636 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003636#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003637/* System header to define __stub macros and hopefully few prototypes,
3638 which can conflict with char gettimeofday(); below. */
3639#include <assert.h>
3640/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003641/* We use char because int might match the return type of a gcc2
3642 builtin and then its argument prototype would still apply. */
3643char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003644
Guido van Rossumf78abae1997-01-21 22:02:36 +00003645int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003646
3647/* The GNU C library defines this for functions which it implements
3648 to always fail with ENOSYS. Some functions are actually named
3649 something starting with __ and the normal name is an alias. */
3650#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3651choke me
3652#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003653gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003654#endif
3655
3656; return 0; }
3657EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003658if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003659 rm -rf conftest*
3660 eval "ac_cv_func_gettimeofday=yes"
3661else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003662 echo "configure: failed program was:" >&5
3663 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003664 rm -rf conftest*
3665 eval "ac_cv_func_gettimeofday=no"
3666fi
3667rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003668fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003669
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003670if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003671 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003672 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003673#line 3674 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003674#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003675#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003676int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003677gettimeofday((struct timeval*)0,(struct timezone*)0);
3678; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003679EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003680if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003681 :
3682else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003683 echo "configure: failed program was:" >&5
3684 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003685 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003686 cat >> confdefs.h <<\EOF
3687#define GETTIMEOFDAY_NO_TZ 1
3688EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003689
3690fi
3691rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003692else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003693 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003694fi
3695
3696
3697# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003698echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003699echo "configure:3700: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003700if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3701 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003702else
3703 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003704#line 3705 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003705#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003706#include <sys/types.h>
3707#include <sys/time.h>
3708#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003709int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003710struct tm *tp;
3711; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003712EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003713if { (eval echo configure:3714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003714 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003715 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003716else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003717 echo "configure: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003719 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003721fi
3722rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003723fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003724
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003725echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003726if test $ac_cv_header_time = yes; then
3727 cat >> confdefs.h <<\EOF
3728#define TIME_WITH_SYS_TIME 1
3729EOF
3730
3731fi
3732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003733echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003734echo "configure:3735: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003735if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3736 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737else
3738 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003739#line 3740 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003740#include "confdefs.h"
3741#include <sys/types.h>
3742#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003743int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003744struct tm *tp; tp->tm_sec;
3745; return 0; }
3746EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003747if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748 rm -rf conftest*
3749 ac_cv_struct_tm=time.h
3750else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003751 echo "configure: failed program was:" >&5
3752 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003753 rm -rf conftest*
3754 ac_cv_struct_tm=sys/time.h
3755fi
3756rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003757fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003759echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003760if test $ac_cv_struct_tm = sys/time.h; then
3761 cat >> confdefs.h <<\EOF
3762#define TM_IN_SYS_TIME 1
3763EOF
3764
3765fi
3766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003767echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003768echo "configure:3769: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003769if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3770 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003771else
3772 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003773#line 3774 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003774#include "confdefs.h"
3775#include <sys/types.h>
3776#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003777int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003778struct tm tm; tm.tm_zone;
3779; return 0; }
3780EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003781if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782 rm -rf conftest*
3783 ac_cv_struct_tm_zone=yes
3784else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003785 echo "configure: failed program was:" >&5
3786 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003787 rm -rf conftest*
3788 ac_cv_struct_tm_zone=no
3789fi
3790rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003791fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003793echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003794if test "$ac_cv_struct_tm_zone" = yes; then
3795 cat >> confdefs.h <<\EOF
3796#define HAVE_TM_ZONE 1
3797EOF
3798
3799else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003800 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003801echo "configure:3802: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003802if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3803 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003804else
3805 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003806#line 3807 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003807#include "confdefs.h"
3808#include <time.h>
3809#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003810extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003811#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003812int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003813atoi(*tzname);
3814; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003815EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003816if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003817 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003818 ac_cv_var_tzname=yes
3819else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003820 echo "configure: failed program was:" >&5
3821 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003822 rm -rf conftest*
3823 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003824fi
3825rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003826fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003827
3828echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003829 if test $ac_cv_var_tzname = yes; then
3830 cat >> confdefs.h <<\EOF
3831#define HAVE_TZNAME 1
3832EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003833
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834 fi
3835fi
3836
3837
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003838echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003839echo "configure:3840: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003840if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3841 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003842else
3843 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003844#line 3845 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003845#include "confdefs.h"
3846#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003847int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003848return altzone;
3849; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003850EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003851if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003852 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003853 ac_cv_header_time_altzone=yes
3854else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003855 echo "configure: failed program was:" >&5
3856 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003857 rm -rf conftest*
3858 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003859fi
3860rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861fi
3862
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003863echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864if test $ac_cv_header_time_altzone = yes; then
3865 cat >> confdefs.h <<\EOF
3866#define HAVE_ALTZONE 1
3867EOF
3868
3869fi
3870
Guido van Rossumda88dad1995-01-26 00:46:29 +00003871was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003872echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003873echo "configure:3874: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003875#line 3876 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003876#include "confdefs.h"
3877
3878#include <sys/types.h>
3879#include <sys/select.h>
3880#include <sys/time.h>
3881
Guido van Rossumf78abae1997-01-21 22:02:36 +00003882int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003883;
3884; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003885EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003886if { (eval echo configure:3887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003887 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888 cat >> confdefs.h <<\EOF
3889#define SYS_SELECT_WITH_SYS_TIME 1
3890EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003891 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003892else
3893 echo "configure: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003895fi
3896rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003897echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003898
3899# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003900
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003901echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003902echo "configure:3903: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003903if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3904 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003905else
3906 if test "$GCC" = yes; then
3907 # GCC predefines this symbol on systems where it applies.
3908cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003909#line 3910 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910#include "confdefs.h"
3911#ifdef __CHAR_UNSIGNED__
3912 yes
3913#endif
3914
3915EOF
3916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3917 egrep "yes" >/dev/null 2>&1; then
3918 rm -rf conftest*
3919 ac_cv_c_char_unsigned=yes
3920else
3921 rm -rf conftest*
3922 ac_cv_c_char_unsigned=no
3923fi
3924rm -f conftest*
3925
3926else
3927if test "$cross_compiling" = yes; then
3928 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3929else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003930 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003931#line 3932 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003932#include "confdefs.h"
3933/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003935#define volatile
3936#endif
3937main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003938 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003939}
3940EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003941if { (eval echo configure:3942: \"$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 +00003942then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003943 ac_cv_c_char_unsigned=yes
3944else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003945 echo "configure: failed program was:" >&5
3946 cat conftest.$ac_ext >&5
3947 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003948 ac_cv_c_char_unsigned=no
3949fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003950rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003951fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003952
3953fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003955
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003956echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3958 cat >> confdefs.h <<\EOF
3959#define __CHAR_UNSIGNED__ 1
3960EOF
3961
3962fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003963
3964
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003965echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00003966echo "configure:3967: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003967if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3968 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969else
3970 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00003971#line 3972 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003972#include "confdefs.h"
3973
Guido van Rossumf78abae1997-01-21 22:02:36 +00003974int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003975
3976/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003977typedef int charset[2]; const charset x;
3978/* SunOS 4.1.1 cc rejects this. */
3979char const *const *ccp;
3980char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003981/* NEC SVR4.0.2 mips cc rejects this. */
3982struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003983static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003984/* AIX XL C 1.02.0.0 rejects this.
3985 It does not let you subtract one const X* pointer from another in an arm
3986 of an if-expression whose if-part is not a constant expression */
3987const char *g = "string";
3988ccp = &g + (g ? g-g : 0);
3989/* HPUX 7.0 cc rejects these. */
3990++ccp;
3991p = (char**) ccp;
3992ccp = (char const *const *) p;
3993{ /* SCO 3.2v4 cc rejects this. */
3994 char *t;
3995 char const *s = 0 ? (char *) 0 : (char const *) 0;
3996
3997 *t++ = 0;
3998}
3999{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004001 const int *foo = &x[0];
4002 ++foo;
4003}
4004{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4005 typedef const int *iptr;
4006 iptr p = 0;
4007 ++p;
4008}
4009{ /* AIX XL C 1.02.0.0 rejects this saying
4010 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4011 struct s { int j; const int *ap[3]; };
4012 struct s *b; b->j = 5;
4013}
4014{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4015 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004016}
4017
4018; return 0; }
4019EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004020if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004021 rm -rf conftest*
4022 ac_cv_c_const=yes
4023else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004024 echo "configure: failed program was:" >&5
4025 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026 rm -rf conftest*
4027 ac_cv_c_const=no
4028fi
4029rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004031
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004032echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033if test $ac_cv_c_const = no; then
4034 cat >> confdefs.h <<\EOF
4035#define const
4036EOF
4037
4038fi
4039
4040
Guido van Rossumda88dad1995-01-26 00:46:29 +00004041works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004042echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004043echo "configure:4044: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004044cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004045#line 4046 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004046#include "confdefs.h"
4047
Guido van Rossumf78abae1997-01-21 22:02:36 +00004048int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049volatile int x; x = 0;
4050; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004051EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004052if { (eval echo configure:4053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004053 rm -rf conftest*
4054 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004055else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004056 echo "configure: failed program was:" >&5
4057 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004058 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059 cat >> confdefs.h <<\EOF
4060#define volatile
4061EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004062
4063fi
4064rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004065echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004066
Guido van Rossumda88dad1995-01-26 00:46:29 +00004067works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004068echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004069echo "configure:4070: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004071#line 4072 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004072#include "confdefs.h"
4073
Guido van Rossumf78abae1997-01-21 22:02:36 +00004074int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004075signed char c;
4076; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004077EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004078if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004079 rm -rf conftest*
4080 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004081else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004082 echo "configure: failed program was:" >&5
4083 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004084 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004085 cat >> confdefs.h <<\EOF
4086#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004087EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004088
4089fi
4090rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004091echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004092
Guido van Rossumda88dad1995-01-26 00:46:29 +00004093have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004094echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004095echo "configure:4096: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004097#line 4098 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004098#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004099int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004100int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004101return foo(10);
4102; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004103EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004104if { (eval echo configure:4105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004105 rm -rf conftest*
4106 cat >> confdefs.h <<\EOF
4107#define HAVE_PROTOTYPES 1
4108EOF
4109 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004110else
4111 echo "configure: failed program was:" >&5
4112 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004113fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004114rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004115echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004116
Guido van Rossumda88dad1995-01-26 00:46:29 +00004117works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004118echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004119echo "configure:4120: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004120cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004121#line 4122 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004122#include "confdefs.h"
4123
4124#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004125int foo(int x, ...) {
4126 va_list va;
4127 va_start(va, x);
4128 va_arg(va, int);
4129 va_arg(va, char *);
4130 va_arg(va, double);
4131 return 0;
4132}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004133
Guido van Rossumf78abae1997-01-21 22:02:36 +00004134int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004135return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004136; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004137EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004138if { (eval echo configure:4139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004139 rm -rf conftest*
4140 cat >> confdefs.h <<\EOF
4141#define HAVE_STDARG_PROTOTYPES 1
4142EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004143 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004144else
4145 echo "configure: failed program was:" >&5
4146 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004147fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004149echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150
Guido van Rossumda88dad1995-01-26 00:46:29 +00004151if test "$have_prototypes" = yes; then
4152bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004153echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004154echo "configure:4155: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004156#line 4157 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004157#include "confdefs.h"
4158#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004159int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160char **t;execve("@",t,t);
4161; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004163if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004164 :
4165else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004166 echo "configure: failed program was:" >&5
4167 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004168 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169 cat >> confdefs.h <<\EOF
4170#define BAD_EXEC_PROTOTYPES 1
4171EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004172 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004173fi
4174rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004175echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004176fi
4177
Guido van Rossumda88dad1995-01-26 00:46:29 +00004178bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004179echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004180echo "configure:4181: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181if test "$cross_compiling" = yes; then
4182 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4183else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004184 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004185#line 4186 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004186#include "confdefs.h"
4187
4188struct s { int a; int b; };
4189static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190int foobar() {
4191 static int random;
4192 random = (int) &foo;
4193 return random;
4194}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004195static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196main() {
4197 exit(!((int)&foo == foobar()));
4198}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004199
4200EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004201if { (eval echo configure:4202: \"$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 +00004202then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004203 :
4204else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004205 echo "configure: failed program was:" >&5
4206 cat conftest.$ac_ext >&5
4207 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208 cat >> confdefs.h <<\EOF
4209#define BAD_STATIC_FORWARD 1
4210EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004211 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004212fi
4213rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004214fi
4215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004216echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004217
Guido van Rossumda88dad1995-01-26 00:46:29 +00004218va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004219echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004220echo "configure:4221: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004222#line 4223 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223#include "confdefs.h"
4224
4225#ifdef HAVE_STDARG_PROTOTYPES
4226#include <stdarg.h>
4227#else
4228#include <varargs.h>
4229#endif
4230
Guido van Rossumf78abae1997-01-21 22:02:36 +00004231int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232va_list list1, list2; list1 = list2;
4233; return 0; }
4234EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004235if { (eval echo configure:4236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004236 :
4237else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240 rm -rf conftest*
4241 cat >> confdefs.h <<\EOF
4242#define VA_LIST_IS_ARRAY 1
4243EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004244 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245fi
4246rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004247echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004249# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4250echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004251echo "configure:4252: checking for gethostbyname_r" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004252if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
4253 echo $ac_n "(cached) $ac_c" 1>&6
4254else
4255 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004256#line 4257 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004257#include "confdefs.h"
4258/* System header to define __stub macros and hopefully few prototypes,
4259 which can conflict with char gethostbyname_r(); below. */
4260#include <assert.h>
4261/* Override any gcc2 internal prototype to avoid an error. */
4262/* We use char because int might match the return type of a gcc2
4263 builtin and then its argument prototype would still apply. */
4264char gethostbyname_r();
4265
4266int main() {
4267
4268/* The GNU C library defines this for functions which it implements
4269 to always fail with ENOSYS. Some functions are actually named
4270 something starting with __ and the normal name is an alias. */
4271#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
4272choke me
4273#else
4274gethostbyname_r();
4275#endif
4276
4277; return 0; }
4278EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004279if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004280 rm -rf conftest*
4281 eval "ac_cv_func_gethostbyname_r=yes"
4282else
4283 echo "configure: failed program was:" >&5
4284 cat conftest.$ac_ext >&5
4285 rm -rf conftest*
4286 eval "ac_cv_func_gethostbyname_r=no"
4287fi
4288rm -f conftest*
4289fi
4290
4291if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
4292 echo "$ac_t""yes" 1>&6
4293
4294 cat >> confdefs.h <<\EOF
4295#define HAVE_GETHOSTBYNAME_R 1
4296EOF
4297
4298 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004299echo "configure:4300: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004300 OLD_CFLAGS=$CFLAGS
4301 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
4302 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004303#line 4304 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004304#include "confdefs.h"
4305
4306# include <netdb.h>
4307
4308int main() {
4309
4310 char *name;
4311 struct hostent *he, *res;
4312 char buffer[2048];
4313 int buflen = 2048;
4314 int h_errnop;
4315
4316 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
4317
4318; return 0; }
4319EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004320if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004321 rm -rf conftest*
4322
4323 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004324#define HAVE_GETHOSTBYNAME_R 1
4325EOF
4326
4327 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004328#define HAVE_GETHOSTBYNAME_R_6_ARG 1
4329EOF
4330
4331 echo "$ac_t""yes" 1>&6
4332
4333else
4334 echo "configure: failed program was:" >&5
4335 cat conftest.$ac_ext >&5
4336 rm -rf conftest*
4337
4338 echo "$ac_t""no" 1>&6
4339 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004340echo "configure:4341: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004341 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004342#line 4343 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004343#include "confdefs.h"
4344
4345# include <netdb.h>
4346
4347int main() {
4348
4349 char *name;
4350 struct hostent *he;
4351 char buffer[2048];
4352 int buflen = 2048;
4353 int h_errnop;
4354
4355 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
4356
4357; return 0; }
4358EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004359if { (eval echo configure:4360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004360 rm -rf conftest*
4361
4362 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004363#define HAVE_GETHOSTBYNAME_R 1
4364EOF
4365
4366 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004367#define HAVE_GETHOSTBYNAME_R_5_ARG 1
4368EOF
4369
4370 echo "$ac_t""yes" 1>&6
4371
4372else
4373 echo "configure: failed program was:" >&5
4374 cat conftest.$ac_ext >&5
4375 rm -rf conftest*
4376
4377 echo "$ac_t""no" 1>&6
4378 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004379echo "configure:4380: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004380 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004381#line 4382 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004382#include "confdefs.h"
4383
4384# include <netdb.h>
4385
4386int main() {
4387
4388 char *name;
4389 struct hostent *he;
4390 struct hostent_data data;
4391
4392 (void) gethostbyname_r(name, he, &data);
4393
4394; return 0; }
4395EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004396if { (eval echo configure:4397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004397 rm -rf conftest*
4398
4399 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004400#define HAVE_GETHOSTBYNAME_R 1
4401EOF
4402
4403 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004404#define HAVE_GETHOSTBYNAME_R_3_ARG 1
4405EOF
4406
4407 echo "$ac_t""yes" 1>&6
4408
4409else
4410 echo "configure: failed program was:" >&5
4411 cat conftest.$ac_ext >&5
4412 rm -rf conftest*
4413
4414 echo "$ac_t""no" 1>&6
4415
4416fi
4417rm -f conftest*
4418
4419fi
4420rm -f conftest*
4421
4422fi
4423rm -f conftest*
4424 CFLAGS=$OLD_CFLAGS
4425
4426else
4427 echo "$ac_t""no" 1>&6
4428
4429 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004430echo "configure:4431: checking for gethostbyname" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004431if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4432 echo $ac_n "(cached) $ac_c" 1>&6
4433else
4434 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004435#line 4436 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004436#include "confdefs.h"
4437/* System header to define __stub macros and hopefully few prototypes,
4438 which can conflict with char gethostbyname(); below. */
4439#include <assert.h>
4440/* Override any gcc2 internal prototype to avoid an error. */
4441/* We use char because int might match the return type of a gcc2
4442 builtin and then its argument prototype would still apply. */
4443char gethostbyname();
4444
4445int main() {
4446
4447/* The GNU C library defines this for functions which it implements
4448 to always fail with ENOSYS. Some functions are actually named
4449 something starting with __ and the normal name is an alias. */
4450#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4451choke me
4452#else
4453gethostbyname();
4454#endif
4455
4456; return 0; }
4457EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004458if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004459 rm -rf conftest*
4460 eval "ac_cv_func_gethostbyname=yes"
4461else
4462 echo "configure: failed program was:" >&5
4463 cat conftest.$ac_ext >&5
4464 rm -rf conftest*
4465 eval "ac_cv_func_gethostbyname=no"
4466fi
4467rm -f conftest*
4468fi
4469
4470if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4471 echo "$ac_t""yes" 1>&6
4472 cat >> confdefs.h <<\EOF
4473#define HAVE_GETHOSTBYNAME 1
4474EOF
4475
4476else
4477 echo "$ac_t""no" 1>&6
4478fi
4479
4480
4481fi
4482
4483
4484
4485
4486
4487
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004488
Guido van Rossum627b2d71993-12-24 10:39:16 +00004489# checks for system services
4490# (none yet)
4491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004492# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00004493echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004494echo "configure:4495: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004495ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004496if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004497 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004498else
4499 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004500LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004501cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004502#line 4503 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004503#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004504/* Override any gcc2 internal prototype to avoid an error. */
4505/* We use char because int might match the return type of a gcc2
4506 builtin and then its argument prototype would still apply. */
4507char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004508
Guido van Rossumf78abae1997-01-21 22:02:36 +00004509int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004510__fpu_control()
4511; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004512EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004513if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004514 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004515 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004516else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004517 echo "configure: failed program was:" >&5
4518 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004519 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004520 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004521fi
4522rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004525fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004526if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004527 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004528 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4529 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004530 cat >> confdefs.h <<EOF
4531#define $ac_tr_lib 1
4532EOF
4533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004534 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535
4536else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004537 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004538fi
4539
4540
Guido van Rossum7f253911997-05-09 02:42:48 +00004541# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00004542echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004543echo "configure:4544: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00004544# Check whether --with-fpectl or --without-fpectl was given.
4545if test "${with_fpectl+set}" = set; then
4546 withval="$with_fpectl"
4547
4548if test "$withval" != no
4549then cat >> confdefs.h <<\EOF
4550#define WANT_SIGFPE_HANDLER 1
4551EOF
4552 echo "$ac_t""yes" 1>&6
4553else echo "$ac_t""no" 1>&6
4554fi
4555fi
4556
4557
Guido van Rossum7f43da71994-08-01 12:15:30 +00004558# check for --with-libm=...
4559
Guido van Rossum563e7081996-09-10 18:20:48 +00004560case $ac_sys_system in
4561next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004562BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00004563*) LIBM=-lm
4564esac
Guido van Rossum7f253911997-05-09 02:42:48 +00004565echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004566echo "configure:4567: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004567# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004568if test "${with_libm+set}" = set; then
4569 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570
Guido van Rossum7f253911997-05-09 02:42:48 +00004571if test "$withval" = no
4572then LIBM=
4573 echo "$ac_t""force LIBM empty" 1>&6
4574elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004575then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004576 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004577else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004578fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004579else
4580 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004581fi
4582
4583
4584# check for --with-libc=...
4585
Guido van Rossum7f253911997-05-09 02:42:48 +00004586echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004587echo "configure:4588: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004588# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004589if test "${with_libc+set}" = set; then
4590 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004591
Guido van Rossum7f253911997-05-09 02:42:48 +00004592if test "$withval" = no
4593then LIBC=
4594 echo "$ac_t""force LIBC empty" 1>&6
4595elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004596then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004597 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004598else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004599fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004600else
4601 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004602fi
4603
4604
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004605# check for hypot() in math library
4606LIBS_SAVE=$LIBS
4607LIBS="$LIBS $LIBM"
4608for ac_func in hypot
4609do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004610echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004611echo "configure:4612: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004612if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4613 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004614else
4615 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004616#line 4617 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004617#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004618/* System header to define __stub macros and hopefully few prototypes,
4619 which can conflict with char $ac_func(); below. */
4620#include <assert.h>
4621/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004622/* We use char because int might match the return type of a gcc2
4623 builtin and then its argument prototype would still apply. */
4624char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004625
Guido van Rossumf78abae1997-01-21 22:02:36 +00004626int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004627
4628/* The GNU C library defines this for functions which it implements
4629 to always fail with ENOSYS. Some functions are actually named
4630 something starting with __ and the normal name is an alias. */
4631#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4632choke me
4633#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004634$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004635#endif
4636
4637; return 0; }
4638EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004639if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004640 rm -rf conftest*
4641 eval "ac_cv_func_$ac_func=yes"
4642else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004643 echo "configure: failed program was:" >&5
4644 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004645 rm -rf conftest*
4646 eval "ac_cv_func_$ac_func=no"
4647fi
4648rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004649fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004650
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004651if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004652 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004653 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004654 cat >> confdefs.h <<EOF
4655#define $ac_tr_func 1
4656EOF
4657
4658else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004659 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004660fi
4661done
4662
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004663for ac_func in hypot
4664do
4665echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004666echo "configure:4667: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004667if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4668 echo $ac_n "(cached) $ac_c" 1>&6
4669else
4670 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004671#line 4672 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004672#include "confdefs.h"
4673/* System header to define __stub macros and hopefully few prototypes,
4674 which can conflict with char $ac_func(); below. */
4675#include <assert.h>
4676/* Override any gcc2 internal prototype to avoid an error. */
4677/* We use char because int might match the return type of a gcc2
4678 builtin and then its argument prototype would still apply. */
4679char $ac_func();
4680
Guido van Rossumf78abae1997-01-21 22:02:36 +00004681int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004682
4683/* The GNU C library defines this for functions which it implements
4684 to always fail with ENOSYS. Some functions are actually named
4685 something starting with __ and the normal name is an alias. */
4686#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4687choke me
4688#else
4689$ac_func();
4690#endif
4691
4692; return 0; }
4693EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004694if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004695 rm -rf conftest*
4696 eval "ac_cv_func_$ac_func=yes"
4697else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004698 echo "configure: failed program was:" >&5
4699 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004700 rm -rf conftest*
4701 eval "ac_cv_func_$ac_func=no"
4702fi
4703rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004704fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004705
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004706if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4707 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004708 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4709 cat >> confdefs.h <<EOF
4710#define $ac_tr_func 1
4711EOF
4712
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004713else
4714 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004715LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004716fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004717done
4718
Guido van Rossumf78abae1997-01-21 22:02:36 +00004719
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004720LIBS=$LIBS_SAVE
4721
Guido van Rossumda88dad1995-01-26 00:46:29 +00004722# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004723echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004724echo "configure:4725: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004725if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
4726 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004727else
4728 if test "$cross_compiling" = yes; then
4729 ac_cv_func_getopt=no
4730else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004731 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004732#line 4733 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004733#include "confdefs.h"
4734#include <stdio.h>
4735extern int optind, opterr, getopt();
4736extern char* optarg;
4737int main() {
4738 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
4739 opterr = 0;
4740 if (getopt(3, av, "f:") == 'f') { exit(1); }
4741 exit(0);
4742}
4743EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004744if { (eval echo configure:4745: \"$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 +00004745then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004746 ac_cv_func_getopt=yes
4747else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004748 echo "configure: failed program was:" >&5
4749 cat conftest.$ac_ext >&5
4750 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00004751 ac_cv_func_getopt=no
4752fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004753rm -fr conftest*
4754fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004755
4756fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004757echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004758test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
4759
Guido van Rossumad713701997-07-10 22:42:38 +00004760# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00004761echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004762echo "configure:4763: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00004763if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
4764 echo $ac_n "(cached) $ac_c" 1>&6
4765else
4766 if test "$cross_compiling" = yes; then
4767 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4768else
4769 cat > conftest.$ac_ext <<EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004770#line 4771 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00004771#include "confdefs.h"
4772#include <stdio.h>
4773#ifdef HAVE_STDLIB
4774#include <stdlib.h>
4775#else
4776char *malloc(), *realloc();
4777int *free();
4778#endif
4779main() {
4780 char *p;
4781 p = malloc(0);
4782 if (p == NULL) exit(1);
4783 p = realloc(p, 0);
4784 if (p == NULL) exit(1);
4785 free(p);
4786 exit(0);
4787}
4788EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004789if { (eval echo configure:4790: \"$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 +00004790then
4791 ac_cv_malloc_zero=nonnull
4792else
4793 echo "configure: failed program was:" >&5
4794 cat conftest.$ac_ext >&5
4795 rm -fr conftest*
4796 ac_cv_malloc_zero=null
4797fi
4798rm -fr conftest*
4799fi
4800
4801fi
4802
4803echo "$ac_t""$ac_cv_malloc_zero" 1>&6
4804if test "$ac_cv_malloc_zero" = null
4805then
4806 cat >> confdefs.h <<\EOF
4807#define MALLOC_ZERO_RETURNS_NULL 1
4808EOF
4809
4810fi
4811
Guido van Rossum627b2d71993-12-24 10:39:16 +00004812# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004813trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004814cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004815# This file is a shell script that caches the results of configure
4816# tests run on this system so they can be shared between configure
4817# scripts and configure runs. It is not useful on other systems.
4818# If it contains results you don't want to keep, you may remove or edit it.
4819#
4820# By default, configure uses ./config.cache as the cache file,
4821# creating it if it does not exist already. You can give configure
4822# the --cache-file=FILE option to use a different cache file; that is
4823# what configure does when it calls configure scripts in
4824# subdirectories, so they share the cache.
4825# Giving --cache-file=/dev/null disables caching, for debugging configure.
4826# config.status only pays attention to the cache file if you give it the
4827# --recheck option to rerun configure.
4828#
4829EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004830# The following way of writing the cache mishandles newlines in values,
4831# but we know of no workaround that is simple, portable, and efficient.
4832# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004833# Ultrix sh set writes to stderr and can't be redirected directly,
4834# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004835(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004836 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004837 *ac_space=\ *)
4838 # `set' does not quote correctly, so add quotes (double-quote substitution
4839 # turns \\\\ into \\, and sed turns \\ into \).
4840 sed -n \
4841 -e "s/'/'\\\\''/g" \
4842 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4843 ;;
4844 *)
4845 # `set' quotes correctly as required by POSIX, so do not add quotes.
4846 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4847 ;;
4848 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004849if cmp -s $cache_file confcache; then
4850 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004852 if test -w $cache_file; then
4853 echo "updating cache $cache_file"
4854 cat confcache > $cache_file
4855 else
4856 echo "not updating unwritable cache $cache_file"
4857 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004858fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004859rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00004860
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004861trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004862
4863test "x$prefix" = xNONE && prefix=$ac_default_prefix
4864# Let make expand exec_prefix.
4865test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00004866
Guido van Rossum7f43da71994-08-01 12:15:30 +00004867# Any assignment to VPATH causes Sun make to only execute
4868# the first set of double-colon rules, so remove it if not needed.
4869# If there is a colon in the path, we need to keep it.
4870if test "x$srcdir" = x.; then
4871 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4872fi
4873
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004874trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00004875
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004876DEFS=-DHAVE_CONFIG_H
4877
4878# Without the "./", some shells look in PATH for config.status.
4879: ${CONFIG_STATUS=./config.status}
4880
4881echo creating $CONFIG_STATUS
4882rm -f $CONFIG_STATUS
4883cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004884#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00004885# Generated automatically by configure.
4886# Run this file to recreate the current configuration.
4887# This directory was configured as follows,
4888# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4889#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004890# $0 $ac_configure_args
4891#
4892# Compiler output produced by configure, useful for debugging
4893# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00004894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004896for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00004897do
Guido van Rossum7f43da71994-08-01 12:15:30 +00004898 case "\$ac_option" in
4899 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004900 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4901 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00004902 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004903 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004904 exit 0 ;;
4905 -help | --help | --hel | --he | --h)
4906 echo "\$ac_cs_usage"; exit 0 ;;
4907 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004908 esac
4909done
4910
Guido van Rossum7f43da71994-08-01 12:15:30 +00004911ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00004912
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004913trap 'rm -fr `echo "Makefile \
4914 Objects/Makefile \
4915 Parser/Makefile \
4916 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004917 Modules/Makefile.pre \
4918 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004919EOF
4920cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004921
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004922# Protect against being on the right side of a sed subst in config.status.
4923sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4924 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004925$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00004926$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004927s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004928s%@CFLAGS@%$CFLAGS%g
4929s%@CPPFLAGS@%$CPPFLAGS%g
4930s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004931s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004932s%@DEFS@%$DEFS%g
4933s%@LDFLAGS@%$LDFLAGS%g
4934s%@LIBS@%$LIBS%g
4935s%@exec_prefix@%$exec_prefix%g
4936s%@prefix@%$prefix%g
4937s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004938s%@bindir@%$bindir%g
4939s%@sbindir@%$sbindir%g
4940s%@libexecdir@%$libexecdir%g
4941s%@datadir@%$datadir%g
4942s%@sysconfdir@%$sysconfdir%g
4943s%@sharedstatedir@%$sharedstatedir%g
4944s%@localstatedir@%$localstatedir%g
4945s%@libdir@%$libdir%g
4946s%@includedir@%$includedir%g
4947s%@oldincludedir@%$oldincludedir%g
4948s%@infodir@%$infodir%g
4949s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00004950s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004951s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00004952s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00004953s%@SET_CXX@%$SET_CXX%g
4954s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004955s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004956s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
4957s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004958s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004959s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004960s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004961s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00004962s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4963s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004964s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004965s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004966s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004967s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00004968s%@SO@%$SO%g
4969s%@LDSHARED@%$LDSHARED%g
4970s%@CCSHARED@%$CCSHARED%g
4971s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00004972s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00004973s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004974s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00004975s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004976s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004977s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
4978s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
4979s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004980s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004981s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004982s%@LIBM@%$LIBM%g
4983s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984
4985CEOF
4986EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004987
4988cat >> $CONFIG_STATUS <<\EOF
4989
4990# Split the substitutions into bite-sized pieces for seds with
4991# small command number limits, like on Digital OSF/1 and HP-UX.
4992ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4993ac_file=1 # Number of current file.
4994ac_beg=1 # First line for current file.
4995ac_end=$ac_max_sed_cmds # Line after last line for current file.
4996ac_more_lines=:
4997ac_sed_cmds=""
4998while $ac_more_lines; do
4999 if test $ac_beg -gt 1; then
5000 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5001 else
5002 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5003 fi
5004 if test ! -s conftest.s$ac_file; then
5005 ac_more_lines=false
5006 rm -f conftest.s$ac_file
5007 else
5008 if test -z "$ac_sed_cmds"; then
5009 ac_sed_cmds="sed -f conftest.s$ac_file"
5010 else
5011 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5012 fi
5013 ac_file=`expr $ac_file + 1`
5014 ac_beg=$ac_end
5015 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5016 fi
5017done
5018if test -z "$ac_sed_cmds"; then
5019 ac_sed_cmds=cat
5020fi
5021EOF
5022
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005023cat >> $CONFIG_STATUS <<EOF
5024
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005025CONFIG_FILES=\${CONFIG_FILES-"Makefile \
5026 Objects/Makefile \
5027 Parser/Makefile \
5028 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005029 Modules/Makefile.pre \
5030 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005031EOF
5032cat >> $CONFIG_STATUS <<\EOF
5033for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005034 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005035 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005036 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005037 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5038 *) ac_file_in="${ac_file}.in" ;;
5039 esac
5040
Guido van Rossumf78abae1997-01-21 22:02:36 +00005041 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005042
5043 # Remove last slash and all that follows it. Not all systems have dirname.
5044 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5045 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5046 # The file is in a subdirectory.
5047 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005048 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005049 # A "../" for each directory in $ac_dir_suffix.
5050 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5051 else
5052 ac_dir_suffix= ac_dots=
5053 fi
5054
5055 case "$ac_given_srcdir" in
5056 .) srcdir=.
5057 if test -z "$ac_dots"; then top_srcdir=.
5058 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5059 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5060 *) # Relative path.
5061 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5062 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5063 esac
5064
Guido van Rossumf78abae1997-01-21 22:02:36 +00005065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005066 echo creating "$ac_file"
5067 rm -f "$ac_file"
5068 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5069 case "$ac_file" in
5070 *Makefile*) ac_comsub="1i\\
5071# $configure_input" ;;
5072 *) ac_comsub= ;;
5073 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00005074
5075 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 +00005076 sed -e "$ac_comsub
5077s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005078s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005079s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00005080" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00005081fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00005082rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005084# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5085# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00005086#
5087# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5089ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005090ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005092# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5094ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005095ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005097# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005098ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5099ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005100ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005102
Guido van Rossumf78abae1997-01-21 22:02:36 +00005103if test "${CONFIG_HEADERS+set}" != set; then
5104EOF
5105cat >> $CONFIG_STATUS <<EOF
5106 CONFIG_HEADERS="config.h"
5107EOF
5108cat >> $CONFIG_STATUS <<\EOF
5109fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005110for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005111 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005112 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005113 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005114 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5115 *) ac_file_in="${ac_file}.in" ;;
5116 esac
5117
Guido van Rossum7f43da71994-08-01 12:15:30 +00005118 echo creating $ac_file
5119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005120 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00005121 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5122 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005123
5124EOF
5125
5126# Transform confdefs.h into a sed script conftest.vals that substitutes
5127# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005128# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005129# Protect against being in an unquoted here document in config.status.
5130rm -f conftest.vals
5131cat > conftest.hdr <<\EOF
5132s/[\\&%]/\\&/g
5133s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005134s%#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 +00005135s%ac_d%ac_u%gp
5136s%ac_u%ac_e%gp
5137EOF
5138sed -n -f conftest.hdr confdefs.h > conftest.vals
5139rm -f conftest.hdr
5140
5141# This sed command replaces #undef with comments. This is necessary, for
5142# example, in the case of _POSIX_SOURCE, which is predefined and required
5143# on some systems where configure will not decide to define it.
5144cat >> conftest.vals <<\EOF
5145s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5146EOF
5147
5148# Break up conftest.vals because some shells have a limit on
5149# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150
5151rm -f conftest.tail
5152while :
5153do
5154 ac_lines=`grep -c . conftest.vals`
5155 # grep -c gives empty output for an empty file on some AIX systems.
5156 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5157 # Write a limited-size here document to conftest.frag.
5158 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5159 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5160 echo 'CEOF
5161 sed -f conftest.frag conftest.in > conftest.out
5162 rm -f conftest.in
5163 mv conftest.out conftest.in
5164' >> $CONFIG_STATUS
5165 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5166 rm -f conftest.vals
5167 mv conftest.tail conftest.vals
5168done
5169rm -f conftest.vals
5170
5171cat >> $CONFIG_STATUS <<\EOF
5172 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00005173 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005174 cat conftest.in >> conftest.h
5175 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00005176 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005177 echo "$ac_file is unchanged"
5178 rm -f conftest.h
5179 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005180 # Remove last slash and all that follows it. Not all systems have dirname.
5181 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5182 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5183 # The file is in a subdirectory.
5184 test ! -d "$ac_dir" && mkdir "$ac_dir"
5185 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005186 rm -f $ac_file
5187 mv conftest.h $ac_file
5188 fi
5189fi; done
5190
Guido van Rossumf78abae1997-01-21 22:02:36 +00005191EOF
5192cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005193
Guido van Rossumf78abae1997-01-21 22:02:36 +00005194EOF
5195cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005196
5197exit 0
5198EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005199chmod +x $CONFIG_STATUS
5200rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005201test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005202