blob: 0325d20c319cca2144725a55c91ab73bd332fb85 [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 Rossum95012191999-12-16 17:50:52 +00003# From configure.in Revision: 1.113
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*)
2358 if $CC -Xlinker -V 2>/dev/null | 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
3198dldir=$withval
3199if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003200then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003201else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003202fi
3203DLINCLDIR=${dldir}
3204LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003205else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003206 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003207fi
3208
3209
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003210echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003211echo "configure:3212: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003212# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003213if test "${with_dl_dld+set}" = set; then
3214 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003216echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003217cat >> confdefs.h <<\EOF
3218#define WITH_DL_DLD 1
3219EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003220
3221dldir=`echo "$withval" | sed 's/,.*//'`
3222dlddir=`echo "$withval" | sed 's/.*,//'`
3223if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003224then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003226fi
3227DLINCLDIR=${dldir}
3228LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003229else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003230 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003231fi
3232
3233
Guido van Rossum627b2d71993-12-24 10:39:16 +00003234# checks for library functions
Fred Drake35a092f1999-12-13 16:23:35 +00003235for ac_func in alarm chown clock confstr ctermid ctermid_r dlopen execv \
3236 flock fork fsync fdatasync fpathconf ftime ftruncate \
Fred Drakef581db11999-12-14 21:11:47 +00003237 getgroups getlogin getpeername getpgrp getpid getpwent gettimeofday getwd \
Fred Drake35a092f1999-12-13 16:23:35 +00003238 kill link lstat mkfifo mktime nice pathconf pause plock pthread_init \
3239 putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00003240 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003241 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003242 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
3243 truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00003244do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003245echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003246echo "configure:3247: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003247if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3248 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249else
3250 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003251#line 3252 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003252#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003253/* System header to define __stub macros and hopefully few prototypes,
3254 which can conflict with char $ac_func(); below. */
3255#include <assert.h>
3256/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003257/* We use char because int might match the return type of a gcc2
3258 builtin and then its argument prototype would still apply. */
3259char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003260
Guido van Rossumf78abae1997-01-21 22:02:36 +00003261int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003262
Guido van Rossum627b2d71993-12-24 10:39:16 +00003263/* The GNU C library defines this for functions which it implements
3264 to always fail with ENOSYS. Some functions are actually named
3265 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003266#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003267choke me
3268#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003269$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003270#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003271
Guido van Rossum7f43da71994-08-01 12:15:30 +00003272; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003273EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003274if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003275 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276 eval "ac_cv_func_$ac_func=yes"
3277else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003278 echo "configure: failed program was:" >&5
3279 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003280 rm -rf conftest*
3281 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003282fi
3283rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003287 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003288 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289 cat >> confdefs.h <<EOF
3290#define $ac_tr_func 1
3291EOF
3292
3293else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003294 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003296done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003297
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003298
3299# check for long file support functions
3300for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Guido van Rossum627b2d71993-12-24 10:39:16 +00003301do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003302echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003303echo "configure:3304: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003304if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3305 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003306else
3307 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003308#line 3309 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003309#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003310/* System header to define __stub macros and hopefully few prototypes,
3311 which can conflict with char $ac_func(); below. */
3312#include <assert.h>
3313/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003314/* We use char because int might match the return type of a gcc2
3315 builtin and then its argument prototype would still apply. */
3316char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003317
Guido van Rossumf78abae1997-01-21 22:02:36 +00003318int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319
Guido van Rossum627b2d71993-12-24 10:39:16 +00003320/* The GNU C library defines this for functions which it implements
3321 to always fail with ENOSYS. Some functions are actually named
3322 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003323#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003324choke me
3325#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003326$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003327#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328
Guido van Rossum7f43da71994-08-01 12:15:30 +00003329; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003330EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003331if { (eval echo configure:3332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003332 rm -rf conftest*
3333 eval "ac_cv_func_$ac_func=yes"
3334else
3335 echo "configure: failed program was:" >&5
3336 cat conftest.$ac_ext >&5
3337 rm -rf conftest*
3338 eval "ac_cv_func_$ac_func=no"
3339fi
3340rm -f conftest*
3341fi
3342
3343if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3344 echo "$ac_t""yes" 1>&6
3345 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3346 cat >> confdefs.h <<EOF
3347#define $ac_tr_func 1
3348EOF
3349
3350else
3351 echo "$ac_t""no" 1>&6
3352fi
3353done
3354
3355
3356for ac_func in dup2 getcwd strdup strerror memmove
3357do
3358echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003359echo "configure:3360: checking for $ac_func" >&5
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003360if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3361 echo $ac_n "(cached) $ac_c" 1>&6
3362else
3363 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003364#line 3365 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003365#include "confdefs.h"
3366/* System header to define __stub macros and hopefully few prototypes,
3367 which can conflict with char $ac_func(); below. */
3368#include <assert.h>
3369/* Override any gcc2 internal prototype to avoid an error. */
3370/* We use char because int might match the return type of a gcc2
3371 builtin and then its argument prototype would still apply. */
3372char $ac_func();
3373
3374int main() {
3375
3376/* The GNU C library defines this for functions which it implements
3377 to always fail with ENOSYS. Some functions are actually named
3378 something starting with __ and the normal name is an alias. */
3379#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3380choke me
3381#else
3382$ac_func();
3383#endif
3384
3385; return 0; }
3386EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003387if { (eval echo configure:3388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003388 rm -rf conftest*
3389 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003390else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003391 echo "configure: failed program was:" >&5
3392 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003393 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003394 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003395fi
3396rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003397fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003399if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003400 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003401 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3402 cat >> confdefs.h <<EOF
3403#define $ac_tr_func 1
3404EOF
3405
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003406else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003407 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003408LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003409fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003410done
3411
Guido van Rossumf78abae1997-01-21 22:02:36 +00003412
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003413echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003414echo "configure:3415: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003415if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
3416 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417else
3418 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003419#line 3420 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003420#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003421/* System header to define __stub macros and hopefully few prototypes,
3422 which can conflict with char getpgrp(); below. */
3423#include <assert.h>
3424/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003425/* We use char because int might match the return type of a gcc2
3426 builtin and then its argument prototype would still apply. */
3427char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003428
Guido van Rossumf78abae1997-01-21 22:02:36 +00003429int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003430
Guido van Rossum627b2d71993-12-24 10:39:16 +00003431/* The GNU C library defines this for functions which it implements
3432 to always fail with ENOSYS. Some functions are actually named
3433 something starting with __ and the normal name is an alias. */
3434#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
3435choke me
3436#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003437getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003438#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003439
3440; return 0; }
3441EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003442if { (eval echo configure:3443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003443 rm -rf conftest*
3444 eval "ac_cv_func_getpgrp=yes"
3445else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003446 echo "configure: failed program was:" >&5
3447 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003448 rm -rf conftest*
3449 eval "ac_cv_func_getpgrp=no"
3450fi
3451rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003452fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003454if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003455 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003456 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003457#line 3458 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003458#include "confdefs.h"
3459#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003460int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003461getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003462; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003463EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003464if { (eval echo configure:3465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003465 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003466 cat >> confdefs.h <<\EOF
3467#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003468EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003469
Guido van Rossumf78abae1997-01-21 22:02:36 +00003470else
3471 echo "configure: failed program was:" >&5
3472 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003473fi
3474rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003475else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003476 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003477fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003478
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003479echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003480echo "configure:3481: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003481if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
3482 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003483else
3484 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003485#line 3486 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003486#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003487/* System header to define __stub macros and hopefully few prototypes,
3488 which can conflict with char setpgrp(); below. */
3489#include <assert.h>
3490/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003491/* We use char because int might match the return type of a gcc2
3492 builtin and then its argument prototype would still apply. */
3493char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003494
Guido van Rossumf78abae1997-01-21 22:02:36 +00003495int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003496
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003497/* The GNU C library defines this for functions which it implements
3498 to always fail with ENOSYS. Some functions are actually named
3499 something starting with __ and the normal name is an alias. */
3500#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
3501choke me
3502#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003503setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003504#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003505
3506; return 0; }
3507EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003508if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003509 rm -rf conftest*
3510 eval "ac_cv_func_setpgrp=yes"
3511else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003512 echo "configure: failed program was:" >&5
3513 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003514 rm -rf conftest*
3515 eval "ac_cv_func_setpgrp=no"
3516fi
3517rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003518fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003519
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003520if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003521 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003522 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003523#line 3524 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003524#include "confdefs.h"
3525#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003526int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003527setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003528; return 0; }
3529EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003530if { (eval echo configure:3531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003531 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003532 cat >> confdefs.h <<\EOF
3533#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003534EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003535
Guido van Rossumf78abae1997-01-21 22:02:36 +00003536else
3537 echo "configure: failed program was:" >&5
3538 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003539fi
3540rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003541else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003542 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003543fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003544
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003545echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003546echo "configure:3547: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003547if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3548 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003549else
3550 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003551#line 3552 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003552#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003553/* System header to define __stub macros and hopefully few prototypes,
3554 which can conflict with char gettimeofday(); below. */
3555#include <assert.h>
3556/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003557/* We use char because int might match the return type of a gcc2
3558 builtin and then its argument prototype would still apply. */
3559char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003560
Guido van Rossumf78abae1997-01-21 22:02:36 +00003561int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003562
3563/* The GNU C library defines this for functions which it implements
3564 to always fail with ENOSYS. Some functions are actually named
3565 something starting with __ and the normal name is an alias. */
3566#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3567choke me
3568#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003569gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003570#endif
3571
3572; return 0; }
3573EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003574if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003575 rm -rf conftest*
3576 eval "ac_cv_func_gettimeofday=yes"
3577else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003580 rm -rf conftest*
3581 eval "ac_cv_func_gettimeofday=no"
3582fi
3583rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003584fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003586if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003587 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003588 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003589#line 3590 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003590#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003591#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003592int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003593gettimeofday((struct timeval*)0,(struct timezone*)0);
3594; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003595EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003596if { (eval echo configure:3597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003597 :
3598else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003599 echo "configure: failed program was:" >&5
3600 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003601 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003602 cat >> confdefs.h <<\EOF
3603#define GETTIMEOFDAY_NO_TZ 1
3604EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003605
3606fi
3607rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003608else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003609 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003610fi
3611
3612
3613# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003614echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003615echo "configure:3616: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003616if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3617 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003618else
3619 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003620#line 3621 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003621#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003622#include <sys/types.h>
3623#include <sys/time.h>
3624#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003625int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003626struct tm *tp;
3627; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003628EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003629if { (eval echo configure:3630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003630 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003631 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003632else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003633 echo "configure: failed program was:" >&5
3634 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003635 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003636 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003637fi
3638rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003639fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003640
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003641echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003642if test $ac_cv_header_time = yes; then
3643 cat >> confdefs.h <<\EOF
3644#define TIME_WITH_SYS_TIME 1
3645EOF
3646
3647fi
3648
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003649echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003650echo "configure:3651: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003651if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3652 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003653else
3654 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003655#line 3656 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003656#include "confdefs.h"
3657#include <sys/types.h>
3658#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003659int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003660struct tm *tp; tp->tm_sec;
3661; return 0; }
3662EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003663if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003664 rm -rf conftest*
3665 ac_cv_struct_tm=time.h
3666else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003667 echo "configure: failed program was:" >&5
3668 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003669 rm -rf conftest*
3670 ac_cv_struct_tm=sys/time.h
3671fi
3672rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003673fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003674
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003675echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003676if test $ac_cv_struct_tm = sys/time.h; then
3677 cat >> confdefs.h <<\EOF
3678#define TM_IN_SYS_TIME 1
3679EOF
3680
3681fi
3682
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003683echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003684echo "configure:3685: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003685if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3686 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003687else
3688 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003689#line 3690 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003690#include "confdefs.h"
3691#include <sys/types.h>
3692#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003693int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003694struct tm tm; tm.tm_zone;
3695; return 0; }
3696EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003697if { (eval echo configure:3698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003698 rm -rf conftest*
3699 ac_cv_struct_tm_zone=yes
3700else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003701 echo "configure: failed program was:" >&5
3702 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003703 rm -rf conftest*
3704 ac_cv_struct_tm_zone=no
3705fi
3706rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003707fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003709echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003710if test "$ac_cv_struct_tm_zone" = yes; then
3711 cat >> confdefs.h <<\EOF
3712#define HAVE_TM_ZONE 1
3713EOF
3714
3715else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003716 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003717echo "configure:3718: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003718if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3719 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720else
3721 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003722#line 3723 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003723#include "confdefs.h"
3724#include <time.h>
3725#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003726extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003727#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003728int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003729atoi(*tzname);
3730; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003731EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003732if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003733 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003734 ac_cv_var_tzname=yes
3735else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003736 echo "configure: failed program was:" >&5
3737 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003738 rm -rf conftest*
3739 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003740fi
3741rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003742fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743
3744echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745 if test $ac_cv_var_tzname = yes; then
3746 cat >> confdefs.h <<\EOF
3747#define HAVE_TZNAME 1
3748EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003750 fi
3751fi
3752
3753
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003754echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003755echo "configure:3756: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003756if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3757 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758else
3759 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003760#line 3761 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003761#include "confdefs.h"
3762#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003763int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003764return altzone;
3765; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003766EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003767if { (eval echo configure:3768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003768 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003769 ac_cv_header_time_altzone=yes
3770else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003771 echo "configure: failed program was:" >&5
3772 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003773 rm -rf conftest*
3774 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003775fi
3776rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003777fi
3778
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003779echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003780if test $ac_cv_header_time_altzone = yes; then
3781 cat >> confdefs.h <<\EOF
3782#define HAVE_ALTZONE 1
3783EOF
3784
3785fi
3786
Guido van Rossumda88dad1995-01-26 00:46:29 +00003787was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003788echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003789echo "configure:3790: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003790cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003791#line 3792 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003792#include "confdefs.h"
3793
3794#include <sys/types.h>
3795#include <sys/select.h>
3796#include <sys/time.h>
3797
Guido van Rossumf78abae1997-01-21 22:02:36 +00003798int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003799;
3800; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003801EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003802if { (eval echo configure:3803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003803 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003804 cat >> confdefs.h <<\EOF
3805#define SYS_SELECT_WITH_SYS_TIME 1
3806EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003807 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808else
3809 echo "configure: failed program was:" >&5
3810 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003811fi
3812rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003813echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003814
3815# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003816
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003817echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003818echo "configure:3819: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003819if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3820 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003821else
3822 if test "$GCC" = yes; then
3823 # GCC predefines this symbol on systems where it applies.
3824cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003825#line 3826 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003826#include "confdefs.h"
3827#ifdef __CHAR_UNSIGNED__
3828 yes
3829#endif
3830
3831EOF
3832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3833 egrep "yes" >/dev/null 2>&1; then
3834 rm -rf conftest*
3835 ac_cv_c_char_unsigned=yes
3836else
3837 rm -rf conftest*
3838 ac_cv_c_char_unsigned=no
3839fi
3840rm -f conftest*
3841
3842else
3843if test "$cross_compiling" = yes; then
3844 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3845else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003846 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003847#line 3848 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003848#include "confdefs.h"
3849/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003850#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003851#define volatile
3852#endif
3853main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003854 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003855}
3856EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003857if { (eval echo configure:3858: \"$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 +00003858then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003859 ac_cv_c_char_unsigned=yes
3860else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003861 echo "configure: failed program was:" >&5
3862 cat conftest.$ac_ext >&5
3863 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864 ac_cv_c_char_unsigned=no
3865fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003866rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003868
3869fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003870fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003871
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003872echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3874 cat >> confdefs.h <<\EOF
3875#define __CHAR_UNSIGNED__ 1
3876EOF
3877
3878fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003879
3880
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003881echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003882echo "configure:3883: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003883if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3884 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885else
3886 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003887#line 3888 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888#include "confdefs.h"
3889
Guido van Rossumf78abae1997-01-21 22:02:36 +00003890int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003891
3892/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003893typedef int charset[2]; const charset x;
3894/* SunOS 4.1.1 cc rejects this. */
3895char const *const *ccp;
3896char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003897/* NEC SVR4.0.2 mips cc rejects this. */
3898struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003899static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900/* AIX XL C 1.02.0.0 rejects this.
3901 It does not let you subtract one const X* pointer from another in an arm
3902 of an if-expression whose if-part is not a constant expression */
3903const char *g = "string";
3904ccp = &g + (g ? g-g : 0);
3905/* HPUX 7.0 cc rejects these. */
3906++ccp;
3907p = (char**) ccp;
3908ccp = (char const *const *) p;
3909{ /* SCO 3.2v4 cc rejects this. */
3910 char *t;
3911 char const *s = 0 ? (char *) 0 : (char const *) 0;
3912
3913 *t++ = 0;
3914}
3915{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003916 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003917 const int *foo = &x[0];
3918 ++foo;
3919}
3920{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3921 typedef const int *iptr;
3922 iptr p = 0;
3923 ++p;
3924}
3925{ /* AIX XL C 1.02.0.0 rejects this saying
3926 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3927 struct s { int j; const int *ap[3]; };
3928 struct s *b; b->j = 5;
3929}
3930{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3931 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003932}
3933
3934; return 0; }
3935EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003936if { (eval echo configure:3937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003937 rm -rf conftest*
3938 ac_cv_c_const=yes
3939else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003940 echo "configure: failed program was:" >&5
3941 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942 rm -rf conftest*
3943 ac_cv_c_const=no
3944fi
3945rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003946fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003948echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949if test $ac_cv_c_const = no; then
3950 cat >> confdefs.h <<\EOF
3951#define const
3952EOF
3953
3954fi
3955
3956
Guido van Rossumda88dad1995-01-26 00:46:29 +00003957works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003958echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003959echo "configure:3960: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003960cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003961#line 3962 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003962#include "confdefs.h"
3963
Guido van Rossumf78abae1997-01-21 22:02:36 +00003964int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965volatile int x; x = 0;
3966; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003967EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003968if { (eval echo configure:3969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003969 rm -rf conftest*
3970 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003971else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003972 echo "configure: failed program was:" >&5
3973 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003974 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003975 cat >> confdefs.h <<\EOF
3976#define volatile
3977EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003978
3979fi
3980rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003981echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003982
Guido van Rossumda88dad1995-01-26 00:46:29 +00003983works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003984echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00003985echo "configure:3986: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003986cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003987#line 3988 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003988#include "confdefs.h"
3989
Guido van Rossumf78abae1997-01-21 22:02:36 +00003990int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991signed char c;
3992; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003993EOF
Guido van Rossum95012191999-12-16 17:50:52 +00003994if { (eval echo configure:3995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003995 rm -rf conftest*
3996 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003997else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003998 echo "configure: failed program was:" >&5
3999 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004000 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001 cat >> confdefs.h <<\EOF
4002#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004004
4005fi
4006rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004007echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004008
Guido van Rossumda88dad1995-01-26 00:46:29 +00004009have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004010echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004011echo "configure:4012: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004013#line 4014 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004014#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004015int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004016int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017return foo(10);
4018; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004019EOF
Guido van Rossum95012191999-12-16 17:50:52 +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 cat >> confdefs.h <<\EOF
4023#define HAVE_PROTOTYPES 1
4024EOF
4025 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004026else
4027 echo "configure: failed program was:" >&5
4028 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004029fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004031echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032
Guido van Rossumda88dad1995-01-26 00:46:29 +00004033works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004034echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004035echo "configure:4036: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004036cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004037#line 4038 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004038#include "confdefs.h"
4039
4040#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004041int foo(int x, ...) {
4042 va_list va;
4043 va_start(va, x);
4044 va_arg(va, int);
4045 va_arg(va, char *);
4046 va_arg(va, double);
4047 return 0;
4048}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004049
Guido van Rossumf78abae1997-01-21 22:02:36 +00004050int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004051return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004053EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004054if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004055 rm -rf conftest*
4056 cat >> confdefs.h <<\EOF
4057#define HAVE_STDARG_PROTOTYPES 1
4058EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004059 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004060else
4061 echo "configure: failed program was:" >&5
4062 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004063fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004064rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004065echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004066
Guido van Rossumda88dad1995-01-26 00:46:29 +00004067if test "$have_prototypes" = yes; then
4068bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004069echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004070echo "configure:4071: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004071cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004072#line 4073 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004073#include "confdefs.h"
4074#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004075int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076char **t;execve("@",t,t);
4077; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004078EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004079if { (eval echo configure:4080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004080 :
4081else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004082 echo "configure: failed program was:" >&5
4083 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004084 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004085 cat >> confdefs.h <<\EOF
4086#define BAD_EXEC_PROTOTYPES 1
4087EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004088 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004089fi
4090rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004091echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004092fi
4093
Guido van Rossumda88dad1995-01-26 00:46:29 +00004094bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004095echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004096echo "configure:4097: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004097if test "$cross_compiling" = yes; then
4098 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4099else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004100 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004101#line 4102 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004102#include "confdefs.h"
4103
4104struct s { int a; int b; };
4105static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004106int foobar() {
4107 static int random;
4108 random = (int) &foo;
4109 return random;
4110}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004111static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004112main() {
4113 exit(!((int)&foo == foobar()));
4114}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004115
4116EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004117if { (eval echo configure:4118: \"$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 +00004118then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004119 :
4120else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004121 echo "configure: failed program was:" >&5
4122 cat conftest.$ac_ext >&5
4123 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124 cat >> confdefs.h <<\EOF
4125#define BAD_STATIC_FORWARD 1
4126EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004127 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004128fi
4129rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004130fi
4131
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004132echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004133
Guido van Rossumda88dad1995-01-26 00:46:29 +00004134va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004135echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004136echo "configure:4137: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004137cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004138#line 4139 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004139#include "confdefs.h"
4140
4141#ifdef HAVE_STDARG_PROTOTYPES
4142#include <stdarg.h>
4143#else
4144#include <varargs.h>
4145#endif
4146
Guido van Rossumf78abae1997-01-21 22:02:36 +00004147int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148va_list list1, list2; list1 = list2;
4149; return 0; }
4150EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004151if { (eval echo configure:4152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152 :
4153else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156 rm -rf conftest*
4157 cat >> confdefs.h <<\EOF
4158#define VA_LIST_IS_ARRAY 1
4159EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004160 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161fi
4162rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004163echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004165# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4166echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004167echo "configure:4168: checking for gethostbyname_r" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004168if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
4169 echo $ac_n "(cached) $ac_c" 1>&6
4170else
4171 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004172#line 4173 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004173#include "confdefs.h"
4174/* System header to define __stub macros and hopefully few prototypes,
4175 which can conflict with char gethostbyname_r(); below. */
4176#include <assert.h>
4177/* Override any gcc2 internal prototype to avoid an error. */
4178/* We use char because int might match the return type of a gcc2
4179 builtin and then its argument prototype would still apply. */
4180char gethostbyname_r();
4181
4182int main() {
4183
4184/* The GNU C library defines this for functions which it implements
4185 to always fail with ENOSYS. Some functions are actually named
4186 something starting with __ and the normal name is an alias. */
4187#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
4188choke me
4189#else
4190gethostbyname_r();
4191#endif
4192
4193; return 0; }
4194EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004195if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004196 rm -rf conftest*
4197 eval "ac_cv_func_gethostbyname_r=yes"
4198else
4199 echo "configure: failed program was:" >&5
4200 cat conftest.$ac_ext >&5
4201 rm -rf conftest*
4202 eval "ac_cv_func_gethostbyname_r=no"
4203fi
4204rm -f conftest*
4205fi
4206
4207if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
4208 echo "$ac_t""yes" 1>&6
4209
4210 cat >> confdefs.h <<\EOF
4211#define HAVE_GETHOSTBYNAME_R 1
4212EOF
4213
4214 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004215echo "configure:4216: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004216 OLD_CFLAGS=$CFLAGS
4217 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
4218 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004219#line 4220 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004220#include "confdefs.h"
4221
4222# include <netdb.h>
4223
4224int main() {
4225
4226 char *name;
4227 struct hostent *he, *res;
4228 char buffer[2048];
4229 int buflen = 2048;
4230 int h_errnop;
4231
4232 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
4233
4234; return 0; }
4235EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004236if { (eval echo configure:4237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004237 rm -rf conftest*
4238
4239 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004240#define HAVE_GETHOSTBYNAME_R 1
4241EOF
4242
4243 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004244#define HAVE_GETHOSTBYNAME_R_6_ARG 1
4245EOF
4246
4247 echo "$ac_t""yes" 1>&6
4248
4249else
4250 echo "configure: failed program was:" >&5
4251 cat conftest.$ac_ext >&5
4252 rm -rf conftest*
4253
4254 echo "$ac_t""no" 1>&6
4255 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004256echo "configure:4257: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004257 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004258#line 4259 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004259#include "confdefs.h"
4260
4261# include <netdb.h>
4262
4263int main() {
4264
4265 char *name;
4266 struct hostent *he;
4267 char buffer[2048];
4268 int buflen = 2048;
4269 int h_errnop;
4270
4271 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
4272
4273; return 0; }
4274EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004275if { (eval echo configure:4276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004276 rm -rf conftest*
4277
4278 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004279#define HAVE_GETHOSTBYNAME_R 1
4280EOF
4281
4282 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004283#define HAVE_GETHOSTBYNAME_R_5_ARG 1
4284EOF
4285
4286 echo "$ac_t""yes" 1>&6
4287
4288else
4289 echo "configure: failed program was:" >&5
4290 cat conftest.$ac_ext >&5
4291 rm -rf conftest*
4292
4293 echo "$ac_t""no" 1>&6
4294 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004295echo "configure:4296: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004296 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004297#line 4298 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004298#include "confdefs.h"
4299
4300# include <netdb.h>
4301
4302int main() {
4303
4304 char *name;
4305 struct hostent *he;
4306 struct hostent_data data;
4307
4308 (void) gethostbyname_r(name, he, &data);
4309
4310; return 0; }
4311EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004312if { (eval echo configure:4313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004313 rm -rf conftest*
4314
4315 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004316#define HAVE_GETHOSTBYNAME_R 1
4317EOF
4318
4319 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004320#define HAVE_GETHOSTBYNAME_R_3_ARG 1
4321EOF
4322
4323 echo "$ac_t""yes" 1>&6
4324
4325else
4326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328 rm -rf conftest*
4329
4330 echo "$ac_t""no" 1>&6
4331
4332fi
4333rm -f conftest*
4334
4335fi
4336rm -f conftest*
4337
4338fi
4339rm -f conftest*
4340 CFLAGS=$OLD_CFLAGS
4341
4342else
4343 echo "$ac_t""no" 1>&6
4344
4345 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004346echo "configure:4347: checking for gethostbyname" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004347if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4348 echo $ac_n "(cached) $ac_c" 1>&6
4349else
4350 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004351#line 4352 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004352#include "confdefs.h"
4353/* System header to define __stub macros and hopefully few prototypes,
4354 which can conflict with char gethostbyname(); below. */
4355#include <assert.h>
4356/* Override any gcc2 internal prototype to avoid an error. */
4357/* We use char because int might match the return type of a gcc2
4358 builtin and then its argument prototype would still apply. */
4359char gethostbyname();
4360
4361int main() {
4362
4363/* The GNU C library defines this for functions which it implements
4364 to always fail with ENOSYS. Some functions are actually named
4365 something starting with __ and the normal name is an alias. */
4366#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4367choke me
4368#else
4369gethostbyname();
4370#endif
4371
4372; return 0; }
4373EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004374if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004375 rm -rf conftest*
4376 eval "ac_cv_func_gethostbyname=yes"
4377else
4378 echo "configure: failed program was:" >&5
4379 cat conftest.$ac_ext >&5
4380 rm -rf conftest*
4381 eval "ac_cv_func_gethostbyname=no"
4382fi
4383rm -f conftest*
4384fi
4385
4386if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4387 echo "$ac_t""yes" 1>&6
4388 cat >> confdefs.h <<\EOF
4389#define HAVE_GETHOSTBYNAME 1
4390EOF
4391
4392else
4393 echo "$ac_t""no" 1>&6
4394fi
4395
4396
4397fi
4398
4399
4400
4401
4402
4403
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004404
Guido van Rossum627b2d71993-12-24 10:39:16 +00004405# checks for system services
4406# (none yet)
4407
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004408# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00004409echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004410echo "configure:4411: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004411ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004412if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004413 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004414else
4415 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004416LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004417cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004418#line 4419 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004419#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004420/* Override any gcc2 internal prototype to avoid an error. */
4421/* We use char because int might match the return type of a gcc2
4422 builtin and then its argument prototype would still apply. */
4423char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004424
Guido van Rossumf78abae1997-01-21 22:02:36 +00004425int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426__fpu_control()
4427; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004428EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004429if { (eval echo configure:4430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004430 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004431 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004432else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004433 echo "configure: failed program was:" >&5
4434 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004435 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004436 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004437fi
4438rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004439LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004440
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004441fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004442if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004443 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004444 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4445 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004446 cat >> confdefs.h <<EOF
4447#define $ac_tr_lib 1
4448EOF
4449
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004450 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004451
4452else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004453 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004454fi
4455
4456
Guido van Rossum7f253911997-05-09 02:42:48 +00004457# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00004458echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004459echo "configure:4460: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00004460# Check whether --with-fpectl or --without-fpectl was given.
4461if test "${with_fpectl+set}" = set; then
4462 withval="$with_fpectl"
4463
4464if test "$withval" != no
4465then cat >> confdefs.h <<\EOF
4466#define WANT_SIGFPE_HANDLER 1
4467EOF
4468 echo "$ac_t""yes" 1>&6
4469else echo "$ac_t""no" 1>&6
4470fi
4471fi
4472
4473
Guido van Rossum7f43da71994-08-01 12:15:30 +00004474# check for --with-libm=...
4475
Guido van Rossum563e7081996-09-10 18:20:48 +00004476case $ac_sys_system in
4477next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004478BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00004479*) LIBM=-lm
4480esac
Guido van Rossum7f253911997-05-09 02:42:48 +00004481echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004482echo "configure:4483: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004483# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004484if test "${with_libm+set}" = set; then
4485 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004486
Guido van Rossum7f253911997-05-09 02:42:48 +00004487if test "$withval" = no
4488then LIBM=
4489 echo "$ac_t""force LIBM empty" 1>&6
4490elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004491then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004492 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004493else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004494fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004495else
4496 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004497fi
4498
4499
4500# check for --with-libc=...
4501
Guido van Rossum7f253911997-05-09 02:42:48 +00004502echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004503echo "configure:4504: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004504# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004505if test "${with_libc+set}" = set; then
4506 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004507
Guido van Rossum7f253911997-05-09 02:42:48 +00004508if test "$withval" = no
4509then LIBC=
4510 echo "$ac_t""force LIBC empty" 1>&6
4511elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004512then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00004513 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004514else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004515fi
Guido van Rossum7f253911997-05-09 02:42:48 +00004516else
4517 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004518fi
4519
4520
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004521# check for hypot() in math library
4522LIBS_SAVE=$LIBS
4523LIBS="$LIBS $LIBM"
4524for ac_func in hypot
4525do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004526echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004527echo "configure:4528: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004528if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4529 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004530else
4531 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004532#line 4533 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004533#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004534/* System header to define __stub macros and hopefully few prototypes,
4535 which can conflict with char $ac_func(); below. */
4536#include <assert.h>
4537/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004538/* We use char because int might match the return type of a gcc2
4539 builtin and then its argument prototype would still apply. */
4540char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004541
Guido van Rossumf78abae1997-01-21 22:02:36 +00004542int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004543
4544/* The GNU C library defines this for functions which it implements
4545 to always fail with ENOSYS. Some functions are actually named
4546 something starting with __ and the normal name is an alias. */
4547#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4548choke me
4549#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004550$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004551#endif
4552
4553; return 0; }
4554EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004555if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004556 rm -rf conftest*
4557 eval "ac_cv_func_$ac_func=yes"
4558else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004559 echo "configure: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004561 rm -rf conftest*
4562 eval "ac_cv_func_$ac_func=no"
4563fi
4564rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004565fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004566
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004567if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004568 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004569 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004570 cat >> confdefs.h <<EOF
4571#define $ac_tr_func 1
4572EOF
4573
4574else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004575 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004576fi
4577done
4578
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004579for ac_func in hypot
4580do
4581echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004582echo "configure:4583: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004583if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4584 echo $ac_n "(cached) $ac_c" 1>&6
4585else
4586 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004587#line 4588 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004588#include "confdefs.h"
4589/* System header to define __stub macros and hopefully few prototypes,
4590 which can conflict with char $ac_func(); below. */
4591#include <assert.h>
4592/* Override any gcc2 internal prototype to avoid an error. */
4593/* We use char because int might match the return type of a gcc2
4594 builtin and then its argument prototype would still apply. */
4595char $ac_func();
4596
Guido van Rossumf78abae1997-01-21 22:02:36 +00004597int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004598
4599/* The GNU C library defines this for functions which it implements
4600 to always fail with ENOSYS. Some functions are actually named
4601 something starting with __ and the normal name is an alias. */
4602#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4603choke me
4604#else
4605$ac_func();
4606#endif
4607
4608; return 0; }
4609EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004610if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004611 rm -rf conftest*
4612 eval "ac_cv_func_$ac_func=yes"
4613else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004614 echo "configure: failed program was:" >&5
4615 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004616 rm -rf conftest*
4617 eval "ac_cv_func_$ac_func=no"
4618fi
4619rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004620fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004621
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004622if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4623 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004624 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4625 cat >> confdefs.h <<EOF
4626#define $ac_tr_func 1
4627EOF
4628
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004629else
4630 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004631LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004632fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004633done
4634
Guido van Rossumf78abae1997-01-21 22:02:36 +00004635
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004636LIBS=$LIBS_SAVE
4637
Guido van Rossumda88dad1995-01-26 00:46:29 +00004638# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004639echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004640echo "configure:4641: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004641if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
4642 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004643else
4644 if test "$cross_compiling" = yes; then
4645 ac_cv_func_getopt=no
4646else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004647 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004648#line 4649 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004649#include "confdefs.h"
4650#include <stdio.h>
4651extern int optind, opterr, getopt();
4652extern char* optarg;
4653int main() {
4654 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
4655 opterr = 0;
4656 if (getopt(3, av, "f:") == 'f') { exit(1); }
4657 exit(0);
4658}
4659EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004660if { (eval echo configure:4661: \"$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 +00004661then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004662 ac_cv_func_getopt=yes
4663else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4666 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00004667 ac_cv_func_getopt=no
4668fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004669rm -fr conftest*
4670fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004671
4672fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004673echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004674test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
4675
Guido van Rossumad713701997-07-10 22:42:38 +00004676# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00004677echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum95012191999-12-16 17:50:52 +00004678echo "configure:4679: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00004679if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
4680 echo $ac_n "(cached) $ac_c" 1>&6
4681else
4682 if test "$cross_compiling" = yes; then
4683 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4684else
4685 cat > conftest.$ac_ext <<EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004686#line 4687 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00004687#include "confdefs.h"
4688#include <stdio.h>
4689#ifdef HAVE_STDLIB
4690#include <stdlib.h>
4691#else
4692char *malloc(), *realloc();
4693int *free();
4694#endif
4695main() {
4696 char *p;
4697 p = malloc(0);
4698 if (p == NULL) exit(1);
4699 p = realloc(p, 0);
4700 if (p == NULL) exit(1);
4701 free(p);
4702 exit(0);
4703}
4704EOF
Guido van Rossum95012191999-12-16 17:50:52 +00004705if { (eval echo configure:4706: \"$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 +00004706then
4707 ac_cv_malloc_zero=nonnull
4708else
4709 echo "configure: failed program was:" >&5
4710 cat conftest.$ac_ext >&5
4711 rm -fr conftest*
4712 ac_cv_malloc_zero=null
4713fi
4714rm -fr conftest*
4715fi
4716
4717fi
4718
4719echo "$ac_t""$ac_cv_malloc_zero" 1>&6
4720if test "$ac_cv_malloc_zero" = null
4721then
4722 cat >> confdefs.h <<\EOF
4723#define MALLOC_ZERO_RETURNS_NULL 1
4724EOF
4725
4726fi
4727
Guido van Rossum627b2d71993-12-24 10:39:16 +00004728# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004730cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004731# This file is a shell script that caches the results of configure
4732# tests run on this system so they can be shared between configure
4733# scripts and configure runs. It is not useful on other systems.
4734# If it contains results you don't want to keep, you may remove or edit it.
4735#
4736# By default, configure uses ./config.cache as the cache file,
4737# creating it if it does not exist already. You can give configure
4738# the --cache-file=FILE option to use a different cache file; that is
4739# what configure does when it calls configure scripts in
4740# subdirectories, so they share the cache.
4741# Giving --cache-file=/dev/null disables caching, for debugging configure.
4742# config.status only pays attention to the cache file if you give it the
4743# --recheck option to rerun configure.
4744#
4745EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004746# The following way of writing the cache mishandles newlines in values,
4747# but we know of no workaround that is simple, portable, and efficient.
4748# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004749# Ultrix sh set writes to stderr and can't be redirected directly,
4750# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004751(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004752 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004753 *ac_space=\ *)
4754 # `set' does not quote correctly, so add quotes (double-quote substitution
4755 # turns \\\\ into \\, and sed turns \\ into \).
4756 sed -n \
4757 -e "s/'/'\\\\''/g" \
4758 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4759 ;;
4760 *)
4761 # `set' quotes correctly as required by POSIX, so do not add quotes.
4762 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4763 ;;
4764 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004765if cmp -s $cache_file confcache; then
4766 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004767else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004768 if test -w $cache_file; then
4769 echo "updating cache $cache_file"
4770 cat confcache > $cache_file
4771 else
4772 echo "not updating unwritable cache $cache_file"
4773 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004774fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004775rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00004776
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004777trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778
4779test "x$prefix" = xNONE && prefix=$ac_default_prefix
4780# Let make expand exec_prefix.
4781test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00004782
Guido van Rossum7f43da71994-08-01 12:15:30 +00004783# Any assignment to VPATH causes Sun make to only execute
4784# the first set of double-colon rules, so remove it if not needed.
4785# If there is a colon in the path, we need to keep it.
4786if test "x$srcdir" = x.; then
4787 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4788fi
4789
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004790trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00004791
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004792DEFS=-DHAVE_CONFIG_H
4793
4794# Without the "./", some shells look in PATH for config.status.
4795: ${CONFIG_STATUS=./config.status}
4796
4797echo creating $CONFIG_STATUS
4798rm -f $CONFIG_STATUS
4799cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004800#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00004801# Generated automatically by configure.
4802# Run this file to recreate the current configuration.
4803# This directory was configured as follows,
4804# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4805#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004806# $0 $ac_configure_args
4807#
4808# Compiler output produced by configure, useful for debugging
4809# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00004810
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004811ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004812for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00004813do
Guido van Rossum7f43da71994-08-01 12:15:30 +00004814 case "\$ac_option" in
4815 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004816 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4817 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00004818 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004819 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004820 exit 0 ;;
4821 -help | --help | --hel | --he | --h)
4822 echo "\$ac_cs_usage"; exit 0 ;;
4823 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004824 esac
4825done
4826
Guido van Rossum7f43da71994-08-01 12:15:30 +00004827ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00004828
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004829trap 'rm -fr `echo "Makefile \
4830 Objects/Makefile \
4831 Parser/Makefile \
4832 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004833 Modules/Makefile.pre \
4834 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004835EOF
4836cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004837
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004838# Protect against being on the right side of a sed subst in config.status.
4839sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4840 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004841$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00004842$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004843s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844s%@CFLAGS@%$CFLAGS%g
4845s%@CPPFLAGS@%$CPPFLAGS%g
4846s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004847s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004848s%@DEFS@%$DEFS%g
4849s%@LDFLAGS@%$LDFLAGS%g
4850s%@LIBS@%$LIBS%g
4851s%@exec_prefix@%$exec_prefix%g
4852s%@prefix@%$prefix%g
4853s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004854s%@bindir@%$bindir%g
4855s%@sbindir@%$sbindir%g
4856s%@libexecdir@%$libexecdir%g
4857s%@datadir@%$datadir%g
4858s%@sysconfdir@%$sysconfdir%g
4859s%@sharedstatedir@%$sharedstatedir%g
4860s%@localstatedir@%$localstatedir%g
4861s%@libdir@%$libdir%g
4862s%@includedir@%$includedir%g
4863s%@oldincludedir@%$oldincludedir%g
4864s%@infodir@%$infodir%g
4865s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00004866s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004867s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00004868s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00004869s%@SET_CXX@%$SET_CXX%g
4870s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004871s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004872s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
4873s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004874s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004875s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004876s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004877s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00004878s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4879s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004880s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004881s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004882s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004883s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00004884s%@SO@%$SO%g
4885s%@LDSHARED@%$LDSHARED%g
4886s%@CCSHARED@%$CCSHARED%g
4887s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00004888s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00004889s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004890s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004891s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004892s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
4893s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
4894s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004895s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004896s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004897s%@LIBM@%$LIBM%g
4898s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004899
4900CEOF
4901EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004902
4903cat >> $CONFIG_STATUS <<\EOF
4904
4905# Split the substitutions into bite-sized pieces for seds with
4906# small command number limits, like on Digital OSF/1 and HP-UX.
4907ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4908ac_file=1 # Number of current file.
4909ac_beg=1 # First line for current file.
4910ac_end=$ac_max_sed_cmds # Line after last line for current file.
4911ac_more_lines=:
4912ac_sed_cmds=""
4913while $ac_more_lines; do
4914 if test $ac_beg -gt 1; then
4915 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4916 else
4917 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4918 fi
4919 if test ! -s conftest.s$ac_file; then
4920 ac_more_lines=false
4921 rm -f conftest.s$ac_file
4922 else
4923 if test -z "$ac_sed_cmds"; then
4924 ac_sed_cmds="sed -f conftest.s$ac_file"
4925 else
4926 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4927 fi
4928 ac_file=`expr $ac_file + 1`
4929 ac_beg=$ac_end
4930 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4931 fi
4932done
4933if test -z "$ac_sed_cmds"; then
4934 ac_sed_cmds=cat
4935fi
4936EOF
4937
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004938cat >> $CONFIG_STATUS <<EOF
4939
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004940CONFIG_FILES=\${CONFIG_FILES-"Makefile \
4941 Objects/Makefile \
4942 Parser/Makefile \
4943 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004944 Modules/Makefile.pre \
4945 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946EOF
4947cat >> $CONFIG_STATUS <<\EOF
4948for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004949 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004950 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004951 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004952 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4953 *) ac_file_in="${ac_file}.in" ;;
4954 esac
4955
Guido van Rossumf78abae1997-01-21 22:02:36 +00004956 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004957
4958 # Remove last slash and all that follows it. Not all systems have dirname.
4959 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4960 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4961 # The file is in a subdirectory.
4962 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004963 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004964 # A "../" for each directory in $ac_dir_suffix.
4965 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4966 else
4967 ac_dir_suffix= ac_dots=
4968 fi
4969
4970 case "$ac_given_srcdir" in
4971 .) srcdir=.
4972 if test -z "$ac_dots"; then top_srcdir=.
4973 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4974 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4975 *) # Relative path.
4976 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4977 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4978 esac
4979
Guido van Rossumf78abae1997-01-21 22:02:36 +00004980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004981 echo creating "$ac_file"
4982 rm -f "$ac_file"
4983 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4984 case "$ac_file" in
4985 *Makefile*) ac_comsub="1i\\
4986# $configure_input" ;;
4987 *) ac_comsub= ;;
4988 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00004989
4990 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 +00004991 sed -e "$ac_comsub
4992s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004993s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004994s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00004995" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00004996fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00004997rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004998
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004999# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5000# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00005001#
5002# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005003ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5004ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005005ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005007# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005008ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5009ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005010ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005011ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005012# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005013ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5014ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005015ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005016ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005017
Guido van Rossumf78abae1997-01-21 22:02:36 +00005018if test "${CONFIG_HEADERS+set}" != set; then
5019EOF
5020cat >> $CONFIG_STATUS <<EOF
5021 CONFIG_HEADERS="config.h"
5022EOF
5023cat >> $CONFIG_STATUS <<\EOF
5024fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005026 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005027 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005028 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005029 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5030 *) ac_file_in="${ac_file}.in" ;;
5031 esac
5032
Guido van Rossum7f43da71994-08-01 12:15:30 +00005033 echo creating $ac_file
5034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005035 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00005036 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5037 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005038
5039EOF
5040
5041# Transform confdefs.h into a sed script conftest.vals that substitutes
5042# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005043# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005044# Protect against being in an unquoted here document in config.status.
5045rm -f conftest.vals
5046cat > conftest.hdr <<\EOF
5047s/[\\&%]/\\&/g
5048s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005049s%#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 +00005050s%ac_d%ac_u%gp
5051s%ac_u%ac_e%gp
5052EOF
5053sed -n -f conftest.hdr confdefs.h > conftest.vals
5054rm -f conftest.hdr
5055
5056# This sed command replaces #undef with comments. This is necessary, for
5057# example, in the case of _POSIX_SOURCE, which is predefined and required
5058# on some systems where configure will not decide to define it.
5059cat >> conftest.vals <<\EOF
5060s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5061EOF
5062
5063# Break up conftest.vals because some shells have a limit on
5064# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005065
5066rm -f conftest.tail
5067while :
5068do
5069 ac_lines=`grep -c . conftest.vals`
5070 # grep -c gives empty output for an empty file on some AIX systems.
5071 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5072 # Write a limited-size here document to conftest.frag.
5073 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5074 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5075 echo 'CEOF
5076 sed -f conftest.frag conftest.in > conftest.out
5077 rm -f conftest.in
5078 mv conftest.out conftest.in
5079' >> $CONFIG_STATUS
5080 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5081 rm -f conftest.vals
5082 mv conftest.tail conftest.vals
5083done
5084rm -f conftest.vals
5085
5086cat >> $CONFIG_STATUS <<\EOF
5087 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00005088 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005089 cat conftest.in >> conftest.h
5090 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00005091 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005092 echo "$ac_file is unchanged"
5093 rm -f conftest.h
5094 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005095 # Remove last slash and all that follows it. Not all systems have dirname.
5096 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5097 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5098 # The file is in a subdirectory.
5099 test ! -d "$ac_dir" && mkdir "$ac_dir"
5100 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005101 rm -f $ac_file
5102 mv conftest.h $ac_file
5103 fi
5104fi; done
5105
Guido van Rossumf78abae1997-01-21 22:02:36 +00005106EOF
5107cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005108
Guido van Rossumf78abae1997-01-21 22:02:36 +00005109EOF
5110cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111
5112exit 0
5113EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005114chmod +x $CONFIG_STATUS
5115rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005116test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005117