blob: e1cff131a20868709627e79edb39ec1fbd50efad [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Greg Steinadf63d62000-07-05 10:38:09 +00003# From configure.in Revision: 1.132
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.
Barry Warsawc0d24d8b2000-06-29 16:12:00 +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
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000027 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000028ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000029 --with(out)-readline obsolete, edit Modules/Setup instead"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000030ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000031 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000032ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000035 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000036ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000037 --with(out)-cycle-gc disable/enable garbage collection"
38ac_help="$ac_help
39 --with-wctype-functions use wctype.h functions"
40ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000041 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000042ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000043 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000044ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000045 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000046ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000047 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000048ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000050
Guido van Rossum7f43da71994-08-01 12:15:30 +000051# Initialize some variables set by options.
52# The variables have the same names as the options, with
53# dashes changed to underlines.
54build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000055cache_file=./config.cache
56exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000057host=NONE
58no_create=
59nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000060no_recursion=
61prefix=NONE
62program_prefix=NONE
63program_suffix=NONE
64program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000065silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000067srcdir=
68target=NONE
69verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000070x_includes=NONE
71x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000072bindir='${exec_prefix}/bin'
73sbindir='${exec_prefix}/sbin'
74libexecdir='${exec_prefix}/libexec'
75datadir='${prefix}/share'
76sysconfdir='${prefix}/etc'
77sharedstatedir='${prefix}/com'
78localstatedir='${prefix}/var'
79libdir='${exec_prefix}/lib'
80includedir='${prefix}/include'
81oldincludedir='/usr/include'
82infodir='${prefix}/info'
83mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000084
85# Initialize some other variables.
86subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000087MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000088SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000089# Maximum number of lines to put in a shell here document.
90ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000091
92ac_prev=
93for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000094do
Guido van Rossum627b2d71993-12-24 10:39:16 +000095
Guido van Rossum7f43da71994-08-01 12:15:30 +000096 # If the previous option needs an argument, assign it.
97 if test -n "$ac_prev"; then
98 eval "$ac_prev=\$ac_option"
99 ac_prev=
100 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000101 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102
Guido van Rossum7f43da71994-08-01 12:15:30 +0000103 case "$ac_option" in
104 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
105 *) ac_optarg= ;;
106 esac
107
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000108 # Accept the important Cygnus configure options, so we can diagnose typos.
109
Guido van Rossum7f43da71994-08-01 12:15:30 +0000110 case "$ac_option" in
111
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000112 -bindir | --bindir | --bindi | --bind | --bin | --bi)
113 ac_prev=bindir ;;
114 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
115 bindir="$ac_optarg" ;;
116
117 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000118 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000119 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120 build="$ac_optarg" ;;
121
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000122 -cache-file | --cache-file | --cache-fil | --cache-fi \
123 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
124 ac_prev=cache_file ;;
125 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
126 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
127 cache_file="$ac_optarg" ;;
128
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000129 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
130 ac_prev=datadir ;;
131 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
132 | --da=*)
133 datadir="$ac_optarg" ;;
134
Guido van Rossum7f43da71994-08-01 12:15:30 +0000135 -disable-* | --disable-*)
136 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000137 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000138 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000139 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000140 fi
141 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142 eval "enable_${ac_feature}=no" ;;
143
144 -enable-* | --enable-*)
145 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000146 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000147 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 fi
150 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
151 case "$ac_option" in
152 *=*) ;;
153 *) ac_optarg=yes ;;
154 esac
155 eval "enable_${ac_feature}='$ac_optarg'" ;;
156
Guido van Rossum7f43da71994-08-01 12:15:30 +0000157 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
158 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
159 | --exec | --exe | --ex)
160 ac_prev=exec_prefix ;;
161 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
162 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
163 | --exec=* | --exe=* | --ex=*)
164 exec_prefix="$ac_optarg" ;;
165
166 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000167 # Obsolete; use --with-gas.
168 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000169
170 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000171 # Omit some internal or obsolete options to make the list less imposing.
172 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000173 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000174Usage: configure [options] [host]
175Options: [defaults in brackets after descriptions]
176Configuration:
177 --cache-file=FILE cache test results in FILE
178 --help print this message
179 --no-create do not create output files
180 --quiet, --silent do not print \`checking...' messages
181 --version print the version of autoconf that created configure
182Directory and file names:
183 --prefix=PREFIX install architecture-independent files in PREFIX
184 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000185 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000186 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000187 --bindir=DIR user executables in DIR [EPREFIX/bin]
188 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
189 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
190 --datadir=DIR read-only architecture-independent data in DIR
191 [PREFIX/share]
192 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
193 --sharedstatedir=DIR modifiable architecture-independent data in DIR
194 [PREFIX/com]
195 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
196 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
197 --includedir=DIR C header files in DIR [PREFIX/include]
198 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
199 --infodir=DIR info documentation in DIR [PREFIX/info]
200 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000201 --srcdir=DIR find the sources in DIR [configure dir or ..]
202 --program-prefix=PREFIX prepend PREFIX to installed program names
203 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000204 --program-transform-name=PROGRAM
205 run sed PROGRAM on installed program names
206EOF
207 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000208Host type:
209 --build=BUILD configure for building on BUILD [BUILD=HOST]
210 --host=HOST configure for HOST [guessed]
211 --target=TARGET configure for TARGET [TARGET=HOST]
212Features and packages:
213 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
214 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
215 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
216 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
217 --x-includes=DIR X include files are in DIR
218 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000219EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000220 if test -n "$ac_help"; then
221 echo "--enable and --with options recognized:$ac_help"
222 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000223 exit 0 ;;
224
225 -host | --host | --hos | --ho)
226 ac_prev=host ;;
227 -host=* | --host=* | --hos=* | --ho=*)
228 host="$ac_optarg" ;;
229
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000230 -includedir | --includedir | --includedi | --included | --include \
231 | --includ | --inclu | --incl | --inc)
232 ac_prev=includedir ;;
233 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
234 | --includ=* | --inclu=* | --incl=* | --inc=*)
235 includedir="$ac_optarg" ;;
236
237 -infodir | --infodir | --infodi | --infod | --info | --inf)
238 ac_prev=infodir ;;
239 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
240 infodir="$ac_optarg" ;;
241
242 -libdir | --libdir | --libdi | --libd)
243 ac_prev=libdir ;;
244 -libdir=* | --libdir=* | --libdi=* | --libd=*)
245 libdir="$ac_optarg" ;;
246
247 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
248 | --libexe | --libex | --libe)
249 ac_prev=libexecdir ;;
250 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
251 | --libexe=* | --libex=* | --libe=*)
252 libexecdir="$ac_optarg" ;;
253
254 -localstatedir | --localstatedir | --localstatedi | --localstated \
255 | --localstate | --localstat | --localsta | --localst \
256 | --locals | --local | --loca | --loc | --lo)
257 ac_prev=localstatedir ;;
258 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
259 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
260 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
261 localstatedir="$ac_optarg" ;;
262
263 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
264 ac_prev=mandir ;;
265 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
266 mandir="$ac_optarg" ;;
267
Guido van Rossum7f43da71994-08-01 12:15:30 +0000268 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000269 # Obsolete; use --without-fp.
270 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000271
272 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
273 | --no-cr | --no-c)
274 no_create=yes ;;
275
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000276 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
278 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000280 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
281 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
282 | --oldin | --oldi | --old | --ol | --o)
283 ac_prev=oldincludedir ;;
284 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
285 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
286 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
287 oldincludedir="$ac_optarg" ;;
288
Guido van Rossum7f43da71994-08-01 12:15:30 +0000289 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
290 ac_prev=prefix ;;
291 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
292 prefix="$ac_optarg" ;;
293
294 -program-prefix | --program-prefix | --program-prefi | --program-pref \
295 | --program-pre | --program-pr | --program-p)
296 ac_prev=program_prefix ;;
297 -program-prefix=* | --program-prefix=* | --program-prefi=* \
298 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
299 program_prefix="$ac_optarg" ;;
300
301 -program-suffix | --program-suffix | --program-suffi | --program-suff \
302 | --program-suf | --program-su | --program-s)
303 ac_prev=program_suffix ;;
304 -program-suffix=* | --program-suffix=* | --program-suffi=* \
305 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
306 program_suffix="$ac_optarg" ;;
307
308 -program-transform-name | --program-transform-name \
309 | --program-transform-nam | --program-transform-na \
310 | --program-transform-n | --program-transform- \
311 | --program-transform | --program-transfor \
312 | --program-transfo | --program-transf \
313 | --program-trans | --program-tran \
314 | --progr-tra | --program-tr | --program-t)
315 ac_prev=program_transform_name ;;
316 -program-transform-name=* | --program-transform-name=* \
317 | --program-transform-nam=* | --program-transform-na=* \
318 | --program-transform-n=* | --program-transform-=* \
319 | --program-transform=* | --program-transfor=* \
320 | --program-transfo=* | --program-transf=* \
321 | --program-trans=* | --program-tran=* \
322 | --progr-tra=* | --program-tr=* | --program-t=*)
323 program_transform_name="$ac_optarg" ;;
324
325 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
326 | -silent | --silent | --silen | --sile | --sil)
327 silent=yes ;;
328
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000329 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
330 ac_prev=sbindir ;;
331 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
332 | --sbi=* | --sb=*)
333 sbindir="$ac_optarg" ;;
334
335 -sharedstatedir | --sharedstatedir | --sharedstatedi \
336 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
337 | --sharedst | --shareds | --shared | --share | --shar \
338 | --sha | --sh)
339 ac_prev=sharedstatedir ;;
340 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
341 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
342 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
343 | --sha=* | --sh=*)
344 sharedstatedir="$ac_optarg" ;;
345
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000346 -site | --site | --sit)
347 ac_prev=site ;;
348 -site=* | --site=* | --sit=*)
349 site="$ac_optarg" ;;
350
Guido van Rossum7f43da71994-08-01 12:15:30 +0000351 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
352 ac_prev=srcdir ;;
353 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
354 srcdir="$ac_optarg" ;;
355
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000356 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
357 | --syscon | --sysco | --sysc | --sys | --sy)
358 ac_prev=sysconfdir ;;
359 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
360 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
361 sysconfdir="$ac_optarg" ;;
362
Guido van Rossum7f43da71994-08-01 12:15:30 +0000363 -target | --target | --targe | --targ | --tar | --ta | --t)
364 ac_prev=target ;;
365 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
366 target="$ac_optarg" ;;
367
368 -v | -verbose | --verbose | --verbos | --verbo | --verb)
369 verbose=yes ;;
370
371 -version | --version | --versio | --versi | --vers)
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000372 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000373 exit 0 ;;
374
375 -with-* | --with-*)
376 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000377 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000380 fi
381 ac_package=`echo $ac_package| sed 's/-/_/g'`
382 case "$ac_option" in
383 *=*) ;;
384 *) ac_optarg=yes ;;
385 esac
386 eval "with_${ac_package}='$ac_optarg'" ;;
387
388 -without-* | --without-*)
389 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000393 fi
394 ac_package=`echo $ac_package| sed 's/-/_/g'`
395 eval "with_${ac_package}=no" ;;
396
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 --x)
398 # Obsolete; use --with-x.
399 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000400
401 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
402 | --x-incl | --x-inc | --x-in | --x-i)
403 ac_prev=x_includes ;;
404 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
405 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
406 x_includes="$ac_optarg" ;;
407
408 -x-libraries | --x-libraries | --x-librarie | --x-librari \
409 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
410 ac_prev=x_libraries ;;
411 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
412 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
413 x_libraries="$ac_optarg" ;;
414
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000415 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416 ;;
417
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000418 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000419 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000420 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000421 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000422 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000423 { 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 +0000424 fi
425 nonopt="$ac_option"
426 ;;
427
428 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000429done
430
Guido van Rossum7f43da71994-08-01 12:15:30 +0000431if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000432 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000433fi
434
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000435trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000436
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000437# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000438# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000439# 1 file creation
440# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000441# 3 some systems may open it to /dev/tty
442# 4 used on the Kubota Titan
443# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000444# 5 compiler messages saved in config.log
445if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000447else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000449fi
450exec 5>./config.log
451
452echo "\
453This file contains any messages produced by compilers while
454running configure, to aid debugging if configure makes a mistake.
455" 1>&5
456
457# Strip out --no-create and --no-recursion so they do not pile up.
458# Also quote any args containing shell metacharacters.
459ac_configure_args=
460for ac_arg
461do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000462 case "$ac_arg" in
463 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
464 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000465 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
466 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
467 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
468 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
469 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000470 esac
471done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000472
473# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000474# Only set these to C if already set. These must not be set unconditionally
475# because not all systems understand e.g. LANG=C (notably SCO).
476# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
477# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000478if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000479if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
480if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
481if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000482
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483# confdefs.h avoids OS command line length limits that DEFS can exceed.
484rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485# AIX cpp loses on an empty file, so make sure it contains at least a newline.
486echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487
488# A filename unique to this package, relative to the directory that
489# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000490ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000491
492# Find the source files, if location was not specified.
493if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000495 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496 ac_prog=$0
497 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
498 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
499 srcdir=$ac_confdir
500 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501 srcdir=..
502 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000503else
504 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000505fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000506if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000507 if test "$ac_srcdir_defaulted" = yes; then
508 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000509 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000510 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000512fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000513srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
514
515# Prefer explicitly selected file to automatically selected ones.
516if test -z "$CONFIG_SITE"; then
517 if test "x$prefix" != xNONE; then
518 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
519 else
520 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
521 fi
522fi
523for ac_site_file in $CONFIG_SITE; do
524 if test -r "$ac_site_file"; then
525 echo "loading site script $ac_site_file"
526 . "$ac_site_file"
527 fi
528done
529
530if test -r "$cache_file"; then
531 echo "loading cache $cache_file"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000532 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000533else
534 echo "creating cache $cache_file"
535 > $cache_file
536fi
537
Guido van Rossum7f43da71994-08-01 12:15:30 +0000538ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000539# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000540ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000541ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000542ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000543cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000545ac_exeext=
546ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000547if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
548 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
549 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
550 ac_n= ac_c='
551' ac_t=' '
552 else
553 ac_n=-n ac_c= ac_t=
554 fi
555else
556 ac_n= ac_c='\c' ac_t=
557fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000558
Guido van Rossum0a516c91994-09-12 10:58:40 +0000559
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000560
Guido van Rossum627b2d71993-12-24 10:39:16 +0000561
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000562# Set VERSION so we only need to edit in one place (i.e., here)
563
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000564VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000565
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000566# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000567if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000568
569 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000570echo "configure:571: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000571 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000572if test "${with_next_archs+set}" = set; then
573 withval="$with_next_archs"
574
Guido van Rossum563e7081996-09-10 18:20:48 +0000575 if test -n "$withval"; then
576 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
577 # GCC does not currently support multi archs on the NeXT
578 with_gcc=no
579 fi
580 echo "$ac_t""$with_next_archs" 1>&6
581
582else
583 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000584fi
585
Guido van Rossum563e7081996-09-10 18:20:48 +0000586
587 if test -z "$MACHDEP"
588 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000589 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000590 sed -e 's/://' -e 's/\./_/'` && \
591 ac_sys_system=next && ac_sys_release=$4
592
Guido van Rossumb97ef171997-09-28 05:44:03 +0000593 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000594 fi
595fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000596
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000597# Check whether --with-next-framework or --without-next-framework was given.
598if test "${with_next_framework+set}" = set; then
599 withval="$with_next_framework"
600 :
601fi
602
603# Check whether --with-dyld or --without-dyld was given.
604if test "${with_dyld+set}" = set; then
605 withval="$with_dyld"
606 :
607fi
608
Guido van Rossum91922671997-10-09 20:24:13 +0000609
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000610# Set name for machine-dependent library files
611
612echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000613echo "configure:614: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000614if test -z "$MACHDEP"
615then
Guido van Rossum563e7081996-09-10 18:20:48 +0000616 ac_sys_system=`uname -s`
617 if test "$ac_sys_system" = "AIX" ; then
618 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000619 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000620 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000622 ac_md_system=`echo $ac_sys_system |
623 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
624 ac_md_release=`echo $ac_sys_release |
625 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000626 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000627
Guido van Rossum07397971997-04-29 21:49:50 +0000628 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000629 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000630 esac
631fi
Guido van Rossum91922671997-10-09 20:24:13 +0000632
633#
634# SGI compilers allow the specification of the both the ABI and the
635# ISA on the command line. Depending on the values of these switches,
636# different and often incompatable code will be generated.
637#
638# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
639# thus supply support for various ABI/ISA combinations. The MACHDEP
640# variable is also adjusted.
641#
642
643if test ! -z "$SGI_ABI"
644then
645 CC="cc $SGI_ABI"
646 LDFLAGS="$SGI_ABI $LDFLAGS"
647 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
648fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000649echo "$ac_t""$MACHDEP" 1>&6
650
Guido van Rossum91922671997-10-09 20:24:13 +0000651#
652# CCC is the command that compiles C++ programs
653#
654# Not all make programs have this predefined.
655#
Guido van Rossum95012191999-12-16 17:50:52 +0000656#AC_SUBST(SET_CCC)
657#AC_MSG_CHECKING(CCC)
658#if test -z "$CCC"
659#then
660# case $ac_sys_system in
661# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
662# Linux*) SET_CCC="CCC= g++";;
663# *) SET_CCC=""
664# esac
665#else
666# SET_CCC="CCC= ${CCC}"
667#fi
668#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000669
670
Guido van Rossum627b2d71993-12-24 10:39:16 +0000671# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000672echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000673echo "configure:674: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000674# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000675if test "${with_gcc+set}" = set; then
676 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000677
678 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000679 no) CC=cc
680 without_gcc=yes;;
681 yes) CC=gcc
682 without_gcc=no;;
683 *) CC=$withval
684 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000685 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000686else
Guido van Rossume77438c1995-09-13 18:59:59 +0000687
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000688 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000689 OSF1) CC=cc
690 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000691 BeOS*)
692 # Dunno if it's a good idea to get this over with all at once, or
693 # to handle it in with the other goodies.
694 MACHDEP=beos
695
696 case $BE_HOST_CPU in
697 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000698 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000700 case `uname -r` in
701 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
702 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
703 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000704 CCSHARED=-UUSE_DL_EXPORT
705 LDFLAGS="$LDFLAGS -nodup"
706
707 AR="$PWD/BeOS/ar-fake"
708 RANLIB=:
709
710 cat >> confdefs.h <<\EOF
711#define DL_EXPORT_HEADER "dl_export.h"
712EOF
713
714 ;;
715 x86)
716 CC="gcc -I$PWD/BeOS"
717 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000718 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000719 CCSHARED=-UUSE_DL_EXPORT
720
721 AR="$PWD/BeOS/ar-fake"
722 RANLIB=:
723
724 cat >> confdefs.h <<\EOF
725#define DL_EXPORT_HEADER "dl_export.h"
726EOF
727
728 ;;
729 *)
730 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
731 ;;
732 esac
733 ;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000734 *) without_gcc=no;;
735 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000736fi
737
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000738echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000739
Guido van Rossum95012191999-12-16 17:50:52 +0000740
741
742MAINOBJ=python.o
743echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000744echo "configure:745: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000745# Check whether --with-cxx or --without-cxx was given.
746if test "${with_cxx+set}" = set; then
747 withval="$with_cxx"
748
749 case $withval in
750 no) CXX=
751 with_cxx=no;;
752 *) CXX=$withval
753 MAINOBJ=ccpython.o
754 with_cxx=$withval;;
755 esac
756else
757
758 with_cxx=no
759
760fi
761
762echo "$ac_t""$with_cxx" 1>&6
763SET_CXX="CXX = $CXX"
764
765#AC_MSG_CHECKING(CCC)
766#if test -z "$CCC"
767#then
768# case $ac_sys_system in
769# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
770# Linux*) SET_CCC="CCC= g++";;
771# *) SET_CCC=""
772# esac
773#else
774# SET_CCC="CCC= ${CCC}"
775#fi
776#AC_MSG_RESULT($SET_CCC)
777
Guido van Rossum8b131c51995-03-09 14:10:13 +0000778# If the user switches compilers, we can't believe the cache
779if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
780then
781 { echo "configure: error: cached CC is different -- throw away $cache_file
782(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
783fi
784
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785# Extract the first word of "gcc", so it can be a program name with args.
786set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000787echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000788echo "configure:789: checking for $ac_word" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000789if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000790 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791else
792 if test -n "$CC"; then
793 ac_cv_prog_CC="$CC" # Let the user override the test.
794else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000795 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
796 ac_dummy="$PATH"
797 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798 test -z "$ac_dir" && ac_dir=.
799 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801 break
802 fi
803 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806fi
807CC="$ac_cv_prog_CC"
808if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000809 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000811 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000813
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000814if test -z "$CC"; then
815 # Extract the first word of "cc", so it can be a program name with args.
816set dummy cc; ac_word=$2
817echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000818echo "configure:819: checking for $ac_word" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000819if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 echo $ac_n "(cached) $ac_c" 1>&6
821else
822 if test -n "$CC"; then
823 ac_cv_prog_CC="$CC" # Let the user override the test.
824else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000826 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000827 ac_dummy="$PATH"
828 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000829 test -z "$ac_dir" && ac_dir=.
830 if test -f $ac_dir/$ac_word; then
831 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
832 ac_prog_rejected=yes
833 continue
834 fi
835 ac_cv_prog_CC="cc"
836 break
837 fi
838 done
839 IFS="$ac_save_ifs"
840if test $ac_prog_rejected = yes; then
841 # We found a bogon in the path, so make sure we never use it.
842 set dummy $ac_cv_prog_CC
843 shift
844 if test $# -gt 0; then
845 # We chose a different compiler from the bogus one.
846 # However, it has the same basename, so the bogon will be chosen
847 # first if we set CC to just the basename; use the full file name.
848 shift
849 set dummy "$ac_dir/$ac_word" "$@"
850 shift
851 ac_cv_prog_CC="$@"
852 fi
853fi
854fi
855fi
856CC="$ac_cv_prog_CC"
857if test -n "$CC"; then
858 echo "$ac_t""$CC" 1>&6
859else
860 echo "$ac_t""no" 1>&6
861fi
862
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000863 if test -z "$CC"; then
864 case "`uname -s`" in
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000865 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000866 # Extract the first word of "cl", so it can be a program name with args.
867set dummy cl; ac_word=$2
868echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000869echo "configure:870: checking for $ac_word" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000870if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000871 echo $ac_n "(cached) $ac_c" 1>&6
872else
873 if test -n "$CC"; then
874 ac_cv_prog_CC="$CC" # Let the user override the test.
875else
876 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
877 ac_dummy="$PATH"
878 for ac_dir in $ac_dummy; do
879 test -z "$ac_dir" && ac_dir=.
880 if test -f $ac_dir/$ac_word; then
881 ac_cv_prog_CC="cl"
882 break
883 fi
884 done
885 IFS="$ac_save_ifs"
886fi
887fi
888CC="$ac_cv_prog_CC"
889if test -n "$CC"; then
890 echo "$ac_t""$CC" 1>&6
891else
892 echo "$ac_t""no" 1>&6
893fi
894 ;;
895 esac
896 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
898fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000900echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000901echo "configure:902: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000902
903ac_ext=c
904# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
905ac_cpp='$CPP $CPPFLAGS'
906ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000907ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000908cross_compiling=$ac_cv_prog_cc_cross
909
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000910cat > conftest.$ac_ext << EOF
911
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000912#line 913 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000913#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000914
Guido van Rossumf78abae1997-01-21 22:02:36 +0000915main(){return(0);}
916EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000917if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000918 ac_cv_prog_cc_works=yes
919 # If we can't run a trivial program, we are probably using a cross compiler.
920 if (./conftest; exit) 2>/dev/null; then
921 ac_cv_prog_cc_cross=no
922 else
923 ac_cv_prog_cc_cross=yes
924 fi
925else
926 echo "configure: failed program was:" >&5
927 cat conftest.$ac_ext >&5
928 ac_cv_prog_cc_works=no
929fi
930rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000931ac_ext=c
932# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
933ac_cpp='$CPP $CPPFLAGS'
934ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
935ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
936cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000937
938echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
939if test $ac_cv_prog_cc_works = no; then
940 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
941fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000942echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000943echo "configure:944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000944echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
945cross_compiling=$ac_cv_prog_cc_cross
946
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000947echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000948echo "configure:949: checking whether we are using GNU C" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000949if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000950 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951else
952 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000953#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000955#endif
956EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000957if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 ac_cv_prog_gcc=yes
959else
960 ac_cv_prog_gcc=no
961fi
962fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000964echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000965
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966if test $ac_cv_prog_gcc = yes; then
967 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000968else
969 GCC=
970fi
971
972ac_test_CFLAGS="${CFLAGS+set}"
973ac_save_CFLAGS="$CFLAGS"
974CFLAGS=
975echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000976echo "configure:977: checking whether ${CC-cc} accepts -g" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +0000977if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000978 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000979else
980 echo 'void f(){}' > conftest.c
981if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000982 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000984 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000985fi
986rm -f conftest*
987
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989
Guido van Rossumf78abae1997-01-21 22:02:36 +0000990echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000991if test "$ac_test_CFLAGS" = set; then
992 CFLAGS="$ac_save_CFLAGS"
993elif test $ac_cv_prog_cc_g = yes; then
994 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000995 CFLAGS="-g -O2"
996 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000997 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 fi
999else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001000 if test "$GCC" = yes; then
1001 CFLAGS="-O2"
1002 else
1003 CFLAGS=
1004 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005fi
1006
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001007
Guido van Rossumdd997f71998-10-07 19:58:26 +00001008case $MACHDEP in
1009bsdos*)
1010 case $CC in
1011 gcc) CC="$CC -D_HAVE_BSDI";;
1012 esac;;
1013esac
1014
Guido van Rossum24b1e751997-08-21 02:29:16 +00001015case $ac_sys_system in
1016hp*|HP*)
1017 case $CC in
1018 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1019 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001020BeOS*)
1021 case $CC in
1022 cc) CC=cc;;
1023 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001024esac
1025
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001026# LDLIBRARY is the name of the library to link against (as opposed to the
1027# name of the library into which to insert object files). On systems
1028# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1029# the Makefiles).
1030
1031
1032LDLIBRARY=''
1033
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001034# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001035# This is altered for AIX and BeOS in order to build the export list before
1036# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001037
1038echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001039echo "configure:1040: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001040if test -z "$LINKCC" -a ! -z "$CXX"
1041then
1042 LINKCC="$CXX"
1043fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001044if test -z "$LINKCC"
1045then
1046 case $ac_sys_system in
1047 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001048 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001049 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001050 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001051 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001052 dgux*)
1053 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001054 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001055 esac
1056fi
1057echo "$ac_t""$LINKCC" 1>&6
1058
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001059echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001060echo "configure:1061: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001061
1062# NeXT framework builds require that the 'ar' library be converted into
1063# a bundle using libtool.
1064if test "$with_next_framework"
1065then
1066 LDLIBRARY='libpython$(VERSION).dylib'
1067fi
1068
1069# DG/UX requires some fancy ld contortions to produce a .so from an .a
1070if test "$MACHDEP" = "dguxR4"
1071then
1072 LDLIBRARY='libpython$(VERSION).so'
1073 OPT="$OPT -pic"
1074fi
1075echo "$ac_t""$LDLIBRARY" 1>&6
1076
1077# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1078if test -z "$LDLIBRARY"
1079then
1080 LDLIBRARY='libpython$(VERSION).a'
1081 MAKE_LDLIBRARY="true"
1082else
1083 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1084fi
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086# Extract the first word of "ranlib", so it can be a program name with args.
1087set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001088echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001089echo "configure:1090: checking for $ac_word" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001090if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001091 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092else
1093 if test -n "$RANLIB"; then
1094 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1095else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001096 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1097 ac_dummy="$PATH"
1098 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 test -z "$ac_dir" && ac_dir=.
1100 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001102 break
1103 fi
1104 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001107fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108fi
1109RANLIB="$ac_cv_prog_RANLIB"
1110if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001111 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001112else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001113 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001115
1116
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117for ac_prog in ar aal
1118do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119# Extract the first word of "$ac_prog", so it can be a program name with args.
1120set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001121echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001122echo "configure:1123: checking for $ac_word" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001123if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001124 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125else
1126 if test -n "$AR"; then
1127 ac_cv_prog_AR="$AR" # Let the user override the test.
1128else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001129 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1130 ac_dummy="$PATH"
1131 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 test -z "$ac_dir" && ac_dir=.
1133 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 break
1136 fi
1137 done
1138 IFS="$ac_save_ifs"
1139fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140fi
1141AR="$ac_cv_prog_AR"
1142if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001145 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148test -n "$AR" && break
1149done
1150test -n "$AR" || AR="ar"
1151
1152
Guido van Rossumda88dad1995-01-26 00:46:29 +00001153
1154
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001155# Install just never works :-(
1156if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001157then
1158 INSTALL=cp
1159 INSTALL_PROGRAM=cp
1160 INSTALL_DATA=cp
1161else
1162 INSTALL_PROGRAM="$INSTALL"
1163 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001164fi
1165
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001166# Not every filesystem supports hard links
1167
1168if test -z "$LN" ; then
1169 case $ac_sys_system in
1170 BeOS*) LN="ln -s";;
1171 *) LN=ln;;
1172 esac
1173fi
1174
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001175# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001176
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001177if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001178then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001179 case $GCC in
1180 yes)
1181 case $ac_cv_prog_cc_g in
1182 yes) OPT="-g -O2";;
1183 *) OPT="-O2";;
1184 esac
1185 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001186 *) OPT="-O";;
1187 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001188fi
1189
Guido van Rossum563e7081996-09-10 18:20:48 +00001190if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001191then
1192 OPT="$OPT $ac_arch_flags"
1193fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001194# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001195echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001196echo "configure:1197: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197# On Suns, sometimes $CPP names a directory.
1198if test -n "$CPP" && test -d "$CPP"; then
1199 CPP=
1200fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001201if test -z "$CPP"; then
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001202if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001203 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204else
1205 # This must be in double quotes, not single quotes, because CPP may get
1206 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001207 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # On the NeXT, cc -E runs the code through the compiler's parser,
1209 # not just through cpp.
1210 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001211#line 1212 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214Syntax Error
1215EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001216ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001217{ (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001218ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219if test -z "$ac_err"; then
1220 :
1221else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001223 echo "configure: failed program was:" >&5
1224 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 rm -rf conftest*
1226 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001228#line 1229 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231Syntax Error
1232EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001233ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001234{ (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001235ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1236if test -z "$ac_err"; then
1237 :
1238else
1239 echo "$ac_err" >&5
1240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
1242 rm -rf conftest*
1243 CPP="${CC-cc} -nologo -E"
1244 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001245#line 1246 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001246#include "confdefs.h"
1247#include <assert.h>
1248Syntax Error
1249EOF
1250ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001251{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001252ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254 :
1255else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001257 echo "configure: failed program was:" >&5
1258 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259 rm -rf conftest*
1260 CPP=/lib/cpp
1261fi
1262rm -f conftest*
1263fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001265fi
1266rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001269 CPP="$ac_cv_prog_CPP"
1270else
1271 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001273echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001275echo $ac_n "checking for AIX""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001276echo "configure:1277: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001277cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001278#line 1279 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279#include "confdefs.h"
1280#ifdef _AIX
1281 yes
1282#endif
1283
1284EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1286 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001288 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289#define _ALL_SOURCE 1
1290EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292else
1293 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001294 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295fi
1296rm -f conftest*
1297
1298
Guido van Rossumf78abae1997-01-21 22:02:36 +00001299ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001300echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001301echo "configure:1302: checking for minix/config.h" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001302if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001303 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001304else
1305 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001306#line 1307 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307#include "confdefs.h"
1308#include <minix/config.h>
1309EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001310ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001311{ (eval echo configure:1312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001312ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001318 echo "configure: failed program was:" >&5
1319 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320 rm -rf conftest*
1321 eval "ac_cv_header_$ac_safe=no"
1322fi
1323rm -f conftest*
1324fi
1325if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001326 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327 MINIX=yes
1328else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001329 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331fi
1332
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333if test "$MINIX" = yes; then
1334 cat >> confdefs.h <<\EOF
1335#define _POSIX_SOURCE 1
1336EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338 cat >> confdefs.h <<\EOF
1339#define _POSIX_1_SOURCE 2
1340EOF
1341
1342 cat >> confdefs.h <<\EOF
1343#define _MINIX 1
1344EOF
1345
1346fi
1347
Guido van Rossumda88dad1995-01-26 00:46:29 +00001348
Guido van Rossum91922671997-10-09 20:24:13 +00001349echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001350echo "configure:1351: checking whether $CC accepts -OPT:Olimit=0" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001351if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001352 echo $ac_n "(cached) $ac_c" 1>&6
1353else
1354 ac_save_cc="$CC"
1355CC="$CC -OPT:Olimit=0"
1356if test "$cross_compiling" = yes; then
1357 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1358else
1359 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001360#line 1361 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001361#include "confdefs.h"
1362int main() { return 0; }
1363EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001364if { (eval echo configure:1365: \"$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 +00001365then
1366 ac_cv_opt_olimit_ok=yes
1367else
1368 echo "configure: failed program was:" >&5
1369 cat conftest.$ac_ext >&5
1370 rm -fr conftest*
1371 ac_cv_opt_olimit_ok=no
1372fi
1373rm -fr conftest*
1374fi
1375
1376CC="$ac_save_cc"
1377fi
1378
1379echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001380if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001381 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001382else
1383 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001384echo "configure:1385: checking whether $CC accepts -Olimit 1500" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001385 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001386 echo $ac_n "(cached) $ac_c" 1>&6
1387else
1388 ac_save_cc="$CC"
1389 CC="$CC -Olimit 1500"
1390 if test "$cross_compiling" = yes; then
1391 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1392else
1393 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001394#line 1395 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001395#include "confdefs.h"
1396int main() { return 0; }
1397EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001398if { (eval echo configure:1399: \"$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 +00001399then
1400 ac_cv_olimit_ok=yes
1401else
1402 echo "configure: failed program was:" >&5
1403 cat conftest.$ac_ext >&5
1404 rm -fr conftest*
1405 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001406fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001407rm -fr conftest*
1408fi
1409
1410 CC="$ac_save_cc"
1411fi
1412
1413 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1414 if test $ac_cv_olimit_ok = yes; then
1415 OPT="$OPT -Olimit 1500"
1416 fi
1417fi
1418
Guido van Rossum84e7b241996-08-19 21:59:00 +00001419# check for ANSI or K&R ("traditional") preprocessor
1420echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001421echo "configure:1422: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001422cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001423#line 1424 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001424#include "confdefs.h"
1425
1426#define spam(name, doc) {#name, &name, #name "() -- " doc}
1427int foo;
1428struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1429
Guido van Rossumf78abae1997-01-21 22:02:36 +00001430int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001431;
1432; return 0; }
1433EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001434if { (eval echo configure:1435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001435 rm -rf conftest*
1436 cpp_type=ansi
1437else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001438 echo "configure: failed program was:" >&5
1439 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001440 rm -rf conftest*
1441 cat >> confdefs.h <<\EOF
1442#define HAVE_OLD_CPP 1
1443EOF
1444 cpp_type=traditional
1445fi
1446rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001447echo "$ac_t""$cpp_type" 1>&6
1448
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001449# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001450echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001451echo "configure:1452: checking for ANSI C header files" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001452if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001453 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001454else
1455 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001456#line 1457 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001457#include "confdefs.h"
1458#include <stdlib.h>
1459#include <stdarg.h>
1460#include <string.h>
1461#include <float.h>
1462EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001463ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001464{ (eval echo configure:1465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001465ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001466if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001467 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001468 ac_cv_header_stdc=yes
1469else
1470 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001471 echo "configure: failed program was:" >&5
1472 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001473 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001474 ac_cv_header_stdc=no
1475fi
1476rm -f conftest*
1477
1478if test $ac_cv_header_stdc = yes; then
1479 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1480cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001481#line 1482 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001482#include "confdefs.h"
1483#include <string.h>
1484EOF
1485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1486 egrep "memchr" >/dev/null 2>&1; then
1487 :
1488else
1489 rm -rf conftest*
1490 ac_cv_header_stdc=no
1491fi
1492rm -f conftest*
1493
1494fi
1495
1496if test $ac_cv_header_stdc = yes; then
1497 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1498cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001499#line 1500 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001500#include "confdefs.h"
1501#include <stdlib.h>
1502EOF
1503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1504 egrep "free" >/dev/null 2>&1; then
1505 :
1506else
1507 rm -rf conftest*
1508 ac_cv_header_stdc=no
1509fi
1510rm -f conftest*
1511
1512fi
1513
1514if test $ac_cv_header_stdc = yes; then
1515 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1516if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001517 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001518else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001519 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001520#line 1521 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001521#include "confdefs.h"
1522#include <ctype.h>
1523#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1524#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001525#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001526int main () { int i; for (i = 0; i < 256; i++)
1527if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1528exit (0); }
1529
1530EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001531if { (eval echo configure:1532: \"$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 +00001532then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001533 :
1534else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001535 echo "configure: failed program was:" >&5
1536 cat conftest.$ac_ext >&5
1537 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001538 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001539fi
1540rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001541fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001542
1543fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001544fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001545
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001546echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547if test $ac_cv_header_stdc = yes; then
1548 cat >> confdefs.h <<\EOF
1549#define STDC_HEADERS 1
1550EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001551
1552fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001553
Guido van Rossum96013151997-10-08 22:47:52 +00001554for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001555signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001556sys/audioio.h sys/file.h sys/lock.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001557sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drake8cef4cf2000-06-28 16:40:38 +00001558sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001560ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001561echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001562echo "configure:1563: checking for $ac_hdr" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001563if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001564 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001565else
1566 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001567#line 1568 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001568#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001570EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001571ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001572{ (eval echo configure:1573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001573ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001574if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001575 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576 eval "ac_cv_header_$ac_safe=yes"
1577else
1578 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001579 echo "configure: failed program was:" >&5
1580 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581 rm -rf conftest*
1582 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001583fi
1584rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001585fi
1586if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001587 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001588 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589 cat >> confdefs.h <<EOF
1590#define $ac_tr_hdr 1
1591EOF
1592
1593else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001594 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001595fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001596done
1597
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001598ac_header_dirent=no
1599for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1600do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001601ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001602echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001603echo "configure:1604: checking for $ac_hdr that defines DIR" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001604if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001605 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001606else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001608#line 1609 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609#include "confdefs.h"
1610#include <sys/types.h>
1611#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001612int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001613DIR *dirp = 0;
1614; return 0; }
1615EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001616if { (eval echo configure:1617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001617 rm -rf conftest*
1618 eval "ac_cv_header_dirent_$ac_safe=yes"
1619else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001620 echo "configure: failed program was:" >&5
1621 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001622 rm -rf conftest*
1623 eval "ac_cv_header_dirent_$ac_safe=no"
1624fi
1625rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001626fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001627if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001628 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001629 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630 cat >> confdefs.h <<EOF
1631#define $ac_tr_hdr 1
1632EOF
1633 ac_header_dirent=$ac_hdr; break
1634else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001635 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001636fi
1637done
1638# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1639if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001640echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001641echo "configure:1642: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001642ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001643if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001644 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001645else
1646 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001647LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001649#line 1650 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001651/* Override any gcc2 internal prototype to avoid an error. */
1652/* We use char because int might match the return type of a gcc2
1653 builtin and then its argument prototype would still apply. */
1654char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655
Guido van Rossumf78abae1997-01-21 22:02:36 +00001656int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657opendir()
1658; return 0; }
1659EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001660if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001661 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001662 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001663else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001664 echo "configure: failed program was:" >&5
1665 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001666 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001667 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668fi
1669rm -f conftest*
1670LIBS="$ac_save_LIBS"
1671
1672fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001673if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001674 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001675 LIBS="$LIBS -ldir"
1676else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001677 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678fi
1679
1680else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001681echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001682echo "configure:1683: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001683ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001684if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001685 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686else
1687 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001688LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001690#line 1691 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001692/* Override any gcc2 internal prototype to avoid an error. */
1693/* We use char because int might match the return type of a gcc2
1694 builtin and then its argument prototype would still apply. */
1695char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696
Guido van Rossumf78abae1997-01-21 22:02:36 +00001697int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698opendir()
1699; return 0; }
1700EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001701if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001703 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001705 echo "configure: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001708 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709fi
1710rm -f conftest*
1711LIBS="$ac_save_LIBS"
1712
1713fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001714if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001715 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716 LIBS="$LIBS -lx"
1717else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001718 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001719fi
1720
1721fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001722
1723
1724# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001725was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001726echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001727echo "configure:1728: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001729#line 1730 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001730#include "confdefs.h"
1731#include <time.h>
1732EOF
1733if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1734 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001735 rm -rf conftest*
1736 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001737else
1738 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001739 cat >> confdefs.h <<\EOF
1740#define clock_t long
1741EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001742
1743fi
1744rm -f conftest*
1745
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001746echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001747
Guido van Rossum84e7b241996-08-19 21:59:00 +00001748# Add some code to confdefs.h so that the test for off_t works on SCO
1749cat >> confdefs.h <<\EOF
1750#if defined(SCO_DS)
1751#undef _OFF_T
1752#endif
1753EOF
1754
Guido van Rossumef2255b2000-03-10 22:30:29 +00001755# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001756echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001757echo "configure:1758: checking for mode_t" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001758if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001759 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001760else
1761 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001762#line 1763 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001763#include "confdefs.h"
1764#include <sys/types.h>
1765#if STDC_HEADERS
1766#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001767#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001768#endif
1769EOF
1770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001771 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 +00001772 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001773 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001774else
1775 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001776 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001777fi
1778rm -f conftest*
1779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001781echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1782if test $ac_cv_type_mode_t = no; then
1783 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001784#define mode_t int
1785EOF
1786
1787fi
1788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001789echo $ac_n "checking for off_t""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001790echo "configure:1791: checking for off_t" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001791if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001792 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001793else
1794 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001795#line 1796 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796#include "confdefs.h"
1797#include <sys/types.h>
1798#if STDC_HEADERS
1799#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001800#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801#endif
1802EOF
1803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001804 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001806 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807else
1808 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001809 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810fi
1811rm -f conftest*
1812
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001814echo "$ac_t""$ac_cv_type_off_t" 1>&6
1815if test $ac_cv_type_off_t = no; then
1816 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817#define off_t long
1818EOF
1819
1820fi
1821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001822echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001823echo "configure:1824: checking for pid_t" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001824if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001825 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001826else
1827 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001828#line 1829 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001829#include "confdefs.h"
1830#include <sys/types.h>
1831#if STDC_HEADERS
1832#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001833#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001834#endif
1835EOF
1836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001837 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 +00001838 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001839 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001840else
1841 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001842 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001843fi
1844rm -f conftest*
1845
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001846fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001847echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1848if test $ac_cv_type_pid_t = no; then
1849 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001850#define pid_t int
1851EOF
1852
1853fi
1854
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001855echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001856echo "configure:1857: checking return type of signal handlers" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001857if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001858 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001859else
1860 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001861#line 1862 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001862#include "confdefs.h"
1863#include <sys/types.h>
1864#include <signal.h>
1865#ifdef signal
1866#undef signal
1867#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001868#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001869extern "C" void (*signal (int, void (*)(int)))(int);
1870#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001871void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001872#endif
1873
Guido van Rossumf78abae1997-01-21 22:02:36 +00001874int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875int i;
1876; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001877EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001878if { (eval echo configure:1879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
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=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001881else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001884 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001886fi
1887rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001889
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001890echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891cat >> confdefs.h <<EOF
1892#define RETSIGTYPE $ac_cv_type_signal
1893EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001895
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001896echo $ac_n "checking for size_t""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001897echo "configure:1898: checking for size_t" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001898if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001899 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001900else
1901 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001902#line 1903 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001903#include "confdefs.h"
1904#include <sys/types.h>
1905#if STDC_HEADERS
1906#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001907#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001908#endif
1909EOF
1910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001911 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 +00001912 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001913 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001914else
1915 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001916 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001917fi
1918rm -f conftest*
1919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001921echo "$ac_t""$ac_cv_type_size_t" 1>&6
1922if test $ac_cv_type_size_t = no; then
1923 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924#define size_t unsigned
1925EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001926
1927fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001929echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001930echo "configure:1931: checking for uid_t in sys/types.h" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001931if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001932 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001933else
1934 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001935#line 1936 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001936#include "confdefs.h"
1937#include <sys/types.h>
1938EOF
1939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1940 egrep "uid_t" >/dev/null 2>&1; then
1941 rm -rf conftest*
1942 ac_cv_type_uid_t=yes
1943else
1944 rm -rf conftest*
1945 ac_cv_type_uid_t=no
1946fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001947rm -f conftest*
1948
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001949fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001950
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001951echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001952if test $ac_cv_type_uid_t = no; then
1953 cat >> confdefs.h <<\EOF
1954#define uid_t int
1955EOF
1956
1957 cat >> confdefs.h <<\EOF
1958#define gid_t int
1959EOF
1960
1961fi
1962
Guido van Rossum627b2d71993-12-24 10:39:16 +00001963
Guido van Rossumef2255b2000-03-10 22:30:29 +00001964# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001965echo $ac_n "checking size of int""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001966echo "configure:1967: checking size of int" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00001967if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001968 echo $ac_n "(cached) $ac_c" 1>&6
1969else
1970 if test "$cross_compiling" = yes; then
1971 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1972else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001973 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001974#line 1975 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001975#include "confdefs.h"
1976#include <stdio.h>
1977main()
1978{
1979 FILE *f=fopen("conftestval", "w");
1980 if (!f) exit(1);
1981 fprintf(f, "%d\n", sizeof(int));
1982 exit(0);
1983}
1984EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001985if { (eval echo configure:1986: \"$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 +00001986then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001987 ac_cv_sizeof_int=`cat conftestval`
1988else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001989 echo "configure: failed program was:" >&5
1990 cat conftest.$ac_ext >&5
1991 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001992 ac_cv_sizeof_int=0
1993fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001994rm -fr conftest*
1995fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001996
1997fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001998echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1999cat >> confdefs.h <<EOF
2000#define SIZEOF_INT $ac_cv_sizeof_int
2001EOF
2002
2003
2004echo $ac_n "checking size of long""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002005echo "configure:2006: checking size of long" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002006if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002007 echo $ac_n "(cached) $ac_c" 1>&6
2008else
2009 if test "$cross_compiling" = yes; then
2010 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2011else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002012 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002013#line 2014 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002014#include "confdefs.h"
2015#include <stdio.h>
2016main()
2017{
2018 FILE *f=fopen("conftestval", "w");
2019 if (!f) exit(1);
2020 fprintf(f, "%d\n", sizeof(long));
2021 exit(0);
2022}
2023EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002024if { (eval echo configure:2025: \"$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 +00002025then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002026 ac_cv_sizeof_long=`cat conftestval`
2027else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002028 echo "configure: failed program was:" >&5
2029 cat conftest.$ac_ext >&5
2030 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002031 ac_cv_sizeof_long=0
2032fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002033rm -fr conftest*
2034fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002035
2036fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002037echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2038cat >> confdefs.h <<EOF
2039#define SIZEOF_LONG $ac_cv_sizeof_long
2040EOF
2041
2042
Guido van Rossumad678af1998-10-02 14:42:15 +00002043echo $ac_n "checking size of void *""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002044echo "configure:2045: checking size of void *" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002045if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002046 echo $ac_n "(cached) $ac_c" 1>&6
2047else
2048 if test "$cross_compiling" = yes; then
2049 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2050else
2051 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002052#line 2053 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002053#include "confdefs.h"
2054#include <stdio.h>
2055main()
2056{
2057 FILE *f=fopen("conftestval", "w");
2058 if (!f) exit(1);
2059 fprintf(f, "%d\n", sizeof(void *));
2060 exit(0);
2061}
2062EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002063if { (eval echo configure:2064: \"$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 +00002064then
2065 ac_cv_sizeof_void_p=`cat conftestval`
2066else
2067 echo "configure: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 rm -fr conftest*
2070 ac_cv_sizeof_void_p=0
2071fi
2072rm -fr conftest*
2073fi
2074
2075fi
2076echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2077cat >> confdefs.h <<EOF
2078#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2079EOF
2080
2081
Guido van Rossumef2255b2000-03-10 22:30:29 +00002082echo $ac_n "checking size of char""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002083echo "configure:2084: checking size of char" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002084if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 if test "$cross_compiling" = yes; then
2088 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2089else
2090 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002091#line 2092 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002092#include "confdefs.h"
2093#include <stdio.h>
2094main()
2095{
2096 FILE *f=fopen("conftestval", "w");
2097 if (!f) exit(1);
2098 fprintf(f, "%d\n", sizeof(char));
2099 exit(0);
2100}
2101EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002102if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002103then
2104 ac_cv_sizeof_char=`cat conftestval`
2105else
2106 echo "configure: failed program was:" >&5
2107 cat conftest.$ac_ext >&5
2108 rm -fr conftest*
2109 ac_cv_sizeof_char=0
2110fi
2111rm -fr conftest*
2112fi
2113
2114fi
2115echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2116cat >> confdefs.h <<EOF
2117#define SIZEOF_CHAR $ac_cv_sizeof_char
2118EOF
2119
2120
2121echo $ac_n "checking size of short""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002122echo "configure:2123: checking size of short" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002123if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002124 echo $ac_n "(cached) $ac_c" 1>&6
2125else
2126 if test "$cross_compiling" = yes; then
2127 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2128else
2129 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002130#line 2131 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002131#include "confdefs.h"
2132#include <stdio.h>
2133main()
2134{
2135 FILE *f=fopen("conftestval", "w");
2136 if (!f) exit(1);
2137 fprintf(f, "%d\n", sizeof(short));
2138 exit(0);
2139}
2140EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002141if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002142then
2143 ac_cv_sizeof_short=`cat conftestval`
2144else
2145 echo "configure: failed program was:" >&5
2146 cat conftest.$ac_ext >&5
2147 rm -fr conftest*
2148 ac_cv_sizeof_short=0
2149fi
2150rm -fr conftest*
2151fi
2152
2153fi
2154echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2155cat >> confdefs.h <<EOF
2156#define SIZEOF_SHORT $ac_cv_sizeof_short
2157EOF
2158
2159
2160echo $ac_n "checking size of float""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002161echo "configure:2162: checking size of float" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002162if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002163 echo $ac_n "(cached) $ac_c" 1>&6
2164else
2165 if test "$cross_compiling" = yes; then
2166 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2167else
2168 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002169#line 2170 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002170#include "confdefs.h"
2171#include <stdio.h>
2172main()
2173{
2174 FILE *f=fopen("conftestval", "w");
2175 if (!f) exit(1);
2176 fprintf(f, "%d\n", sizeof(float));
2177 exit(0);
2178}
2179EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002180if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002181then
2182 ac_cv_sizeof_float=`cat conftestval`
2183else
2184 echo "configure: failed program was:" >&5
2185 cat conftest.$ac_ext >&5
2186 rm -fr conftest*
2187 ac_cv_sizeof_float=0
2188fi
2189rm -fr conftest*
2190fi
2191
2192fi
2193echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2194cat >> confdefs.h <<EOF
2195#define SIZEOF_FLOAT $ac_cv_sizeof_float
2196EOF
2197
2198
2199echo $ac_n "checking size of double""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002200echo "configure:2201: checking size of double" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002201if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002202 echo $ac_n "(cached) $ac_c" 1>&6
2203else
2204 if test "$cross_compiling" = yes; then
2205 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2206else
2207 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002208#line 2209 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002209#include "confdefs.h"
2210#include <stdio.h>
2211main()
2212{
2213 FILE *f=fopen("conftestval", "w");
2214 if (!f) exit(1);
2215 fprintf(f, "%d\n", sizeof(double));
2216 exit(0);
2217}
2218EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002219if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002220then
2221 ac_cv_sizeof_double=`cat conftestval`
2222else
2223 echo "configure: failed program was:" >&5
2224 cat conftest.$ac_ext >&5
2225 rm -fr conftest*
2226 ac_cv_sizeof_double=0
2227fi
2228rm -fr conftest*
2229fi
2230
2231fi
2232echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2233cat >> confdefs.h <<EOF
2234#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2235EOF
2236
2237
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002238echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002239echo "configure:2240: checking size of fpos_t" >&5
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002240if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2241 echo $ac_n "(cached) $ac_c" 1>&6
2242else
2243 if test "$cross_compiling" = yes; then
2244 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2245else
2246 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002247#line 2248 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002248#include "confdefs.h"
2249#include <stdio.h>
2250main()
2251{
2252 FILE *f=fopen("conftestval", "w");
2253 if (!f) exit(1);
2254 fprintf(f, "%d\n", sizeof(fpos_t));
2255 exit(0);
2256}
2257EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002258if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002259then
2260 ac_cv_sizeof_fpos_t=`cat conftestval`
2261else
2262 echo "configure: failed program was:" >&5
2263 cat conftest.$ac_ext >&5
2264 rm -fr conftest*
2265 ac_cv_sizeof_fpos_t=0
2266fi
2267rm -fr conftest*
2268fi
2269
2270fi
2271echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2272cat >> confdefs.h <<EOF
2273#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2274EOF
2275
2276
Guido van Rossum0a516c91994-09-12 10:58:40 +00002277
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002278echo $ac_n "checking for long long support""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002279echo "configure:2280: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002280have_long_long=no
2281cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002282#line 2283 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002283#include "confdefs.h"
2284
2285int main() {
2286long long x; x = (long long)0;
2287; return 0; }
2288EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002289if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002290 rm -rf conftest*
2291 cat >> confdefs.h <<\EOF
2292#define HAVE_LONG_LONG 1
2293EOF
2294 have_long_long=yes
2295else
2296 echo "configure: failed program was:" >&5
2297 cat conftest.$ac_ext >&5
2298fi
2299rm -f conftest*
2300echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002301if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002302echo $ac_n "checking size of long long""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002303echo "configure:2304: checking size of long long" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002304if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002305 echo $ac_n "(cached) $ac_c" 1>&6
2306else
2307 if test "$cross_compiling" = yes; then
2308 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2309else
2310 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002311#line 2312 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002312#include "confdefs.h"
2313#include <stdio.h>
2314main()
2315{
2316 FILE *f=fopen("conftestval", "w");
2317 if (!f) exit(1);
2318 fprintf(f, "%d\n", sizeof(long long));
2319 exit(0);
2320}
2321EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002322if { (eval echo configure:2323: \"$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 +00002323then
2324 ac_cv_sizeof_long_long=`cat conftestval`
2325else
2326 echo "configure: failed program was:" >&5
2327 cat conftest.$ac_ext >&5
2328 rm -fr conftest*
2329 ac_cv_sizeof_long_long=0
2330fi
2331rm -fr conftest*
2332fi
2333
2334fi
2335echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2336cat >> confdefs.h <<EOF
2337#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2338EOF
2339
2340
2341fi
2342
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002343# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2344echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002345echo "configure:2346: checking size of off_t" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002346if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002347 echo $ac_n "(cached) $ac_c" 1>&6
2348else
2349 if test "$cross_compiling" = yes; then
2350 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2351else
2352 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002353#line 2354 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002354#include "confdefs.h"
2355#include <stdio.h>
2356#include <sys/types.h>
2357main()
2358{
2359 FILE *f=fopen("conftestval", "w");
2360 if (!f) exit(1);
2361 fprintf(f, "%d\n", sizeof(off_t));
2362 exit(0);
2363}
2364EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002365if { (eval echo configure:2366: \"$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 +00002366then
2367 ac_cv_sizeof_off_t=`cat conftestval`
2368else
2369 echo "configure: failed program was:" >&5
2370 cat conftest.$ac_ext >&5
2371 rm -fr conftest*
2372 ac_cv_sizeof_off_t=0
2373fi
2374rm -fr conftest*
2375fi
2376
2377
2378fi
2379
2380echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2381cat >> confdefs.h <<EOF
2382#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2383EOF
2384
2385
2386echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002387echo "configure:2388: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002388if test "$have_long_long" = yes -a \
2389 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2390 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002391 cat >> confdefs.h <<\EOF
2392#define HAVE_LARGEFILE_SUPPORT 1
2393EOF
2394
2395 echo "$ac_t""yes" 1>&6
2396else
2397 echo "$ac_t""no" 1>&6
2398fi
2399
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002400# AC_CHECK_SIZEOF() doesn't include <time.h>.
2401echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002402echo "configure:2403: checking size of time_t" >&5
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002403if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2404 echo $ac_n "(cached) $ac_c" 1>&6
2405else
2406 if test "$cross_compiling" = yes; then
2407 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2408else
2409 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002410#line 2411 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002411#include "confdefs.h"
2412#include <stdio.h>
2413#include <time.h>
2414main()
2415{
2416 FILE *f=fopen("conftestval", "w");
2417 if (!f) exit(1);
2418 fprintf(f, "%d\n", sizeof(time_t));
2419 exit(0);
2420}
2421EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002422if { (eval echo configure:2423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002423then
2424 ac_cv_sizeof_time_t=`cat conftestval`
2425else
2426 echo "configure: failed program was:" >&5
2427 cat conftest.$ac_ext >&5
2428 rm -fr conftest*
2429 ac_cv_sizeof_time_t=0
2430fi
2431rm -fr conftest*
2432fi
2433
2434
2435fi
2436
2437echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2438cat >> confdefs.h <<EOF
2439#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2440EOF
2441
2442
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002443
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002444# Minor variations in building a framework between NextStep versions 4 and 5
2445
2446case $ac_sys_system/$ac_sys_release in
2447 next/4*)
2448 ns_undef_sym='__environ'
2449 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2450 next/5*)
2451 ns_undef_sym='_environ'
2452 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2453esac
2454
2455echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002456echo "configure:2457: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002457if test "$with_next_framework"
2458then
2459 OPT="$OPT -fno-common"
2460 # -U __environ is needed since bundles don't have access
2461 # to crt0 when built but will always be linked against it
2462 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2463 cat >> confdefs.h <<\EOF
2464#define WITH_NEXT_FRAMEWORK 1
2465EOF
2466
2467 echo "$ac_t""yes" 1>&6
2468else
2469 echo "$ac_t""no" 1>&6
2470fi
2471
2472echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002473echo "configure:2474: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002474if test "$with_next_framework" -o "$with_dyld"
2475then
2476 if test "$with_dyld"
2477 then
2478 echo "$ac_t""yes" 1>&6
2479 else
2480 echo "$ac_t""required for framework build" 1>&6
2481 fi
2482 cat >> confdefs.h <<\EOF
2483#define WITH_DYLD 1
2484EOF
2485
2486 ns_dyld='set'
2487else
2488 echo "$ac_t""no" 1>&6
2489fi
2490
Guido van Rossum0a516c91994-09-12 10:58:40 +00002491# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002492
2493
2494
2495
Guido van Rossum0a516c91994-09-12 10:58:40 +00002496# SO is the extension of shared libraries `(including the dot!)
2497# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002498echo $ac_n "checking SO""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002499echo "configure:2500: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002500if test -z "$SO"
2501then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002502 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002503 hp*|HP*) SO=.sl;;
2504 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002505 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002506fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002507echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002508# LDSHARED is the ld *command* used to create shared library
2509# -- "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 +00002510# (Shared libraries in this instance are shared modules to be loaded into
2511# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002512echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002513echo "configure:2514: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002514if test -z "$LDSHARED"
2515then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002516 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002517 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002518 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002519 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002520 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002521 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002522 SunOS/5*)
2523 if test "$GCC" = "yes"
2524 then LDSHARED='$(CC) -G'
2525 else LDSHARED="ld -G";
2526 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002527 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002528 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2529 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002530 next/*)
2531 if test "$ns_dyld"
2532 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2533 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2534 fi
2535 if test "$with_next_framework" ; then
2536 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2537 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002538 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002539 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002540 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002541 FreeBSD*/[34]*) LDSHARED="gcc -shared";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002542 FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
2543 NetBSD*)
2544 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2545 then
2546 LDSHARED="cc -shared"
2547 else
2548 LDSHARED="ld -Bshareable"
2549 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002550 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002551 *) LDSHARED="ld";;
2552 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002553fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002554echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002555# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002556# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002557echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002558echo "configure:2559: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002559if test -z "$CCSHARED"
2560then
Guido van Rossum07397971997-04-29 21:49:50 +00002561 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002562 hp*|HP*) if test "$GCC" = yes;
2563 then CCSHARED="-fpic";
2564 else CCSHARED="+z";
2565 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002566 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002567 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002568 FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
2569 NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002570 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002571 IRIX*/6*) case $CC in
2572 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002573 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002574 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002575 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002576fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002577echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002578# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002579# the python executable -- this is only needed for a few systems
2580echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002581echo "configure:2582: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002582if test -z "$LINKFORSHARED"
2583then
Guido van Rossum07397971997-04-29 21:49:50 +00002584 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002585 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002586 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002587 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002588 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002589 FreeBSD/[34]*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002590 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002591 # -u libsys_s pulls in all symbols in libsys
2592 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2593 # -u __dummy makes the linker aware of the objc runtime
2594 # in System.framework; otherwise, __objcInit (referenced in
2595 # crt1.o) gets erroneously defined as common, which breaks dynamic
2596 # loading of any modules which reference it in System.framework
2597 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002598 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002599 NetBSD*)
2600 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2601 then
2602 LINKFORSHARED="-Wl,--export-dynamic"
2603 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002604 SunOS/5*) case $CC in
2605 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002606 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002607 then
2608 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002609 fi;;
2610 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002611 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002612fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002613echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002614
Guido van Rossum627b2d71993-12-24 10:39:16 +00002615# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002616echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002617echo "configure:2618: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002618ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002619if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002620 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621else
2622 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002623LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002625#line 2626 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002626#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002627/* Override any gcc2 internal prototype to avoid an error. */
2628/* We use char because int might match the return type of a gcc2
2629 builtin and then its argument prototype would still apply. */
2630char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002631
Guido van Rossumf78abae1997-01-21 22:02:36 +00002632int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002633dlopen()
2634; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002635EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002636if { (eval echo configure:2637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002637 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002638 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002639else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002640 echo "configure: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002642 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002643 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002644fi
2645rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002646LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002647
Guido van Rossum627b2d71993-12-24 10:39:16 +00002648fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002649if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002650 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002651 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2652 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002653 cat >> confdefs.h <<EOF
2654#define $ac_tr_lib 1
2655EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002656
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002657 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002658
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002660 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661fi
2662 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002663echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002664echo "configure:2665: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002665ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002666if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002667 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668else
2669 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002670LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002672#line 2673 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002673#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002674/* Override any gcc2 internal prototype to avoid an error. */
2675/* We use char because int might match the return type of a gcc2
2676 builtin and then its argument prototype would still apply. */
2677char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002678
Guido van Rossumf78abae1997-01-21 22:02:36 +00002679int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680shl_load()
2681; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002682EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002683if { (eval echo configure:2684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002684 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002685 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002687 echo "configure: failed program was:" >&5
2688 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002690 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691fi
2692rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002694
Guido van Rossum627b2d71993-12-24 10:39:16 +00002695fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002696if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002697 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002698 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2699 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700 cat >> confdefs.h <<EOF
2701#define $ac_tr_lib 1
2702EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002703
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002704 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705
2706else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002707 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708fi
2709 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002710
2711# checks for system dependent C++ extensions support
2712case "$ac_sys_system" in
2713 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002714echo "configure:2715: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002715 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002716#line 2717 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002717#include "confdefs.h"
2718#include "/usr/lpp/xlC/include/load.h"
2719int main() {
2720loadAndInit("", 0, "")
2721; return 0; }
2722EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002723if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002724 rm -rf conftest*
2725 cat >> confdefs.h <<\EOF
2726#define AIX_GENUINE_CPLUSPLUS 1
2727EOF
2728
2729 echo "$ac_t""yes" 1>&6
2730else
2731 echo "configure: failed program was:" >&5
2732 cat conftest.$ac_ext >&5
2733 rm -rf conftest*
2734 echo "$ac_t""no" 1>&6
2735fi
2736rm -f conftest*;;
2737 *) ;;
2738esac
2739
Guido van Rossum70c7f481998-03-26 18:44:10 +00002740# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2741# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002742# BeOS' sockets are stashed in libnet.
2743case "$ac_sys_system" in
2744IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002745*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002746echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002747echo "configure:2748: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002748ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002749if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002750 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002751else
2752 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002753LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002754cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002755#line 2756 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002756#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002757/* Override any gcc2 internal prototype to avoid an error. */
2758/* We use char because int might match the return type of a gcc2
2759 builtin and then its argument prototype would still apply. */
2760char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002761
Guido van Rossumf78abae1997-01-21 22:02:36 +00002762int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002763t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002764; return 0; }
2765EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002766if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002767 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002768 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002769else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002770 echo "configure: failed program was:" >&5
2771 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002772 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002773 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002774fi
2775rm -f conftest*
2776LIBS="$ac_save_LIBS"
2777
2778fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002779if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002780 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002781 LIBS="-lnsl $LIBS"
2782else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002783 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002784fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002785 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002786echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002787echo "configure:2788: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002788ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002789if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002790 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002791else
2792 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002793LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002795#line 2796 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002796#include "confdefs.h"
2797/* Override any gcc2 internal prototype to avoid an error. */
2798/* We use char because int might match the return type of a gcc2
2799 builtin and then its argument prototype would still apply. */
2800char socket();
2801
2802int main() {
2803socket()
2804; return 0; }
2805EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002806if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002807 rm -rf conftest*
2808 eval "ac_cv_lib_$ac_lib_var=yes"
2809else
2810 echo "configure: failed program was:" >&5
2811 cat conftest.$ac_ext >&5
2812 rm -rf conftest*
2813 eval "ac_cv_lib_$ac_lib_var=no"
2814fi
2815rm -f conftest*
2816LIBS="$ac_save_LIBS"
2817
2818fi
2819if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2820 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002821 LIBS="-lsocket $LIBS"
2822else
2823 echo "$ac_t""no" 1>&6
2824fi
2825 # SVR4 sockets
2826echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002827echo "configure:2828: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002828ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002829if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002830 echo $ac_n "(cached) $ac_c" 1>&6
2831else
2832 ac_save_LIBS="$LIBS"
2833LIBS="-lnet $LIBS $LIBS"
2834cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002835#line 2836 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002836#include "confdefs.h"
2837/* Override any gcc2 internal prototype to avoid an error. */
2838/* We use char because int might match the return type of a gcc2
2839 builtin and then its argument prototype would still apply. */
2840char socket();
2841
2842int main() {
2843socket()
2844; return 0; }
2845EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002846if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002847 rm -rf conftest*
2848 eval "ac_cv_lib_$ac_lib_var=yes"
2849else
2850 echo "configure: failed program was:" >&5
2851 cat conftest.$ac_ext >&5
2852 rm -rf conftest*
2853 eval "ac_cv_lib_$ac_lib_var=no"
2854fi
2855rm -f conftest*
2856LIBS="$ac_save_LIBS"
2857
2858fi
2859if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2860 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002861 LIBS="-lnet $LIBS"
2862else
2863 echo "$ac_t""no" 1>&6
2864fi
2865 # BeOS
2866;;
2867esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002868
Guido van Rossuma68acba1996-07-31 17:36:39 +00002869echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002870echo "configure:2871: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002871# Check whether --with-libs or --without-libs was given.
2872if test "${with_libs+set}" = set; then
2873 withval="$with_libs"
2874
2875echo "$ac_t""$withval" 1>&6
2876LIBS="$withval $LIBS"
2877
2878else
2879 echo "$ac_t""no" 1>&6
2880fi
2881
Guido van Rossum7f43da71994-08-01 12:15:30 +00002882
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002883echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002884echo "configure:2885: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002885# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002886if test "${with_readline+set}" = set; then
2887 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002888 echo "$ac_t""$withval" 1>&6
2889{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002890else
Guido van Rossumb06df271997-08-05 21:50:20 +00002891 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002892fi
2893
Guido van Rossum7f43da71994-08-01 12:15:30 +00002894
Guido van Rossum009f7871997-12-04 00:51:42 +00002895
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002896USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00002897
Guido van Rossumec2f0731997-01-22 20:54:01 +00002898echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002899echo "configure:2900: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002900
2901# Check whether --with-dec-threads or --without-dec-threads was given.
2902if test "${with_dec_threads+set}" = set; then
2903 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002904
2905echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00002906LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002907if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002908 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002909fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002910else
2911 echo "$ac_t""no" 1>&6
2912fi
2913
2914
2915echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00002916echo "configure:2917: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002917# Check whether --with-threads or --without-threads was given.
2918if test "${with_threads+set}" = set; then
2919 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002920 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00002921fi
2922
2923
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002924# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002925# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002926if test "${with_thread+set}" = set; then
2927 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00002928
2929with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00002930fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002931
2932
2933if test -z "$with_threads"
2934then with_threads="yes"
2935fi
2936echo "$ac_t""$with_threads" 1>&6
2937
2938if test "$with_threads" = "no"
2939then
2940 USE_THREAD_MODULE="#"
2941else
2942 if test -d "$with_threads"
2943 then LDFLAGS="$LDFLAGS -L$with_threads"
2944 fi
2945 if test -d "$withval"
2946 then LDFLAGS="$LDFLAGS -L$withval"
2947 fi
2948 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002949#define _REENTRANT 1
2950EOF
2951
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002952 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002953echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00002954echo "configure:2955: checking for mach/cthreads.h" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002955if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956 echo $ac_n "(cached) $ac_c" 1>&6
2957else
2958 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00002959#line 2960 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960#include "confdefs.h"
2961#include <mach/cthreads.h>
2962EOF
2963ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00002964{ (eval echo configure:2965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002965ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966if test -z "$ac_err"; then
2967 rm -rf conftest*
2968 eval "ac_cv_header_$ac_safe=yes"
2969else
2970 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002971 echo "configure: failed program was:" >&5
2972 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002973 rm -rf conftest*
2974 eval "ac_cv_header_$ac_safe=no"
2975fi
2976rm -f conftest*
2977fi
2978if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2979 echo "$ac_t""yes" 1>&6
2980 cat >> confdefs.h <<\EOF
2981#define WITH_THREAD 1
2982EOF
2983
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002984 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985#define C_THREADS 1
2986EOF
2987
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002988 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002989else
2990 echo "$ac_t""no" 1>&6
2991
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002992 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00002993echo "configure:2994: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00002994ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00002995if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00002996 echo $ac_n "(cached) $ac_c" 1>&6
2997else
2998 ac_save_LIBS="$LIBS"
2999LIBS="-lpthread $LIBS"
3000cat > conftest.$ac_ext <<EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003001#line 3002 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003002#include "confdefs.h"
3003/* Override any gcc2 internal prototype to avoid an error. */
3004/* We use char because int might match the return type of a gcc2
3005 builtin and then its argument prototype would still apply. */
3006char pthread_create();
3007
3008int main() {
3009pthread_create()
3010; return 0; }
3011EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003012if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003013 rm -rf conftest*
3014 eval "ac_cv_lib_$ac_lib_var=yes"
3015else
3016 echo "configure: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3018 rm -rf conftest*
3019 eval "ac_cv_lib_$ac_lib_var=no"
3020fi
3021rm -f conftest*
3022LIBS="$ac_save_LIBS"
3023
3024fi
3025if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3026 echo "$ac_t""yes" 1>&6
3027 cat >> confdefs.h <<\EOF
3028#define WITH_THREAD 1
3029EOF
3030
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003031 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003032#define _POSIX_THREADS 1
3033EOF
3034
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003035 LIBS="-lpthread $LIBS"
3036 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003037else
3038 echo "$ac_t""no" 1>&6
3039
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003040 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00003041echo "configure:3042: checking for pthread_detach" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003042if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003043 echo $ac_n "(cached) $ac_c" 1>&6
3044else
3045 cat > conftest.$ac_ext <<EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003046#line 3047 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003047#include "confdefs.h"
3048/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003049 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003050#include <assert.h>
3051/* Override any gcc2 internal prototype to avoid an error. */
3052/* We use char because int might match the return type of a gcc2
3053 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003054char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003055
3056int main() {
3057
3058/* The GNU C library defines this for functions which it implements
3059 to always fail with ENOSYS. Some functions are actually named
3060 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003061#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003062choke me
3063#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003064pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003065#endif
3066
3067; return 0; }
3068EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003069if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003070 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003071 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003072else
3073 echo "configure: failed program was:" >&5
3074 cat conftest.$ac_ext >&5
3075 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003076 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003077fi
3078rm -f conftest*
3079fi
3080
Guido van Rossumea516321998-12-17 18:08:55 +00003081if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003082 echo "$ac_t""yes" 1>&6
3083 cat >> confdefs.h <<\EOF
3084#define WITH_THREAD 1
3085EOF
3086
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003087 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003088#define _POSIX_THREADS 1
3089EOF
3090
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003091 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003092else
3093 echo "$ac_t""no" 1>&6
3094
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003095 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003096echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00003097echo "configure:3098: checking for kernel/OS.h" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003098if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003099 echo $ac_n "(cached) $ac_c" 1>&6
3100else
3101 cat > conftest.$ac_ext <<EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003102#line 3103 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003103#include "confdefs.h"
3104#include <kernel/OS.h>
3105EOF
3106ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Greg Steinadf63d62000-07-05 10:38:09 +00003107{ (eval echo configure:3108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003108ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003109if test -z "$ac_err"; then
3110 rm -rf conftest*
3111 eval "ac_cv_header_$ac_safe=yes"
3112else
3113 echo "$ac_err" >&5
3114 echo "configure: failed program was:" >&5
3115 cat conftest.$ac_ext >&5
3116 rm -rf conftest*
3117 eval "ac_cv_header_$ac_safe=no"
3118fi
3119rm -f conftest*
3120fi
3121if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3122 echo "$ac_t""yes" 1>&6
3123 cat >> confdefs.h <<\EOF
3124#define WITH_THREAD 1
3125EOF
3126
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003127 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003128#define BEOS_THREADS 1
3129EOF
3130
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003131 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003132else
3133 echo "$ac_t""no" 1>&6
3134
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003135 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00003136echo "configure:3137: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003137ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003138if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003139 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003140else
3141 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003142LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003143cat > conftest.$ac_ext <<EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003144#line 3145 "configure"
3145#include "confdefs.h"
3146/* Override any gcc2 internal prototype to avoid an error. */
3147/* We use char because int might match the return type of a gcc2
3148 builtin and then its argument prototype would still apply. */
3149char pthread_create();
3150
3151int main() {
3152pthread_create()
3153; return 0; }
3154EOF
3155if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3156 rm -rf conftest*
3157 eval "ac_cv_lib_$ac_lib_var=yes"
3158else
3159 echo "configure: failed program was:" >&5
3160 cat conftest.$ac_ext >&5
3161 rm -rf conftest*
3162 eval "ac_cv_lib_$ac_lib_var=no"
3163fi
3164rm -f conftest*
3165LIBS="$ac_save_LIBS"
3166
3167fi
3168if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3169 echo "$ac_t""yes" 1>&6
3170 cat >> confdefs.h <<\EOF
3171#define WITH_THREAD 1
3172EOF
3173
3174 cat >> confdefs.h <<\EOF
3175#define _POSIX_THREADS 1
3176EOF
3177
3178 LIBS="$LIBS -lpthreads"
3179 LIBOBJS="$LIBOBJS thread.o"
3180else
3181 echo "$ac_t""no" 1>&6
3182
3183 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
3184echo "configure:3185: checking for pthread_create in -lc_r" >&5
3185ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
3186if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3187 echo $ac_n "(cached) $ac_c" 1>&6
3188else
3189 ac_save_LIBS="$LIBS"
3190LIBS="-lc_r $LIBS"
3191cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003192#line 3193 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003193#include "confdefs.h"
3194/* Override any gcc2 internal prototype to avoid an error. */
3195/* We use char because int might match the return type of a gcc2
3196 builtin and then its argument prototype would still apply. */
3197char pthread_create();
3198
3199int main() {
3200pthread_create()
3201; return 0; }
3202EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003203if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003204 rm -rf conftest*
3205 eval "ac_cv_lib_$ac_lib_var=yes"
3206else
3207 echo "configure: failed program was:" >&5
3208 cat conftest.$ac_ext >&5
3209 rm -rf conftest*
3210 eval "ac_cv_lib_$ac_lib_var=no"
3211fi
3212rm -f conftest*
3213LIBS="$ac_save_LIBS"
3214
3215fi
3216if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3217 echo "$ac_t""yes" 1>&6
3218 cat >> confdefs.h <<\EOF
3219#define WITH_THREAD 1
3220EOF
3221
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003222 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003223#define _POSIX_THREADS 1
3224EOF
3225
Greg Steinadf63d62000-07-05 10:38:09 +00003226 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003227 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003228else
3229 echo "$ac_t""no" 1>&6
3230
Greg Steinadf63d62000-07-05 10:38:09 +00003231 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
3232echo "configure:3233: checking for __d6_pthread_create in -lthread" >&5
3233ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003234if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003235 echo $ac_n "(cached) $ac_c" 1>&6
3236else
3237 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003238LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003239cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003240#line 3241 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003241#include "confdefs.h"
3242/* Override any gcc2 internal prototype to avoid an error. */
3243/* We use char because int might match the return type of a gcc2
3244 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003245char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003246
3247int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003248__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003249; return 0; }
3250EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003251if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003252 rm -rf conftest*
3253 eval "ac_cv_lib_$ac_lib_var=yes"
3254else
3255 echo "configure: failed program was:" >&5
3256 cat conftest.$ac_ext >&5
3257 rm -rf conftest*
3258 eval "ac_cv_lib_$ac_lib_var=no"
3259fi
3260rm -f conftest*
3261LIBS="$ac_save_LIBS"
3262
3263fi
3264if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3265 echo "$ac_t""yes" 1>&6
3266 cat >> confdefs.h <<\EOF
3267#define WITH_THREAD 1
3268EOF
3269
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003270 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003271#define _POSIX_THREADS 1
3272EOF
3273
Greg Steinadf63d62000-07-05 10:38:09 +00003274 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003275 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003276else
3277 echo "$ac_t""no" 1>&6
3278
Greg Steinadf63d62000-07-05 10:38:09 +00003279 echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
3280echo "configure:3281: checking for pth_init in -lpth" >&5
3281ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003282if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003283 echo $ac_n "(cached) $ac_c" 1>&6
3284else
3285 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003286LIBS="-lpth $LIBS"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003287cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003288#line 3289 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003289#include "confdefs.h"
3290/* Override any gcc2 internal prototype to avoid an error. */
3291/* We use char because int might match the return type of a gcc2
3292 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003293char pth_init();
Guido van Rossum0be3e491997-05-22 20:33:33 +00003294
3295int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003296pth_init()
Guido van Rossum0be3e491997-05-22 20:33:33 +00003297; return 0; }
3298EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003299if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003300 rm -rf conftest*
3301 eval "ac_cv_lib_$ac_lib_var=yes"
3302else
3303 echo "configure: failed program was:" >&5
3304 cat conftest.$ac_ext >&5
3305 rm -rf conftest*
3306 eval "ac_cv_lib_$ac_lib_var=no"
3307fi
3308rm -f conftest*
3309LIBS="$ac_save_LIBS"
3310
3311fi
3312if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3313 echo "$ac_t""yes" 1>&6
3314 cat >> confdefs.h <<\EOF
3315#define WITH_THREAD 1
3316EOF
3317
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003318 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003319#define _GNU_PTH 1
Guido van Rossum0be3e491997-05-22 20:33:33 +00003320EOF
3321
Greg Steinadf63d62000-07-05 10:38:09 +00003322 LIBS="-lpth $LIBS"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003323 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003324else
3325 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003326
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003327 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003328echo "configure:3329: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003329ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003330if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003331 echo $ac_n "(cached) $ac_c" 1>&6
3332else
3333 ac_save_LIBS="$LIBS"
3334LIBS="-lcma $LIBS"
3335cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003336#line 3337 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003337#include "confdefs.h"
3338/* Override any gcc2 internal prototype to avoid an error. */
3339/* We use char because int might match the return type of a gcc2
3340 builtin and then its argument prototype would still apply. */
3341char pthread_create();
3342
3343int main() {
3344pthread_create()
3345; return 0; }
3346EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003347if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003348 rm -rf conftest*
3349 eval "ac_cv_lib_$ac_lib_var=yes"
3350else
3351 echo "configure: failed program was:" >&5
3352 cat conftest.$ac_ext >&5
3353 rm -rf conftest*
3354 eval "ac_cv_lib_$ac_lib_var=no"
3355fi
3356rm -f conftest*
3357LIBS="$ac_save_LIBS"
3358
3359fi
3360if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3361 echo "$ac_t""yes" 1>&6
3362 cat >> confdefs.h <<\EOF
3363#define WITH_THREAD 1
3364EOF
3365
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003366 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003367#define _POSIX_THREADS 1
3368EOF
3369
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003370 LIBS="$LIBS -lcma"
3371 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003372else
3373 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00003374fi
3375
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003376
Guido van Rossum627b2d71993-12-24 10:39:16 +00003377fi
3378
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003379fi
3380
Guido van Rossum0be3e491997-05-22 20:33:33 +00003381fi
3382
Guido van Rossum49545951997-12-02 19:28:29 +00003383fi
3384
Guido van Rossumb93a8621998-05-07 13:27:32 +00003385fi
3386
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003387fi
3388
Guido van Rossumad678af1998-10-02 14:42:15 +00003389fi
3390
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003391fi
3392
Guido van Rossum0be3e491997-05-22 20:33:33 +00003393
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003394 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003395echo "configure:3396: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003396ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003397if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003398 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003399else
3400 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003401LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003402cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003403#line 3404 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003404#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003405/* Override any gcc2 internal prototype to avoid an error. */
3406/* We use char because int might match the return type of a gcc2
3407 builtin and then its argument prototype would still apply. */
3408char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003409
Guido van Rossumf78abae1997-01-21 22:02:36 +00003410int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003411usconfig()
3412; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003413EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003414if { (eval echo configure:3415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003415 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003418 echo "configure: failed program was:" >&5
3419 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003420 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003422fi
3423rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003424LIBS="$ac_save_LIBS"
3425
3426fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003427if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003428 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003429 cat >> confdefs.h <<\EOF
3430#define WITH_THREAD 1
3431EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003432
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003433 LIBS="$LIBS -lmpc"
3434 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003435else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003436 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003437fi
3438
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003439 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003440echo "configure:3441: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003441ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003442if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003443 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003444else
3445 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003446LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003447cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003448#line 3449 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003449#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003450/* Override any gcc2 internal prototype to avoid an error. */
3451/* We use char because int might match the return type of a gcc2
3452 builtin and then its argument prototype would still apply. */
3453char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003454
Guido van Rossumf78abae1997-01-21 22:02:36 +00003455int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003456thr_create()
3457; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003459if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003461 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003462else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003463 echo "configure: failed program was:" >&5
3464 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003465 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003466 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003467fi
3468rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003469LIBS="$ac_save_LIBS"
3470
3471fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003472if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003473 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003474 cat >> confdefs.h <<\EOF
3475#define WITH_THREAD 1
3476EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003477
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003478 LIBS="$LIBS -lthread"
3479 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003480else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003481 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003482fi
3483
Guido van Rossum627b2d71993-12-24 10:39:16 +00003484fi
3485
Barry Warsawef82cd72000-06-30 16:21:01 +00003486# Check for GC support
3487
3488USE_GC_MODULE=""
3489echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003490echo "configure:3491: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003491# Check whether --with-cycle-gc or --without-cycle-gc was given.
3492if test "${with_cycle_gc+set}" = set; then
3493 withval="$with_cycle_gc"
3494 :
3495fi
3496
3497
3498if test -z "$with_cycle_gc"
3499then with_cycle_gc="yes"
3500fi
3501if test "$with_cycle_gc" = "no"
3502then
3503 USE_GC_MODULE="#"
3504else
3505 cat >> confdefs.h <<\EOF
3506#define WITH_CYCLE_GC 1
3507EOF
3508
3509fi
3510echo "$ac_t""$with_cycle_gc" 1>&6
3511
3512# Check for --with-wctype-functions
3513echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003514echo "configure:3515: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003515# Check whether --with-wctype-functions or --without-wctype-functions was given.
3516if test "${with_wctype_functions+set}" = set; then
3517 withval="$with_wctype_functions"
3518
3519if test "$withval" != no
3520then cat >> confdefs.h <<\EOF
3521#define WANT_WCTYPE_FUNCTIONS 1
3522EOF
3523 echo "$ac_t""yes" 1>&6
3524else echo "$ac_t""no" 1>&6
3525fi
3526else
3527 echo "$ac_t""no" 1>&6
3528fi
3529
3530
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003531# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003532
3533DLINCLDIR=/
3534
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003535echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003536echo "configure:3537: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003537# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003538if test "${with_sgi_dl+set}" = set; then
3539 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003540
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003541echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003542cat >> confdefs.h <<\EOF
3543#define WITH_SGI_DL 1
3544EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003545
Guido van Rossume97ee181999-12-20 21:27:22 +00003546DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003547dldir=$withval
3548if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003549then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003551fi
3552DLINCLDIR=${dldir}
3553LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003554else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003555 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003556fi
3557
3558
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003559echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003560echo "configure:3561: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003561# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003562if test "${with_dl_dld+set}" = set; then
3563 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003564
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003565echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003566cat >> confdefs.h <<\EOF
3567#define WITH_DL_DLD 1
3568EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003569
Guido van Rossume97ee181999-12-20 21:27:22 +00003570DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003571dldir=`echo "$withval" | sed 's/,.*//'`
3572dlddir=`echo "$withval" | sed 's/.*,//'`
3573if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003574then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003575else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003576fi
3577DLINCLDIR=${dldir}
3578LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003579else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003580 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003581fi
3582
3583
Guido van Rossume97ee181999-12-20 21:27:22 +00003584# the dlopen() function means we might want to use dynload_shlib.o. some
3585# platforms, such as AIX, have dlopen(), but don't want to use it.
3586echo $ac_n "checking for dlopen""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003587echo "configure:3588: checking for dlopen" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003588if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003589 echo $ac_n "(cached) $ac_c" 1>&6
3590else
3591 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003592#line 3593 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003593#include "confdefs.h"
3594/* System header to define __stub macros and hopefully few prototypes,
3595 which can conflict with char dlopen(); below. */
3596#include <assert.h>
3597/* Override any gcc2 internal prototype to avoid an error. */
3598/* We use char because int might match the return type of a gcc2
3599 builtin and then its argument prototype would still apply. */
3600char dlopen();
3601
3602int main() {
3603
3604/* The GNU C library defines this for functions which it implements
3605 to always fail with ENOSYS. Some functions are actually named
3606 something starting with __ and the normal name is an alias. */
3607#if defined (__stub_dlopen) || defined (__stub___dlopen)
3608choke me
3609#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003610dlopen();
Guido van Rossume97ee181999-12-20 21:27:22 +00003611#endif
3612
3613; return 0; }
3614EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003615if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003616 rm -rf conftest*
3617 eval "ac_cv_func_dlopen=yes"
3618else
3619 echo "configure: failed program was:" >&5
3620 cat conftest.$ac_ext >&5
3621 rm -rf conftest*
3622 eval "ac_cv_func_dlopen=no"
3623fi
3624rm -f conftest*
3625fi
3626
3627if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
3628 echo "$ac_t""yes" 1>&6
3629 :
3630else
3631 echo "$ac_t""no" 1>&6
3632fi
3633
3634
3635# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3636# loading of modules.
3637
3638echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003639echo "configure:3640: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003640if test -z "$DYNLOADFILE"
3641then
3642 case $ac_sys_system/$ac_sys_release in
3643 AIX*) DYNLOADFILE="dynload_aix.o";;
3644 BeOS*) DYNLOADFILE="dynload_beos.o";;
3645 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3646 next/*) DYNLOADFILE="dynload_next.o";;
3647 *)
3648 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3649 # out any dynamic loading
3650 if test "$ac_cv_func_dlopen" = yes
3651 then DYNLOADFILE="dynload_shlib.o"
3652 else DYNLOADFILE="dynload_stub.o"
3653 fi
3654 ;;
3655 esac
3656fi
3657echo "$ac_t""$DYNLOADFILE" 1>&6
3658if test "$DYNLOADFILE" != "dynload_stub.o"
3659then
3660 cat >> confdefs.h <<\EOF
3661#define HAVE_DYNAMIC_LOADING 1
3662EOF
3663
3664fi
3665
Guido van Rossum627b2d71993-12-24 10:39:16 +00003666# checks for library functions
Fred Drake35a092f1999-12-13 16:23:35 +00003667for ac_func in alarm chown clock confstr ctermid ctermid_r dlopen execv \
3668 flock fork fsync fdatasync fpathconf ftime ftruncate \
Fred Drakef581db11999-12-14 21:11:47 +00003669 getgroups getlogin getpeername getpgrp getpid getpwent gettimeofday getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003670 kill link lstat mkfifo mktime mremap \
3671 nice pathconf pause plock pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003672 putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00003673 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003674 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003675 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
3676 truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00003677do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003678echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003679echo "configure:3680: checking for $ac_func" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003680if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003681 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003682else
3683 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003684#line 3685 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003685#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003686/* System header to define __stub macros and hopefully few prototypes,
3687 which can conflict with char $ac_func(); below. */
3688#include <assert.h>
3689/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003690/* We use char because int might match the return type of a gcc2
3691 builtin and then its argument prototype would still apply. */
3692char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003693
Guido van Rossumf78abae1997-01-21 22:02:36 +00003694int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003695
Guido van Rossum627b2d71993-12-24 10:39:16 +00003696/* The GNU C library defines this for functions which it implements
3697 to always fail with ENOSYS. Some functions are actually named
3698 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003699#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003700choke me
3701#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003702$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003703#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003704
Guido van Rossum7f43da71994-08-01 12:15:30 +00003705; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003706EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003707if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003708 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003709 eval "ac_cv_func_$ac_func=yes"
3710else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003711 echo "configure: failed program was:" >&5
3712 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003713 rm -rf conftest*
3714 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003715fi
3716rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003717fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003718
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003719if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003720 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003722 cat >> confdefs.h <<EOF
3723#define $ac_tr_func 1
3724EOF
3725
3726else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003727 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003729done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003730
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003731
Fred Drake8cef4cf2000-06-28 16:40:38 +00003732# check for openpty and forkpty
3733
3734for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003735do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003736echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003737echo "configure:3738: checking for $ac_func" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003738if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003739 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003740else
3741 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003742#line 3743 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003743#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003744/* System header to define __stub macros and hopefully few prototypes,
3745 which can conflict with char $ac_func(); below. */
3746#include <assert.h>
3747/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748/* We use char because int might match the return type of a gcc2
3749 builtin and then its argument prototype would still apply. */
3750char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003751
Guido van Rossumf78abae1997-01-21 22:02:36 +00003752int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003753
Guido van Rossum627b2d71993-12-24 10:39:16 +00003754/* The GNU C library defines this for functions which it implements
3755 to always fail with ENOSYS. Some functions are actually named
3756 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003757#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003758choke me
3759#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003760$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003761#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003762
Guido van Rossum7f43da71994-08-01 12:15:30 +00003763; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003764EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003765if { (eval echo configure:3766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003766 rm -rf conftest*
3767 eval "ac_cv_func_$ac_func=yes"
3768else
3769 echo "configure: failed program was:" >&5
3770 cat conftest.$ac_ext >&5
3771 rm -rf conftest*
3772 eval "ac_cv_func_$ac_func=no"
3773fi
3774rm -f conftest*
3775fi
3776
3777if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3778 echo "$ac_t""yes" 1>&6
3779 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3780 cat >> confdefs.h <<EOF
3781#define $ac_tr_func 1
3782EOF
3783
3784else
3785 echo "$ac_t""no" 1>&6
3786echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003787echo "configure:3788: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00003788ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003789if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003790 echo $ac_n "(cached) $ac_c" 1>&6
3791else
3792 ac_save_LIBS="$LIBS"
3793LIBS="-lutil $LIBS"
3794cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003795#line 3796 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003796#include "confdefs.h"
3797/* Override any gcc2 internal prototype to avoid an error. */
3798/* We use char because int might match the return type of a gcc2
3799 builtin and then its argument prototype would still apply. */
3800char openpty();
3801
3802int main() {
3803openpty()
3804; return 0; }
3805EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003806if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003807 rm -rf conftest*
3808 eval "ac_cv_lib_$ac_lib_var=yes"
3809else
3810 echo "configure: failed program was:" >&5
3811 cat conftest.$ac_ext >&5
3812 rm -rf conftest*
3813 eval "ac_cv_lib_$ac_lib_var=no"
3814fi
3815rm -f conftest*
3816LIBS="$ac_save_LIBS"
3817
3818fi
3819if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3820 echo "$ac_t""yes" 1>&6
3821 cat >> confdefs.h <<\EOF
3822#define HAVE_OPENPTY 1
3823EOF
3824 LIBS="$LIBS -lutil"
3825else
3826 echo "$ac_t""no" 1>&6
3827fi
3828
3829fi
3830done
3831
3832for ac_func in forkpty
3833do
3834echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003835echo "configure:3836: checking for $ac_func" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003836if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003837 echo $ac_n "(cached) $ac_c" 1>&6
3838else
3839 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003840#line 3841 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003841#include "confdefs.h"
3842/* System header to define __stub macros and hopefully few prototypes,
3843 which can conflict with char $ac_func(); below. */
3844#include <assert.h>
3845/* Override any gcc2 internal prototype to avoid an error. */
3846/* We use char because int might match the return type of a gcc2
3847 builtin and then its argument prototype would still apply. */
3848char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003849
3850int main() {
3851
3852/* The GNU C library defines this for functions which it implements
3853 to always fail with ENOSYS. Some functions are actually named
3854 something starting with __ and the normal name is an alias. */
3855#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3856choke me
3857#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003858$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003859#endif
3860
3861; return 0; }
3862EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003863if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003864 rm -rf conftest*
3865 eval "ac_cv_func_$ac_func=yes"
3866else
3867 echo "configure: failed program was:" >&5
3868 cat conftest.$ac_ext >&5
3869 rm -rf conftest*
3870 eval "ac_cv_func_$ac_func=no"
3871fi
3872rm -f conftest*
3873fi
3874
3875if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3876 echo "$ac_t""yes" 1>&6
3877 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3878 cat >> confdefs.h <<EOF
3879#define $ac_tr_func 1
3880EOF
3881
3882else
3883 echo "$ac_t""no" 1>&6
3884echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003885echo "configure:3886: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00003886ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003887if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003888 echo $ac_n "(cached) $ac_c" 1>&6
3889else
3890 ac_save_LIBS="$LIBS"
3891LIBS="-lutil $LIBS"
3892cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003893#line 3894 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003894#include "confdefs.h"
3895/* Override any gcc2 internal prototype to avoid an error. */
3896/* We use char because int might match the return type of a gcc2
3897 builtin and then its argument prototype would still apply. */
3898char forkpty();
3899
3900int main() {
3901forkpty()
3902; return 0; }
3903EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003904if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003905 rm -rf conftest*
3906 eval "ac_cv_lib_$ac_lib_var=yes"
3907else
3908 echo "configure: failed program was:" >&5
3909 cat conftest.$ac_ext >&5
3910 rm -rf conftest*
3911 eval "ac_cv_lib_$ac_lib_var=no"
3912fi
3913rm -f conftest*
3914LIBS="$ac_save_LIBS"
3915
3916fi
3917if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3918 echo "$ac_t""yes" 1>&6
3919 cat >> confdefs.h <<\EOF
3920#define HAVE_FORKPTY 1
3921EOF
3922 LIBS="$LIBS -lutil"
3923else
3924 echo "$ac_t""no" 1>&6
3925fi
3926
3927fi
3928done
3929
3930
3931# check for long file support functions
3932for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
3933do
3934echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003935echo "configure:3936: checking for $ac_func" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003936if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003937 echo $ac_n "(cached) $ac_c" 1>&6
3938else
3939 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003940#line 3941 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003941#include "confdefs.h"
3942/* System header to define __stub macros and hopefully few prototypes,
3943 which can conflict with char $ac_func(); below. */
3944#include <assert.h>
3945/* Override any gcc2 internal prototype to avoid an error. */
3946/* We use char because int might match the return type of a gcc2
3947 builtin and then its argument prototype would still apply. */
3948char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003949
3950int main() {
3951
3952/* The GNU C library defines this for functions which it implements
3953 to always fail with ENOSYS. Some functions are actually named
3954 something starting with __ and the normal name is an alias. */
3955#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3956choke me
3957#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003958$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003959#endif
3960
3961; return 0; }
3962EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003963if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003964 rm -rf conftest*
3965 eval "ac_cv_func_$ac_func=yes"
3966else
3967 echo "configure: failed program was:" >&5
3968 cat conftest.$ac_ext >&5
3969 rm -rf conftest*
3970 eval "ac_cv_func_$ac_func=no"
3971fi
3972rm -f conftest*
3973fi
3974
3975if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3976 echo "$ac_t""yes" 1>&6
3977 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3978 cat >> confdefs.h <<EOF
3979#define $ac_tr_func 1
3980EOF
3981
3982else
3983 echo "$ac_t""no" 1>&6
3984fi
3985done
3986
3987
3988for ac_func in dup2 getcwd strdup strerror memmove
3989do
3990echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003991echo "configure:3992: checking for $ac_func" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003992if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003993 echo $ac_n "(cached) $ac_c" 1>&6
3994else
3995 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003996#line 3997 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003997#include "confdefs.h"
3998/* System header to define __stub macros and hopefully few prototypes,
3999 which can conflict with char $ac_func(); below. */
4000#include <assert.h>
4001/* Override any gcc2 internal prototype to avoid an error. */
4002/* We use char because int might match the return type of a gcc2
4003 builtin and then its argument prototype would still apply. */
4004char $ac_func();
4005
4006int main() {
4007
4008/* The GNU C library defines this for functions which it implements
4009 to always fail with ENOSYS. Some functions are actually named
4010 something starting with __ and the normal name is an alias. */
4011#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4012choke me
4013#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004014$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004015#endif
4016
4017; return 0; }
4018EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004019if { (eval echo configure:4020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004020 rm -rf conftest*
4021 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004022else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004023 echo "configure: failed program was:" >&5
4024 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004025 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004027fi
4028rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004029fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004030
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004032 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004033 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4034 cat >> confdefs.h <<EOF
4035#define $ac_tr_func 1
4036EOF
4037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004039 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004040LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004041fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004042done
4043
Guido van Rossumf78abae1997-01-21 22:02:36 +00004044
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004045echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004046echo "configure:4047: checking for getpgrp" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004047if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004048 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049else
4050 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004051#line 4052 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004052#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004053/* System header to define __stub macros and hopefully few prototypes,
4054 which can conflict with char getpgrp(); below. */
4055#include <assert.h>
4056/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004057/* We use char because int might match the return type of a gcc2
4058 builtin and then its argument prototype would still apply. */
4059char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004060
Guido van Rossumf78abae1997-01-21 22:02:36 +00004061int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004062
Guido van Rossum627b2d71993-12-24 10:39:16 +00004063/* The GNU C library defines this for functions which it implements
4064 to always fail with ENOSYS. Some functions are actually named
4065 something starting with __ and the normal name is an alias. */
4066#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
4067choke me
4068#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004069getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004070#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004071
4072; return 0; }
4073EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004074if { (eval echo configure:4075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004075 rm -rf conftest*
4076 eval "ac_cv_func_getpgrp=yes"
4077else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004078 echo "configure: failed program was:" >&5
4079 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004080 rm -rf conftest*
4081 eval "ac_cv_func_getpgrp=no"
4082fi
4083rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004084fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004086if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004087 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004089#line 4090 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090#include "confdefs.h"
4091#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004092int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004093getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004094; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004095EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004096if { (eval echo configure:4097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004097 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098 cat >> confdefs.h <<\EOF
4099#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004100EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004101
Guido van Rossumf78abae1997-01-21 22:02:36 +00004102else
4103 echo "configure: failed program was:" >&5
4104 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004105fi
4106rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004107else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004108 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004109fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004110
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004111echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004112echo "configure:4113: checking for setpgrp" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004113if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004114 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004115else
4116 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004117#line 4118 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004118#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004119/* System header to define __stub macros and hopefully few prototypes,
4120 which can conflict with char setpgrp(); below. */
4121#include <assert.h>
4122/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004123/* We use char because int might match the return type of a gcc2
4124 builtin and then its argument prototype would still apply. */
4125char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004126
Guido van Rossumf78abae1997-01-21 22:02:36 +00004127int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004128
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004129/* The GNU C library defines this for functions which it implements
4130 to always fail with ENOSYS. Some functions are actually named
4131 something starting with __ and the normal name is an alias. */
4132#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
4133choke me
4134#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004135setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004136#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004137
4138; return 0; }
4139EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004140if { (eval echo configure:4141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004141 rm -rf conftest*
4142 eval "ac_cv_func_setpgrp=yes"
4143else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004144 echo "configure: failed program was:" >&5
4145 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146 rm -rf conftest*
4147 eval "ac_cv_func_setpgrp=no"
4148fi
4149rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004153 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004154 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004155#line 4156 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156#include "confdefs.h"
4157#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004158int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004160; return 0; }
4161EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004162if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004163 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164 cat >> confdefs.h <<\EOF
4165#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004166EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004167
Guido van Rossumf78abae1997-01-21 22:02:36 +00004168else
4169 echo "configure: failed program was:" >&5
4170 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004171fi
4172rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004173else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004174 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004175fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004176
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004177echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004178echo "configure:4179: checking for gettimeofday" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004179if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004180 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181else
4182 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004183#line 4184 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004184#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004185/* System header to define __stub macros and hopefully few prototypes,
4186 which can conflict with char gettimeofday(); below. */
4187#include <assert.h>
4188/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004189/* We use char because int might match the return type of a gcc2
4190 builtin and then its argument prototype would still apply. */
4191char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004192
Guido van Rossumf78abae1997-01-21 22:02:36 +00004193int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194
4195/* The GNU C library defines this for functions which it implements
4196 to always fail with ENOSYS. Some functions are actually named
4197 something starting with __ and the normal name is an alias. */
4198#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
4199choke me
4200#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004201gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202#endif
4203
4204; return 0; }
4205EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004206if { (eval echo configure:4207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207 rm -rf conftest*
4208 eval "ac_cv_func_gettimeofday=yes"
4209else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 echo "configure: failed program was:" >&5
4211 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212 rm -rf conftest*
4213 eval "ac_cv_func_gettimeofday=no"
4214fi
4215rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004219 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004221#line 4222 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004223#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004224int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004225gettimeofday((struct timeval*)0,(struct timezone*)0);
4226; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004227EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004228if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004229 :
4230else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004231 echo "configure: failed program was:" >&5
4232 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004233 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004234 cat >> confdefs.h <<\EOF
4235#define GETTIMEOFDAY_NO_TZ 1
4236EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004237
4238fi
4239rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004241 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242fi
4243
4244
4245# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004246echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004247echo "configure:4248: checking whether time.h and sys/time.h may both be included" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004248if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004249 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250else
4251 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004252#line 4253 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004253#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254#include <sys/types.h>
4255#include <sys/time.h>
4256#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004257int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258struct tm *tp;
4259; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004260EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004261if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004262 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004264else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004265 echo "configure: failed program was:" >&5
4266 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004267 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269fi
4270rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004272
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004273echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274if test $ac_cv_header_time = yes; then
4275 cat >> confdefs.h <<\EOF
4276#define TIME_WITH_SYS_TIME 1
4277EOF
4278
4279fi
4280
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004281echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004282echo "configure:4283: checking whether struct tm is in sys/time.h or time.h" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004283if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004284 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285else
4286 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004287#line 4288 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288#include "confdefs.h"
4289#include <sys/types.h>
4290#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004291int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292struct tm *tp; tp->tm_sec;
4293; return 0; }
4294EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004295if { (eval echo configure:4296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004296 rm -rf conftest*
4297 ac_cv_struct_tm=time.h
4298else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004299 echo "configure: failed program was:" >&5
4300 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004301 rm -rf conftest*
4302 ac_cv_struct_tm=sys/time.h
4303fi
4304rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004305fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004306
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004307echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308if test $ac_cv_struct_tm = sys/time.h; then
4309 cat >> confdefs.h <<\EOF
4310#define TM_IN_SYS_TIME 1
4311EOF
4312
4313fi
4314
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004315echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004316echo "configure:4317: checking for tm_zone in struct tm" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004317if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004318 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004319else
4320 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004321#line 4322 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322#include "confdefs.h"
4323#include <sys/types.h>
4324#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004325int main() {
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004326struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327; return 0; }
4328EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004329if { (eval echo configure:4330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004331 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004332else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004333 echo "configure: failed program was:" >&5
4334 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004335 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004336 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004337fi
4338rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004340
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004341echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4342if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004343 cat >> confdefs.h <<\EOF
4344#define HAVE_TM_ZONE 1
4345EOF
4346
4347else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004348 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004349echo "configure:4350: checking for tzname" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004350if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004351 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004352else
4353 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004354#line 4355 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004355#include "confdefs.h"
4356#include <time.h>
4357#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004358extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004359#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004360int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361atoi(*tzname);
4362; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004364if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004365 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004366 ac_cv_var_tzname=yes
4367else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004368 echo "configure: failed program was:" >&5
4369 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370 rm -rf conftest*
4371 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004372fi
4373rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004374fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004375
4376echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377 if test $ac_cv_var_tzname = yes; then
4378 cat >> confdefs.h <<\EOF
4379#define HAVE_TZNAME 1
4380EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004381
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382 fi
4383fi
4384
4385
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004386echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004387echo "configure:4388: checking for time.h that defines altzone" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004388if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004389 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390else
4391 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004392#line 4393 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004393#include "confdefs.h"
4394#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004395int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004396return altzone;
4397; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004398EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004399if { (eval echo configure:4400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004400 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401 ac_cv_header_time_altzone=yes
4402else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004403 echo "configure: failed program was:" >&5
4404 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405 rm -rf conftest*
4406 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004407fi
4408rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409fi
4410
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004411echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412if test $ac_cv_header_time_altzone = yes; then
4413 cat >> confdefs.h <<\EOF
4414#define HAVE_ALTZONE 1
4415EOF
4416
4417fi
4418
Guido van Rossumda88dad1995-01-26 00:46:29 +00004419was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004420echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004421echo "configure:4422: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004422cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004423#line 4424 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004424#include "confdefs.h"
4425
4426#include <sys/types.h>
4427#include <sys/select.h>
4428#include <sys/time.h>
4429
Guido van Rossumf78abae1997-01-21 22:02:36 +00004430int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004431;
4432; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004433EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004434if { (eval echo configure:4435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004435 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004436 cat >> confdefs.h <<\EOF
4437#define SYS_SELECT_WITH_SYS_TIME 1
4438EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004439 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004440else
4441 echo "configure: failed program was:" >&5
4442 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004443fi
4444rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004445echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004446
4447# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004448
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004449echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004450echo "configure:4451: checking whether char is unsigned" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004451if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004452 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004453else
4454 if test "$GCC" = yes; then
4455 # GCC predefines this symbol on systems where it applies.
4456cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004457#line 4458 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458#include "confdefs.h"
4459#ifdef __CHAR_UNSIGNED__
4460 yes
4461#endif
4462
4463EOF
4464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4465 egrep "yes" >/dev/null 2>&1; then
4466 rm -rf conftest*
4467 ac_cv_c_char_unsigned=yes
4468else
4469 rm -rf conftest*
4470 ac_cv_c_char_unsigned=no
4471fi
4472rm -f conftest*
4473
4474else
4475if test "$cross_compiling" = yes; then
4476 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4477else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004478 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004479#line 4480 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004480#include "confdefs.h"
4481/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004482#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004483#define volatile
4484#endif
4485main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004486 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004487}
4488EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004489if { (eval echo configure:4490: \"$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 +00004490then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491 ac_cv_c_char_unsigned=yes
4492else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004493 echo "configure: failed program was:" >&5
4494 cat conftest.$ac_ext >&5
4495 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004496 ac_cv_c_char_unsigned=no
4497fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004498rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004499fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004500
4501fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004502fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004504echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004505if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4506 cat >> confdefs.h <<\EOF
4507#define __CHAR_UNSIGNED__ 1
4508EOF
4509
4510fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004512echo $ac_n "checking for working const""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004513echo "configure:4514: checking for working const" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004514if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004515 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004516else
4517 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004518#line 4519 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519#include "confdefs.h"
4520
Guido van Rossumf78abae1997-01-21 22:02:36 +00004521int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522
4523/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004524typedef int charset[2]; const charset x;
4525/* SunOS 4.1.1 cc rejects this. */
4526char const *const *ccp;
4527char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004528/* NEC SVR4.0.2 mips cc rejects this. */
4529struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004530static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004531/* AIX XL C 1.02.0.0 rejects this.
4532 It does not let you subtract one const X* pointer from another in an arm
4533 of an if-expression whose if-part is not a constant expression */
4534const char *g = "string";
4535ccp = &g + (g ? g-g : 0);
4536/* HPUX 7.0 cc rejects these. */
4537++ccp;
4538p = (char**) ccp;
4539ccp = (char const *const *) p;
4540{ /* SCO 3.2v4 cc rejects this. */
4541 char *t;
4542 char const *s = 0 ? (char *) 0 : (char const *) 0;
4543
4544 *t++ = 0;
4545}
4546{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004547 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004548 const int *foo = &x[0];
4549 ++foo;
4550}
4551{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4552 typedef const int *iptr;
4553 iptr p = 0;
4554 ++p;
4555}
4556{ /* AIX XL C 1.02.0.0 rejects this saying
4557 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4558 struct s { int j; const int *ap[3]; };
4559 struct s *b; b->j = 5;
4560}
4561{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4562 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563}
4564
4565; return 0; }
4566EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004567if { (eval echo configure:4568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004568 rm -rf conftest*
4569 ac_cv_c_const=yes
4570else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004571 echo "configure: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004573 rm -rf conftest*
4574 ac_cv_c_const=no
4575fi
4576rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004577fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004578
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004579echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004580if test $ac_cv_c_const = no; then
4581 cat >> confdefs.h <<\EOF
4582#define const
4583EOF
4584
4585fi
4586
Guido van Rossumef2255b2000-03-10 22:30:29 +00004587echo $ac_n "checking for inline""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004588echo "configure:4589: checking for inline" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004589if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004590 echo $ac_n "(cached) $ac_c" 1>&6
4591else
4592 ac_cv_c_inline=no
4593for ac_kw in inline __inline__ __inline; do
4594 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004595#line 4596 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004596#include "confdefs.h"
4597
4598int main() {
4599} $ac_kw foo() {
4600; return 0; }
4601EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004602if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004603 rm -rf conftest*
4604 ac_cv_c_inline=$ac_kw; break
4605else
4606 echo "configure: failed program was:" >&5
4607 cat conftest.$ac_ext >&5
4608fi
4609rm -f conftest*
4610done
4611
4612fi
4613
4614echo "$ac_t""$ac_cv_c_inline" 1>&6
4615case "$ac_cv_c_inline" in
4616 inline | yes) ;;
4617 no) cat >> confdefs.h <<\EOF
4618#define inline
4619EOF
4620 ;;
4621 *) cat >> confdefs.h <<EOF
4622#define inline $ac_cv_c_inline
4623EOF
4624 ;;
4625esac
4626
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627
Guido van Rossumda88dad1995-01-26 00:46:29 +00004628works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004629echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004630echo "configure:4631: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004631cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004632#line 4633 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004633#include "confdefs.h"
4634
Guido van Rossumf78abae1997-01-21 22:02:36 +00004635int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636volatile int x; x = 0;
4637; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004638EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004639if { (eval echo configure:4640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004640 rm -rf conftest*
4641 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004642else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004643 echo "configure: failed program was:" >&5
4644 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004645 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004646 cat >> confdefs.h <<\EOF
4647#define volatile
4648EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004649
4650fi
4651rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004652echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004653
Guido van Rossumda88dad1995-01-26 00:46:29 +00004654works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004655echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004656echo "configure:4657: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004657cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004658#line 4659 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004659#include "confdefs.h"
4660
Guido van Rossumf78abae1997-01-21 22:02:36 +00004661int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662signed char c;
4663; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004664EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004665if { (eval echo configure:4666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004666 rm -rf conftest*
4667 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004668else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004669 echo "configure: failed program was:" >&5
4670 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004671 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004672 cat >> confdefs.h <<\EOF
4673#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004674EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004675
4676fi
4677rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004678echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004679
Guido van Rossumda88dad1995-01-26 00:46:29 +00004680have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004681echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004682echo "configure:4683: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004683cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004684#line 4685 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004685#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004686int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004687int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004688return foo(10);
4689; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004690EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004691if { (eval echo configure:4692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004692 rm -rf conftest*
4693 cat >> confdefs.h <<\EOF
4694#define HAVE_PROTOTYPES 1
4695EOF
4696 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004697else
4698 echo "configure: failed program was:" >&5
4699 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004700fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004701rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004702echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004703
Guido van Rossumda88dad1995-01-26 00:46:29 +00004704works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004705echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004706echo "configure:4707: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004707cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004708#line 4709 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004709#include "confdefs.h"
4710
4711#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004712int foo(int x, ...) {
4713 va_list va;
4714 va_start(va, x);
4715 va_arg(va, int);
4716 va_arg(va, char *);
4717 va_arg(va, double);
4718 return 0;
4719}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004720
Guido van Rossumf78abae1997-01-21 22:02:36 +00004721int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004722return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004723; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004724EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004725if { (eval echo configure:4726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004726 rm -rf conftest*
4727 cat >> confdefs.h <<\EOF
4728#define HAVE_STDARG_PROTOTYPES 1
4729EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004730 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004731else
4732 echo "configure: failed program was:" >&5
4733 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004734fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004735rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004736echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004737
Guido van Rossumda88dad1995-01-26 00:46:29 +00004738if test "$have_prototypes" = yes; then
4739bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004740echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004741echo "configure:4742: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004742cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004743#line 4744 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004744#include "confdefs.h"
4745#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004746int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004747char **t;execve("@",t,t);
4748; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004749EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004750if { (eval echo configure:4751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004751 :
4752else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004753 echo "configure: failed program was:" >&5
4754 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004755 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004756 cat >> confdefs.h <<\EOF
4757#define BAD_EXEC_PROTOTYPES 1
4758EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004759 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004760fi
4761rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004762echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004763fi
4764
Guido van Rossumda88dad1995-01-26 00:46:29 +00004765bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004766echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004767echo "configure:4768: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004768if test "$cross_compiling" = yes; then
4769 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4770else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004771 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004772#line 4773 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004773#include "confdefs.h"
4774
4775struct s { int a; int b; };
4776static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004777int foobar() {
4778 static int random;
4779 random = (int) &foo;
4780 return random;
4781}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004782static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783main() {
4784 exit(!((int)&foo == foobar()));
4785}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004786
4787EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004788if { (eval echo configure:4789: \"$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 +00004789then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004790 :
4791else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004792 echo "configure: failed program was:" >&5
4793 cat conftest.$ac_ext >&5
4794 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004795 cat >> confdefs.h <<\EOF
4796#define BAD_STATIC_FORWARD 1
4797EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004798 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004799fi
4800rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004801fi
4802
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004803echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004804
Guido van Rossumda88dad1995-01-26 00:46:29 +00004805va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004806echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004807echo "configure:4808: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004808cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004809#line 4810 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004810#include "confdefs.h"
4811
4812#ifdef HAVE_STDARG_PROTOTYPES
4813#include <stdarg.h>
4814#else
4815#include <varargs.h>
4816#endif
4817
Guido van Rossumf78abae1997-01-21 22:02:36 +00004818int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004819va_list list1, list2; list1 = list2;
4820; return 0; }
4821EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004822if { (eval echo configure:4823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004823 :
4824else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004825 echo "configure: failed program was:" >&5
4826 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004827 rm -rf conftest*
4828 cat >> confdefs.h <<\EOF
4829#define VA_LIST_IS_ARRAY 1
4830EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004831 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004832fi
4833rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004834echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004835
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004836# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4837echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004838echo "configure:4839: checking for gethostbyname_r" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004839if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004840 echo $ac_n "(cached) $ac_c" 1>&6
4841else
4842 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004843#line 4844 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004844#include "confdefs.h"
4845/* System header to define __stub macros and hopefully few prototypes,
4846 which can conflict with char gethostbyname_r(); below. */
4847#include <assert.h>
4848/* Override any gcc2 internal prototype to avoid an error. */
4849/* We use char because int might match the return type of a gcc2
4850 builtin and then its argument prototype would still apply. */
4851char gethostbyname_r();
4852
4853int main() {
4854
4855/* The GNU C library defines this for functions which it implements
4856 to always fail with ENOSYS. Some functions are actually named
4857 something starting with __ and the normal name is an alias. */
4858#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
4859choke me
4860#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00004861gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004862#endif
4863
4864; return 0; }
4865EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004866if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004867 rm -rf conftest*
4868 eval "ac_cv_func_gethostbyname_r=yes"
4869else
4870 echo "configure: failed program was:" >&5
4871 cat conftest.$ac_ext >&5
4872 rm -rf conftest*
4873 eval "ac_cv_func_gethostbyname_r=no"
4874fi
4875rm -f conftest*
4876fi
4877
4878if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
4879 echo "$ac_t""yes" 1>&6
4880
4881 cat >> confdefs.h <<\EOF
4882#define HAVE_GETHOSTBYNAME_R 1
4883EOF
4884
4885 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004886echo "configure:4887: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004887 OLD_CFLAGS=$CFLAGS
4888 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
4889 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004890#line 4891 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004891#include "confdefs.h"
4892
4893# include <netdb.h>
4894
4895int main() {
4896
4897 char *name;
4898 struct hostent *he, *res;
4899 char buffer[2048];
4900 int buflen = 2048;
4901 int h_errnop;
4902
4903 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
4904
4905; return 0; }
4906EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004907if { (eval echo configure:4908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004908 rm -rf conftest*
4909
4910 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004911#define HAVE_GETHOSTBYNAME_R 1
4912EOF
4913
4914 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004915#define HAVE_GETHOSTBYNAME_R_6_ARG 1
4916EOF
4917
4918 echo "$ac_t""yes" 1>&6
4919
4920else
4921 echo "configure: failed program was:" >&5
4922 cat conftest.$ac_ext >&5
4923 rm -rf conftest*
4924
4925 echo "$ac_t""no" 1>&6
4926 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004927echo "configure:4928: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004928 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004929#line 4930 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004930#include "confdefs.h"
4931
4932# include <netdb.h>
4933
4934int main() {
4935
4936 char *name;
4937 struct hostent *he;
4938 char buffer[2048];
4939 int buflen = 2048;
4940 int h_errnop;
4941
4942 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
4943
4944; return 0; }
4945EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004946if { (eval echo configure:4947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004947 rm -rf conftest*
4948
4949 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004950#define HAVE_GETHOSTBYNAME_R 1
4951EOF
4952
4953 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004954#define HAVE_GETHOSTBYNAME_R_5_ARG 1
4955EOF
4956
4957 echo "$ac_t""yes" 1>&6
4958
4959else
4960 echo "configure: failed program was:" >&5
4961 cat conftest.$ac_ext >&5
4962 rm -rf conftest*
4963
4964 echo "$ac_t""no" 1>&6
4965 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004966echo "configure:4967: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004967 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004968#line 4969 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004969#include "confdefs.h"
4970
4971# include <netdb.h>
4972
4973int main() {
4974
4975 char *name;
4976 struct hostent *he;
4977 struct hostent_data data;
4978
4979 (void) gethostbyname_r(name, he, &data);
4980
4981; return 0; }
4982EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00004983if { (eval echo configure:4984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004984 rm -rf conftest*
4985
4986 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004987#define HAVE_GETHOSTBYNAME_R 1
4988EOF
4989
4990 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004991#define HAVE_GETHOSTBYNAME_R_3_ARG 1
4992EOF
4993
4994 echo "$ac_t""yes" 1>&6
4995
4996else
4997 echo "configure: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
4999 rm -rf conftest*
5000
5001 echo "$ac_t""no" 1>&6
5002
5003fi
5004rm -f conftest*
5005
5006fi
5007rm -f conftest*
5008
5009fi
5010rm -f conftest*
5011 CFLAGS=$OLD_CFLAGS
5012
5013else
5014 echo "$ac_t""no" 1>&6
5015
5016 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005017echo "configure:5018: checking for gethostbyname" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005018if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005019 echo $ac_n "(cached) $ac_c" 1>&6
5020else
5021 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005022#line 5023 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005023#include "confdefs.h"
5024/* System header to define __stub macros and hopefully few prototypes,
5025 which can conflict with char gethostbyname(); below. */
5026#include <assert.h>
5027/* Override any gcc2 internal prototype to avoid an error. */
5028/* We use char because int might match the return type of a gcc2
5029 builtin and then its argument prototype would still apply. */
5030char gethostbyname();
5031
5032int main() {
5033
5034/* The GNU C library defines this for functions which it implements
5035 to always fail with ENOSYS. Some functions are actually named
5036 something starting with __ and the normal name is an alias. */
5037#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5038choke me
5039#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005040gethostbyname();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005041#endif
5042
5043; return 0; }
5044EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005045if { (eval echo configure:5046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005046 rm -rf conftest*
5047 eval "ac_cv_func_gethostbyname=yes"
5048else
5049 echo "configure: failed program was:" >&5
5050 cat conftest.$ac_ext >&5
5051 rm -rf conftest*
5052 eval "ac_cv_func_gethostbyname=no"
5053fi
5054rm -f conftest*
5055fi
5056
5057if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5058 echo "$ac_t""yes" 1>&6
5059 cat >> confdefs.h <<\EOF
5060#define HAVE_GETHOSTBYNAME 1
5061EOF
5062
5063else
5064 echo "$ac_t""no" 1>&6
5065fi
5066
5067
5068fi
5069
5070
5071
5072
5073
5074
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005075
Guido van Rossum627b2d71993-12-24 10:39:16 +00005076# checks for system services
5077# (none yet)
5078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00005080echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005081echo "configure:5082: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005082ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005083if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005084 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005085else
5086 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005087LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005089#line 5090 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005090#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005091/* Override any gcc2 internal prototype to avoid an error. */
5092/* We use char because int might match the return type of a gcc2
5093 builtin and then its argument prototype would still apply. */
5094char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005095
Guido van Rossumf78abae1997-01-21 22:02:36 +00005096int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097__fpu_control()
5098; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005099EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005100if { (eval echo configure:5101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005101 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005102 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005103else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005104 echo "configure: failed program was:" >&5
5105 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005106 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005107 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005108fi
5109rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005110LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005112fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005113if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005114 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005115 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5116 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005117 cat >> confdefs.h <<EOF
5118#define $ac_tr_lib 1
5119EOF
5120
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005121 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122
5123else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005124 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005125fi
5126
5127
Guido van Rossum7f253911997-05-09 02:42:48 +00005128# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005129echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005130echo "configure:5131: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005131# Check whether --with-fpectl or --without-fpectl was given.
5132if test "${with_fpectl+set}" = set; then
5133 withval="$with_fpectl"
5134
5135if test "$withval" != no
5136then cat >> confdefs.h <<\EOF
5137#define WANT_SIGFPE_HANDLER 1
5138EOF
5139 echo "$ac_t""yes" 1>&6
5140else echo "$ac_t""no" 1>&6
5141fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005142else
5143 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005144fi
5145
5146
Guido van Rossum7f43da71994-08-01 12:15:30 +00005147# check for --with-libm=...
5148
Guido van Rossum563e7081996-09-10 18:20:48 +00005149case $ac_sys_system in
5150next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005151BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005152*) LIBM=-lm
5153esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005154echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005155echo "configure:5156: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005157if test "${with_libm+set}" = set; then
5158 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005159
Guido van Rossum7f253911997-05-09 02:42:48 +00005160if test "$withval" = no
5161then LIBM=
5162 echo "$ac_t""force LIBM empty" 1>&6
5163elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005164then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005165 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005166else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005167fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005168else
5169 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005170fi
5171
5172
5173# check for --with-libc=...
5174
Guido van Rossum7f253911997-05-09 02:42:48 +00005175echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005176echo "configure:5177: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005177# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005178if test "${with_libc+set}" = set; then
5179 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005180
Guido van Rossum7f253911997-05-09 02:42:48 +00005181if test "$withval" = no
5182then LIBC=
5183 echo "$ac_t""force LIBC empty" 1>&6
5184elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005185then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005186 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005188fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005189else
5190 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005191fi
5192
5193
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005194# check for hypot() in math library
5195LIBS_SAVE=$LIBS
5196LIBS="$LIBS $LIBM"
5197for ac_func in hypot
5198do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005199echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005200echo "configure:5201: checking for $ac_func" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005201if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005202 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005203else
5204 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005205#line 5206 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005206#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005207/* System header to define __stub macros and hopefully few prototypes,
5208 which can conflict with char $ac_func(); below. */
5209#include <assert.h>
5210/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005211/* We use char because int might match the return type of a gcc2
5212 builtin and then its argument prototype would still apply. */
5213char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005214
Guido van Rossumf78abae1997-01-21 22:02:36 +00005215int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005216
5217/* The GNU C library defines this for functions which it implements
5218 to always fail with ENOSYS. Some functions are actually named
5219 something starting with __ and the normal name is an alias. */
5220#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5221choke me
5222#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005223$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005224#endif
5225
5226; return 0; }
5227EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005228if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005229 rm -rf conftest*
5230 eval "ac_cv_func_$ac_func=yes"
5231else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005232 echo "configure: failed program was:" >&5
5233 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005234 rm -rf conftest*
5235 eval "ac_cv_func_$ac_func=no"
5236fi
5237rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005238fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005239
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005240if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005241 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005242 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005243 cat >> confdefs.h <<EOF
5244#define $ac_tr_func 1
5245EOF
5246
5247else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005248 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005249fi
5250done
5251
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005252for ac_func in hypot
5253do
5254echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005255echo "configure:5256: checking for $ac_func" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005256if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005257 echo $ac_n "(cached) $ac_c" 1>&6
5258else
5259 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005260#line 5261 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005261#include "confdefs.h"
5262/* System header to define __stub macros and hopefully few prototypes,
5263 which can conflict with char $ac_func(); below. */
5264#include <assert.h>
5265/* Override any gcc2 internal prototype to avoid an error. */
5266/* We use char because int might match the return type of a gcc2
5267 builtin and then its argument prototype would still apply. */
5268char $ac_func();
5269
Guido van Rossumf78abae1997-01-21 22:02:36 +00005270int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005271
5272/* The GNU C library defines this for functions which it implements
5273 to always fail with ENOSYS. Some functions are actually named
5274 something starting with __ and the normal name is an alias. */
5275#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5276choke me
5277#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005278$ac_func();
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005279#endif
5280
5281; return 0; }
5282EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005283if { (eval echo configure:5284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005284 rm -rf conftest*
5285 eval "ac_cv_func_$ac_func=yes"
5286else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005287 echo "configure: failed program was:" >&5
5288 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005289 rm -rf conftest*
5290 eval "ac_cv_func_$ac_func=no"
5291fi
5292rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005293fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005294
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005295if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5296 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005297 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5298 cat >> confdefs.h <<EOF
5299#define $ac_tr_func 1
5300EOF
5301
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005302else
5303 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005304LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005305fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005306done
5307
Guido van Rossumf78abae1997-01-21 22:02:36 +00005308
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005309LIBS=$LIBS_SAVE
5310
Guido van Rossuma28518a2000-05-11 18:41:32 +00005311# check for rint() in math library
5312LIBS_SAVE=$LIBS
5313LIBS="$LIBS $LIBM"
5314for ac_func in rint
5315do
5316echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005317echo "configure:5318: checking for $ac_func" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005318if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma28518a2000-05-11 18:41:32 +00005319 echo $ac_n "(cached) $ac_c" 1>&6
5320else
5321 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005322#line 5323 "configure"
Guido van Rossuma28518a2000-05-11 18:41:32 +00005323#include "confdefs.h"
5324/* System header to define __stub macros and hopefully few prototypes,
5325 which can conflict with char $ac_func(); below. */
5326#include <assert.h>
5327/* Override any gcc2 internal prototype to avoid an error. */
5328/* We use char because int might match the return type of a gcc2
5329 builtin and then its argument prototype would still apply. */
5330char $ac_func();
5331
5332int main() {
5333
5334/* The GNU C library defines this for functions which it implements
5335 to always fail with ENOSYS. Some functions are actually named
5336 something starting with __ and the normal name is an alias. */
5337#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5338choke me
5339#else
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005340$ac_func();
Guido van Rossuma28518a2000-05-11 18:41:32 +00005341#endif
5342
5343; return 0; }
5344EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005345if { (eval echo configure:5346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma28518a2000-05-11 18:41:32 +00005346 rm -rf conftest*
5347 eval "ac_cv_func_$ac_func=yes"
5348else
5349 echo "configure: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 rm -rf conftest*
5352 eval "ac_cv_func_$ac_func=no"
5353fi
5354rm -f conftest*
5355fi
5356
5357if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5358 echo "$ac_t""yes" 1>&6
5359 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5360 cat >> confdefs.h <<EOF
5361#define $ac_tr_func 1
5362EOF
5363
5364else
5365 echo "$ac_t""no" 1>&6
5366fi
5367done
5368
5369LIBS=$LIBS_SAVE
5370
Guido van Rossumda88dad1995-01-26 00:46:29 +00005371# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005372echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005373echo "configure:5374: checking for genuine getopt" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005374if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005375 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005376else
5377 if test "$cross_compiling" = yes; then
5378 ac_cv_func_getopt=no
5379else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005380 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005381#line 5382 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005382#include "confdefs.h"
5383#include <stdio.h>
5384extern int optind, opterr, getopt();
5385extern char* optarg;
5386int main() {
5387 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5388 opterr = 0;
5389 if (getopt(3, av, "f:") == 'f') { exit(1); }
5390 exit(0);
5391}
5392EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005393if { (eval echo configure:5394: \"$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 +00005394then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005395 ac_cv_func_getopt=yes
5396else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005397 echo "configure: failed program was:" >&5
5398 cat conftest.$ac_ext >&5
5399 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005400 ac_cv_func_getopt=no
5401fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005402rm -fr conftest*
5403fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005404
5405fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005406echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005407test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5408
Guido van Rossumad713701997-07-10 22:42:38 +00005409# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005410echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005411echo "configure:5412: checking what malloc(0) returns" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005412if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005413 echo $ac_n "(cached) $ac_c" 1>&6
5414else
5415 if test "$cross_compiling" = yes; then
5416 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5417else
5418 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005419#line 5420 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005420#include "confdefs.h"
5421#include <stdio.h>
5422#ifdef HAVE_STDLIB
5423#include <stdlib.h>
5424#else
5425char *malloc(), *realloc();
5426int *free();
5427#endif
5428main() {
5429 char *p;
5430 p = malloc(0);
5431 if (p == NULL) exit(1);
5432 p = realloc(p, 0);
5433 if (p == NULL) exit(1);
5434 free(p);
5435 exit(0);
5436}
5437EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005438if { (eval echo configure:5439: \"$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 +00005439then
5440 ac_cv_malloc_zero=nonnull
5441else
5442 echo "configure: failed program was:" >&5
5443 cat conftest.$ac_ext >&5
5444 rm -fr conftest*
5445 ac_cv_malloc_zero=null
5446fi
5447rm -fr conftest*
5448fi
5449
5450fi
5451
5452echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5453if test "$ac_cv_malloc_zero" = null
5454then
5455 cat >> confdefs.h <<\EOF
5456#define MALLOC_ZERO_RETURNS_NULL 1
5457EOF
5458
5459fi
5460
Guido van Rossumef2255b2000-03-10 22:30:29 +00005461# check for wchar.h
5462ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5463echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005464echo "configure:5465: checking for wchar.h" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005465if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005466 echo $ac_n "(cached) $ac_c" 1>&6
5467else
5468 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005469#line 5470 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005470#include "confdefs.h"
5471#include <wchar.h>
5472EOF
5473ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005474{ (eval echo configure:5475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005475ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5476if test -z "$ac_err"; then
5477 rm -rf conftest*
5478 eval "ac_cv_header_$ac_safe=yes"
5479else
5480 echo "$ac_err" >&5
5481 echo "configure: failed program was:" >&5
5482 cat conftest.$ac_ext >&5
5483 rm -rf conftest*
5484 eval "ac_cv_header_$ac_safe=no"
5485fi
5486rm -f conftest*
5487fi
5488if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5489 echo "$ac_t""yes" 1>&6
5490 cat >> confdefs.h <<\EOF
5491#define HAVE_WCHAR_H 1
5492EOF
5493 wchar_h="yes"
5494else
5495 echo "$ac_t""no" 1>&6
5496wchar_h="no"
5497
5498fi
5499
5500
5501# check for usable wchar_t
5502usable_wchar_t="unkown"
5503echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005504echo "configure:5505: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005505if test "$cross_compiling" = yes; then
5506 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5507else
5508 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005509#line 5510 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005510#include "confdefs.h"
5511
5512#include "wchar.h"
5513#include "wctype.h"
5514main() {
5515 wchar_t s;
5516 if (sizeof(s) == 2)
5517 exit(0);
5518 else
5519 exit(1);
5520}
5521
5522EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005523if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00005524then
5525 cat >> confdefs.h <<\EOF
5526#define HAVE_USABLE_WCHAR_T 1
5527EOF
5528 usable_wchar_t="yes"
5529else
5530 echo "configure: failed program was:" >&5
5531 cat conftest.$ac_ext >&5
5532 rm -fr conftest*
5533 usable_wchar_t="no"
5534fi
5535rm -fr conftest*
5536fi
5537
5538echo "$ac_t""$usable_wchar_t" 1>&6
5539
5540# check for endianness
5541echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005542echo "configure:5543: checking whether byte ordering is bigendian" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005543if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005544 echo $ac_n "(cached) $ac_c" 1>&6
5545else
5546 ac_cv_c_bigendian=unknown
5547# See if sys/param.h defines the BYTE_ORDER macro.
5548cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005549#line 5550 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005550#include "confdefs.h"
5551#include <sys/types.h>
5552#include <sys/param.h>
5553int main() {
5554
5555#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5556 bogus endian macros
5557#endif
5558; return 0; }
5559EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005560if { (eval echo configure:5561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005561 rm -rf conftest*
5562 # It does; now see whether it defined to BIG_ENDIAN or not.
5563cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005564#line 5565 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005565#include "confdefs.h"
5566#include <sys/types.h>
5567#include <sys/param.h>
5568int main() {
5569
5570#if BYTE_ORDER != BIG_ENDIAN
5571 not big endian
5572#endif
5573; return 0; }
5574EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005575if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005576 rm -rf conftest*
5577 ac_cv_c_bigendian=yes
5578else
5579 echo "configure: failed program was:" >&5
5580 cat conftest.$ac_ext >&5
5581 rm -rf conftest*
5582 ac_cv_c_bigendian=no
5583fi
5584rm -f conftest*
5585else
5586 echo "configure: failed program was:" >&5
5587 cat conftest.$ac_ext >&5
5588fi
5589rm -f conftest*
5590if test $ac_cv_c_bigendian = unknown; then
5591if test "$cross_compiling" = yes; then
5592 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5593else
5594 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005595#line 5596 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005596#include "confdefs.h"
5597main () {
5598 /* Are we little or big endian? From Harbison&Steele. */
5599 union
5600 {
5601 long l;
5602 char c[sizeof (long)];
5603 } u;
5604 u.l = 1;
5605 exit (u.c[sizeof (long) - 1] == 1);
5606}
5607EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005608if { (eval echo configure:5609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00005609then
5610 ac_cv_c_bigendian=no
5611else
5612 echo "configure: failed program was:" >&5
5613 cat conftest.$ac_ext >&5
5614 rm -fr conftest*
5615 ac_cv_c_bigendian=yes
5616fi
5617rm -fr conftest*
5618fi
5619
5620fi
5621fi
5622
5623echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5624if test $ac_cv_c_bigendian = yes; then
5625 cat >> confdefs.h <<\EOF
5626#define WORDS_BIGENDIAN 1
5627EOF
5628
5629fi
5630
5631
Guido van Rossum95713eb2000-05-18 20:53:31 +00005632# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5633# Add sys/socket.h to confdefs.h
5634cat >> confdefs.h <<\EOF
5635#ifdef HAVE_SYS_SOCKET_H
5636#include <sys/socket.h>
5637#endif
5638EOF
5639echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005640echo "configure:5641: checking for socklen_t" >&5
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005641if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005642 echo $ac_n "(cached) $ac_c" 1>&6
5643else
5644 cat > conftest.$ac_ext <<EOF
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00005645#line 5646 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005646#include "confdefs.h"
5647#include <sys/types.h>
5648#if STDC_HEADERS
5649#include <stdlib.h>
5650#include <stddef.h>
5651#endif
5652EOF
5653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5654 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5655 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005656 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00005657else
5658 rm -rf conftest*
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005659 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00005660fi
5661rm -f conftest*
5662
5663fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005664echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
5665if test $ac_cv_type_socklen_t = no; then
5666 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005667#define socklen_t int
5668EOF
5669
5670fi
5671
5672
Guido van Rossum627b2d71993-12-24 10:39:16 +00005673# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005674trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005675cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005676# This file is a shell script that caches the results of configure
5677# tests run on this system so they can be shared between configure
5678# scripts and configure runs. It is not useful on other systems.
5679# If it contains results you don't want to keep, you may remove or edit it.
5680#
5681# By default, configure uses ./config.cache as the cache file,
5682# creating it if it does not exist already. You can give configure
5683# the --cache-file=FILE option to use a different cache file; that is
5684# what configure does when it calls configure scripts in
5685# subdirectories, so they share the cache.
5686# Giving --cache-file=/dev/null disables caching, for debugging configure.
5687# config.status only pays attention to the cache file if you give it the
5688# --recheck option to rerun configure.
5689#
5690EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005691# The following way of writing the cache mishandles newlines in values,
5692# but we know of no workaround that is simple, portable, and efficient.
5693# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005694# Ultrix sh set writes to stderr and can't be redirected directly,
5695# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005696(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005697 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005698 *ac_space=\ *)
5699 # `set' does not quote correctly, so add quotes (double-quote substitution
5700 # turns \\\\ into \\, and sed turns \\ into \).
5701 sed -n \
5702 -e "s/'/'\\\\''/g" \
5703 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5704 ;;
5705 *)
5706 # `set' quotes correctly as required by POSIX, so do not add quotes.
5707 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5708 ;;
5709 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005710if cmp -s $cache_file confcache; then
5711 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005712else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005713 if test -w $cache_file; then
5714 echo "updating cache $cache_file"
5715 cat confcache > $cache_file
5716 else
5717 echo "not updating unwritable cache $cache_file"
5718 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005719fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005720rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005721
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005722trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723
5724test "x$prefix" = xNONE && prefix=$ac_default_prefix
5725# Let make expand exec_prefix.
5726test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005727
Guido van Rossum7f43da71994-08-01 12:15:30 +00005728# Any assignment to VPATH causes Sun make to only execute
5729# the first set of double-colon rules, so remove it if not needed.
5730# If there is a colon in the path, we need to keep it.
5731if test "x$srcdir" = x.; then
5732 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5733fi
5734
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005735trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005736
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005737DEFS=-DHAVE_CONFIG_H
5738
5739# Without the "./", some shells look in PATH for config.status.
5740: ${CONFIG_STATUS=./config.status}
5741
5742echo creating $CONFIG_STATUS
5743rm -f $CONFIG_STATUS
5744cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005745#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005746# Generated automatically by configure.
5747# Run this file to recreate the current configuration.
5748# This directory was configured as follows,
5749# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5750#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005751# $0 $ac_configure_args
5752#
5753# Compiler output produced by configure, useful for debugging
5754# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005755
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005757for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00005758do
Guido van Rossum7f43da71994-08-01 12:15:30 +00005759 case "\$ac_option" in
5760 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005761 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5762 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00005763 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00005764 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005765 exit 0 ;;
5766 -help | --help | --hel | --he | --h)
5767 echo "\$ac_cs_usage"; exit 0 ;;
5768 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005769 esac
5770done
5771
Guido van Rossum7f43da71994-08-01 12:15:30 +00005772ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00005773
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005774trap 'rm -fr `echo "Makefile \
5775 Objects/Makefile \
5776 Parser/Makefile \
5777 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005778 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00005779 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005780EOF
5781cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005782
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005783# Protect against being on the right side of a sed subst in config.status.
5784sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5785 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005786$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00005787$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005788s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005789s%@CFLAGS@%$CFLAGS%g
5790s%@CPPFLAGS@%$CPPFLAGS%g
5791s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005792s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005793s%@DEFS@%$DEFS%g
5794s%@LDFLAGS@%$LDFLAGS%g
5795s%@LIBS@%$LIBS%g
5796s%@exec_prefix@%$exec_prefix%g
5797s%@prefix@%$prefix%g
5798s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005799s%@bindir@%$bindir%g
5800s%@sbindir@%$sbindir%g
5801s%@libexecdir@%$libexecdir%g
5802s%@datadir@%$datadir%g
5803s%@sysconfdir@%$sysconfdir%g
5804s%@sharedstatedir@%$sharedstatedir%g
5805s%@localstatedir@%$localstatedir%g
5806s%@libdir@%$libdir%g
5807s%@includedir@%$includedir%g
5808s%@oldincludedir@%$oldincludedir%g
5809s%@infodir@%$infodir%g
5810s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00005811s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005812s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00005813s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00005814s%@SET_CXX@%$SET_CXX%g
5815s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005816s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005817s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
5818s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00005819s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005820s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005821s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005822s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00005823s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5824s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005825s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005826s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005827s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005828s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00005829s%@SO@%$SO%g
5830s%@LDSHARED@%$LDSHARED%g
5831s%@CCSHARED@%$CCSHARED%g
5832s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00005833s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00005834s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00005835s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005836s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00005837s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005838s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005839s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
5840s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
5841s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005842s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005843s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005844s%@LIBM@%$LIBM%g
5845s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005846
5847CEOF
5848EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005849
5850cat >> $CONFIG_STATUS <<\EOF
5851
5852# Split the substitutions into bite-sized pieces for seds with
5853# small command number limits, like on Digital OSF/1 and HP-UX.
5854ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5855ac_file=1 # Number of current file.
5856ac_beg=1 # First line for current file.
5857ac_end=$ac_max_sed_cmds # Line after last line for current file.
5858ac_more_lines=:
5859ac_sed_cmds=""
5860while $ac_more_lines; do
5861 if test $ac_beg -gt 1; then
5862 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5863 else
5864 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5865 fi
5866 if test ! -s conftest.s$ac_file; then
5867 ac_more_lines=false
5868 rm -f conftest.s$ac_file
5869 else
5870 if test -z "$ac_sed_cmds"; then
5871 ac_sed_cmds="sed -f conftest.s$ac_file"
5872 else
5873 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5874 fi
5875 ac_file=`expr $ac_file + 1`
5876 ac_beg=$ac_end
5877 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5878 fi
5879done
5880if test -z "$ac_sed_cmds"; then
5881 ac_sed_cmds=cat
5882fi
5883EOF
5884
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005885cat >> $CONFIG_STATUS <<EOF
5886
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005887CONFIG_FILES=\${CONFIG_FILES-"Makefile \
5888 Objects/Makefile \
5889 Parser/Makefile \
5890 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005891 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00005892 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005893EOF
5894cat >> $CONFIG_STATUS <<\EOF
5895for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005896 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005897 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005898 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005899 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5900 *) ac_file_in="${ac_file}.in" ;;
5901 esac
5902
Guido van Rossumf78abae1997-01-21 22:02:36 +00005903 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005904
5905 # Remove last slash and all that follows it. Not all systems have dirname.
5906 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5907 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5908 # The file is in a subdirectory.
5909 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005910 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005911 # A "../" for each directory in $ac_dir_suffix.
5912 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5913 else
5914 ac_dir_suffix= ac_dots=
5915 fi
5916
5917 case "$ac_given_srcdir" in
5918 .) srcdir=.
5919 if test -z "$ac_dots"; then top_srcdir=.
5920 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5921 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5922 *) # Relative path.
5923 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5924 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5925 esac
5926
Guido van Rossumf78abae1997-01-21 22:02:36 +00005927
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005928 echo creating "$ac_file"
5929 rm -f "$ac_file"
5930 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5931 case "$ac_file" in
5932 *Makefile*) ac_comsub="1i\\
5933# $configure_input" ;;
5934 *) ac_comsub= ;;
5935 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00005936
5937 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 +00005938 sed -e "$ac_comsub
5939s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005940s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005941s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00005942" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00005943fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00005944rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5947# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00005948#
5949# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5951ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005952ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005954# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005955ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5956ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005957ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005958ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005959# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5961ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005962ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005964
Guido van Rossumf78abae1997-01-21 22:02:36 +00005965if test "${CONFIG_HEADERS+set}" != set; then
5966EOF
5967cat >> $CONFIG_STATUS <<EOF
5968 CONFIG_HEADERS="config.h"
5969EOF
5970cat >> $CONFIG_STATUS <<\EOF
5971fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005972for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005973 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005974 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005975 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005976 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5977 *) ac_file_in="${ac_file}.in" ;;
5978 esac
5979
Guido van Rossum7f43da71994-08-01 12:15:30 +00005980 echo creating $ac_file
5981
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005982 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00005983 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5984 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005985
5986EOF
5987
5988# Transform confdefs.h into a sed script conftest.vals that substitutes
5989# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005990# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005991# Protect against being in an unquoted here document in config.status.
5992rm -f conftest.vals
5993cat > conftest.hdr <<\EOF
5994s/[\\&%]/\\&/g
5995s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005996s%#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 +00005997s%ac_d%ac_u%gp
5998s%ac_u%ac_e%gp
5999EOF
6000sed -n -f conftest.hdr confdefs.h > conftest.vals
6001rm -f conftest.hdr
6002
6003# This sed command replaces #undef with comments. This is necessary, for
6004# example, in the case of _POSIX_SOURCE, which is predefined and required
6005# on some systems where configure will not decide to define it.
6006cat >> conftest.vals <<\EOF
6007s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6008EOF
6009
6010# Break up conftest.vals because some shells have a limit on
6011# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012
6013rm -f conftest.tail
6014while :
6015do
6016 ac_lines=`grep -c . conftest.vals`
6017 # grep -c gives empty output for an empty file on some AIX systems.
6018 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6019 # Write a limited-size here document to conftest.frag.
6020 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6021 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6022 echo 'CEOF
6023 sed -f conftest.frag conftest.in > conftest.out
6024 rm -f conftest.in
6025 mv conftest.out conftest.in
6026' >> $CONFIG_STATUS
6027 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6028 rm -f conftest.vals
6029 mv conftest.tail conftest.vals
6030done
6031rm -f conftest.vals
6032
6033cat >> $CONFIG_STATUS <<\EOF
6034 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006035 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006036 cat conftest.in >> conftest.h
6037 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006038 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006039 echo "$ac_file is unchanged"
6040 rm -f conftest.h
6041 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006042 # Remove last slash and all that follows it. Not all systems have dirname.
6043 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6044 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6045 # The file is in a subdirectory.
6046 test ! -d "$ac_dir" && mkdir "$ac_dir"
6047 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006048 rm -f $ac_file
6049 mv conftest.h $ac_file
6050 fi
6051fi; done
6052
Guido van Rossumf78abae1997-01-21 22:02:36 +00006053EOF
6054cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006055
Guido van Rossumf78abae1997-01-21 22:02:36 +00006056EOF
6057cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006058
6059exit 0
6060EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061chmod +x $CONFIG_STATUS
6062rm -fr confdefs* $ac_clean_files
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00006063test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006064